org.jbpm.userprofile
Class UserProfileManager

java.lang.Object
  extended by org.jbpm.userprofile.UserProfileManager

@Scope(value=APPLICATION)
@Startup
@Name(value="userProfileManager")
public class UserProfileManager
extends Object

userProfileManager retrieves and update user profile using a pluggable UserProfileRepository. UserProfileRepository is normally implemented by application users based on the persistent mechanism (for example property file based, RMDB based, LDAP based etc) as well as the data schema that is used by users' application. Following snippet shows how to configure UserProfileRepository in components.xml. org.drools.task.MockFileBasedUserProfileRepository


Constructor Summary
UserProfileManager()
           
 
Method Summary
 List<Group> getFlattenedGroupsForUser(String userId)
          Return a list of all the direct groups and all the sub groups that the user belongs to.
 String[] getGroupIds()
          Return a list of Ids of all registered groups instead of fully populated Group classes.
 List<Group> getGroups()
          Return all registered users
 List<Group> getGroupsForUser(String userId)
          Return a list of all the groups that the user belongs to.
 User getUser()
          Return current user.
 User getUser(String userId)
          Return the user according to the userId.
 String[] getUserIds()
          Return a list of Ids of all registered users instead of fully populated User classes.
 UserProfileRepository getUserProfileRepository()
           
 List<User> getUsers()
          Return all registered users
 void setUserProfileRepository(UserProfileRepository userProfileRepository)
           
 void updateUser(User user)
          Update user info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProfileManager

public UserProfileManager()
Method Detail

getUser

public User getUser()
Return current user.

Returns:
User

getUser

public User getUser(String userId)
Return the user according to the userId.

Returns:
User

updateUser

public void updateUser(User user)
Update user info


getUsers

public List<User> getUsers()
Return all registered users

Returns:
List, a list of all registered users

getUserIds

public String[] getUserIds()
Return a list of Ids of all registered users instead of fully populated User classes.

Returns:
String[], a list of all registered users' id.

getGroups

public List<Group> getGroups()
Return all registered users

Returns:
List, a list of all registered groups

getGroupIds

public String[] getGroupIds()
Return a list of Ids of all registered groups instead of fully populated Group classes.

Returns:
String[], a list of all registered groups' id.

getGroupsForUser

public List<Group> getGroupsForUser(String userId)
Return a list of all the groups that the user belongs to.

Parameters:
userId - Id of the user.
Returns:
List, a list of groups that the user belongs to.

getFlattenedGroupsForUser

public List<Group> getFlattenedGroupsForUser(String userId)
Return a list of all the direct groups and all the sub groups that the user belongs to.

Parameters:
userId - Id of the user.
Returns:
List, a list of all the direct groups and all the sub groups that the user belongs to.

getUserProfileRepository

public UserProfileRepository getUserProfileRepository()

setUserProfileRepository

public void setUserProfileRepository(UserProfileRepository userProfileRepository)


Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.