Package org.activiti.engine.impl.persistence.entity

Examples of org.activiti.engine.impl.persistence.entity.GroupEntity


    public GroupQuery desc() {
        return this;
    }

    private Group fromSyncopeRole(SyncopeRole role) {
        return new GroupEntity(role.getId().toString());
    }
View Full Code Here


        logger.debug("findGroupsByUser : {}", userId);

        List<Group> groups = new ArrayList<Group>();

        for (OrgDTO orgDto : orgConnector.getOrgsByUserId(userId)) {
            GroupEntity groupEntity = new GroupEntity(orgDto.getId());
            groupEntity.setName(orgDto.getName());
            groupEntity.setType(orgDto.getTypeName());
            groups.add(groupEntity);
        }

        return groups;
    }
View Full Code Here

        List<Group> result = Collections.EMPTY_LIST;
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new ArrayList<Group>();
            for (Long roleId : user.getRoleIds()) {
                result.add(new GroupEntity(roleId.toString()));
            }
        }

        return result;
    }
View Full Code Here

    public GroupQuery desc() {
        return this;
    }

    private Group fromSyncopeRole(SyncopeRole role) {
        return new GroupEntity(role.getId().toString());
    }
View Full Code Here

        throw new UnsupportedOperationException();
    }

    @Override
    public GroupEntity findGroupById(final String groupId) {
        GroupEntity result = null;

        SyncopeRole role = null;
        try {
            role = roleDAO.find(Long.valueOf(groupId));
        } catch (NumberFormatException e) {
        }
        if (role != null) {
            result = new GroupEntity(groupId);
        }

        return result;
    }
View Full Code Here

        List<Group> result = Collections.EMPTY_LIST;
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new ArrayList<Group>();
            for (Long roleId : user.getRoleIds()) {
                result.add(new GroupEntity(roleId.toString()));
            }
        }

        return result;
    }
View Full Code Here

          String baseDn = ldapConfigurator.getGroupBaseDn() != null ? ldapConfigurator.getGroupBaseDn() : ldapConfigurator.getBaseDn();
          NamingEnumeration< ? > namingEnum = initialDirContext.search(baseDn, searchExpression, createSearchControls());
          while (namingEnum.hasMore()) { // Should be only one
            SearchResult result = (SearchResult) namingEnum.next();
           
            GroupEntity group = new GroupEntity();
            if (ldapConfigurator.getGroupIdAttribute() != null) {
              group.setId(result.getAttributes().get(ldapConfigurator.getGroupIdAttribute()).get().toString());
            }
            if (ldapConfigurator.getGroupNameAttribute() != null) {
              group.setName(result.getAttributes().get(ldapConfigurator.getGroupNameAttribute()).get().toString());
            }
            if (ldapConfigurator.getGroupTypeAttribute() != null) {
              group.setType(result.getAttributes().get(ldapConfigurator.getGroupTypeAttribute()).get().toString());
            }
            groups.add(group);
          }
         
          namingEnum.close();
View Full Code Here

        List<Group> result = Collections.emptyList();
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new ArrayList<Group>();
            for (Long roleId : user.getRoleIds()) {
                result.add(new GroupEntity(roleId.toString()));
            }
        }

        return result;
    }
View Full Code Here

        List<Group> result = Collections.emptyList();
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new ArrayList<Group>();
            for (Long roleId : user.getRoleIds()) {
                result.add(new GroupEntity(roleId.toString()));
            }
        }

        return result;
    }
View Full Code Here

    }
    LdapConnection connection = LDAPConnectionUtil.openConnection(connectionParams);
    try {
      Cursor<SearchResponse> cursor = connection.search(GROUP_ENTRY, searchQuery.toString(), SearchScope.ONELEVEL, "*");
      while (cursor.next()) {
        Group group = new GroupEntity();
        SearchResultEntry response = (SearchResultEntry) cursor.get();
        Iterator<EntryAttribute> itEntry = response.getEntry().iterator();
        while(itEntry.hasNext()) {
          EntryAttribute attribute = itEntry.next();
          String key = attribute.getId();
          if("cn".equalsIgnoreCase(key)) {
            group.setId(attribute.getString());
            group.setName(attribute.getString());
          }
        }

        groupList.add(group);
      }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.persistence.entity.GroupEntity

Copyright © 2018 www.massapicom. 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.