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

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


            NamingEnumeration< ? > namingEnum = initialDirContext.search(baseDn, searchExpression, createSearchControls());
           
            while (namingEnum.hasMore()) {
              SearchResult searchResult = (SearchResult) namingEnum.next();
             
              UserEntity user = new UserEntity();
              mapSearchResultToUser(searchResult, user);
              result.add(user);
             
            }
            namingEnum.close();
View Full Code Here


        return result;
    }

    @Override
    public UserEntity findUserById(final String userId) {
        UserEntity result = null;
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new UserEntity(userId);
        }

        return result;
    }
View Full Code Here

    public UserQuery desc() {
        return this;
    }

    private User fromSyncopeUser(final SyncopeUser syncopeUser) {
        return new UserEntity(syncopeUser.getUsername());
    }
View Full Code Here

  public Picture execute(CommandContext commandContext) {
    if(userId == null) {
      throw new ActivitiException("userId is null");
    }
    UserEntity user = (UserEntity) commandContext
      .getUserManager()
      .findUserById(userId);
    if(user == null) {
      throw new ActivitiException("user "+userId+" doesn't exist");
    }
    return user.getPicture();
  }
View Full Code Here

    }
    LdapConnection connection = LDAPConnectionUtil.openConnection(connectionParams);
    try {
      Cursor<SearchResponse> cursor = connection.search(USER_GROUP, searchQuery.toString(), SearchScope.ONELEVEL, "*");
      while (cursor.next()) {
        User user = new UserEntity();
        SearchResultEntry response = (SearchResultEntry) cursor.get();
        Iterator<EntryAttribute> itEntry = response.getEntry().iterator();
        while(itEntry.hasNext()) {
          EntryAttribute attribute = itEntry.next();
          String key = attribute.getId();
          if("uid".equalsIgnoreCase(key)) {
            user.setId(attribute.getString());
           
          } else if("sn".equalsIgnoreCase(key)) {
            user.setLastName(attribute.getString());
         
          } else if("cn".equalsIgnoreCase(key)) {
            user.setFirstName(attribute.getString().substring(0, attribute.getString().indexOf(" ")));
          }
        }

        userList.add(user);
      }
View Full Code Here

TOP

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

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.