Examples of Role


Examples of Entities.Role

        accDepDao.create(accDeptRef);
    }

    @Override
    public Accountrole assignId(Account newAccount, int role) {
        Role getRole = roleDao.find(role);
        Accountrole newAccRole = new Accountrole();
        newAccRole.setAccountid(newAccount);
        newAccRole.setRoleid(getRole);

        return newAccRole;
View Full Code Here

Examples of OntoUML.Role

     * <!-- end-user-doc -->
     * @generated NOT
     */
    private void updateContents(RoleEditPart roleeditpart) {

      Role s = (Role) ((View) roleeditpart.getModel()).getElement();
      for (int i = 0; i < s.getAttribute().size(); i++) {
        Property p1 = (Property) s.getAttribute().get(i);
        if (p1.getAttribute().size() >= 2) {
          DatatypeAssociation d = (DatatypeAssociation) p1
              .getAttribute().get(0);
          Property p2 = (Property) p1.getAttribute().get(1);
          d.setOwner(null);
          d.setContainer(s.getContainer());
          d.setName("Name");
          p1.setAssociationEnd(d);
          p1.setName("Name");
          p2.setAssociationEnd(d);
          p2.setOwner(d);
View Full Code Here

Examples of archmapper.main.model.architecture.Role

  private void addPortAttachments(IAcmePort acmePort, Port port,
      IAcmeSystem system) {
    for (IAcmeAttachment att : system.getAttachments(acmePort)) {
      IAcmeRole acmeRole = att.getRole();

      Role role = new Role();
      port.getRoles().add(role);
      role.setPort(port);

      if (acmeRole.getDeclaredTypes().size() > 0) {
        IAcmeElementTypeRef<IAcmeRoleType> type = acmeRole
            .getDeclaredTypes().iterator().next();
        role.setStyleType(type.getReferencedName());
      }

      addProperties(role, acmeRole.getProperties());

      IAcmeConnector acmeConn = (IAcmeConnector) acmeRole.getParent();
      Connector conn = conf
          .getConnectorByName(getQualifiedName(acmeConn));
      role.setConnector(conn);
      conn.getRoles().add(role);
    }
  }
View Full Code Here

Examples of at.riemers.zero.base.model.Role

      try {
      ZeroUser admin = userDao.getUser("admin");
      if (admin == null) {
          log.info("admin not found...");
          admin = new ZeroUser("admin", "zero");
          Role role = roleDao.getRole("admin");
          if (role == null) {
              log.info("admin role not found...");
              role = new Role();
              role.setName("admin");
              role.addPermission(new Permission(AUTH_USER, "*", true));
              role.addPermission(new Permission(AUTH_USER_EDIT, "", false));
              role.addPermission(new Permission(AUTH_ROLE_EDIT, "", false));
              role.addPermission(new Permission(AUTH_FUNCTION_LOG, "", false));
              role.addPermission(new Permission(AUTH_CURRENT_USERS, "", false));
              role.addPermission(new Permission(AUTH_USER_CHANGE_PWD, "", false));
              log.info("creating admin role...");
              roleDao.makePersistent(role);
          }
          admin.addRole(role);
         
View Full Code Here

Examples of au.csiro.ontology.model.Role

            // Add role axioms
            for (String r1 : roles.keySet()) {
                String parentRole = roles.get(r1).get("parentrole");

                if (!"".equals(parentRole)) {
                    Role lhs = getRole(r1, ri);
                    Role rhs = getRole(parentRole, ri);
                    statedAxioms.add(new RoleInclusion(new Role[] { lhs }, rhs));
                }

                String rightId = roles.get(r1).get("rightID");
                if (!"".equals(rightId)) {
                    Role lhs1 = getRole(r1, ri);
                    Role lhs2 = getRole(rightId, ri);
                    statedAxioms.add(new RoleInclusion(new Role[] { lhs1, lhs2 }, lhs1));
                }
            }

            // Add concept axioms
View Full Code Here

Examples of au.edu.qut.yawl.admintool.model.Role

    }

    private void cleanup() throws YPersistenceException {
        Role[] roles = _model.getRoles();
        for (int i = 0; i < roles.length; i++) {
            Role role = roles[i];
            _model.deleteRole(role.getRoleName());
        }
        Resource[] resources = _model.getResources();
        for (int i = 0; i < resources.length; i++) {
            Resource resource = resources[i];
            _model.deleteResource(resource.getRsrcID());
View Full Code Here

Examples of br.eti.kinoshita.testlinkjavaapi.model.Role

      }
      return user;
    }

    public static final Role getRole(Map<String, Object> map) {
      Role role = null;
      if (map != null && map.size() > 0) {
        Object o = map.get(TestLinkResponseParams.DB_ID.toString());
        if (o != null) {
          Integer dbID = Integer.parseInt(o.toString());
          if (dbID > 0) {
            role = new Role(dbID);
            role.setDescription(getString(map, TestLinkResponseParams.DESCRIPTION.toString()));
            role.setName(getString(map, TestLinkResponseParams.NAME.toString()));
            role.setRights((Object[]) map.get(TestLinkResponseParams.RIGHTS.toString()));
          }
        }
      }
      return role;
    }
View Full Code Here

Examples of ch.entwine.weblounge.common.security.Role

  public Role[] getClosure() {
    HashSet<Role> roles = new HashSet<Role>();
    Stack<Role> stack = new Stack<Role>();
    stack.push(this);
    while (!stack.empty()) {
      Role r = stack.pop();
      roles.add(r);
      for (Role extendedRole : r.getExtendedRoles()) {
        if (!stack.contains(extendedRole))
          stack.push(extendedRole);
      }
    }
    return roles.toArray(new Role[ancestors.size()]);
View Full Code Here

Examples of cn.edu.pku.dr.requirement.elicitation.data.Role

        HashMap<String,String> roles = context.getRoles();
        roles.clear();
       
        //将此项目所拥有的角色加入环境当中
        Role role = new Role();
        role.setProjectId(project.getProjectId());
        ArrayList list = dp.query(role);
        int size = list.size();
        for(int i=0; i<size; i++) {
            role = (Role)list.get(i);
            roles.put(role.getRoleId().toString(),role.getRoleName());
        }
       
        request.getSession().setAttribute(Globals.SYS_USER_CACHE, userCache);
        returnPath = "/WEB-INF/AjaxMain.jsp";
    }
View Full Code Here

Examples of co.cubicode.rbacframework.models.Role

public class RBACTest extends ApiTest {

  @Test
  public void rbacTest() throws ObjectNotFoundException {
    User user = UserBiz.findByPrimaryKey(1L);
    Role role = RoleBiz.findByPrimaryKey(user.getRole().getId());
    List<RolePermission> ids = RolePermissionBiz.findByRoleAndApplication(role, ApplicationConstants.ADMIN);
    List<Permission> permissions = new ArrayList<Permission>();
    for (RolePermission rolePermission : ids) {
      Permission permission = PermissionBiz.findByPrimaryKey(rolePermission.getApplicationId(), rolePermission.getObjectTypeId(),
          rolePermission.getOperationTypeId());
      permissions.add(permission);
    }
    role.setPermissions(permissions);
    user.setRole(role);
    System.out.println(user);

    if (user.hasRole("administrator")) {
      System.out.println("Es administrador");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.