Class UserManagerImpl
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.user.UserManagerImpl
-
- All Implemented Interfaces:
UserManager
@Service public class UserManagerImpl extends Object implements UserManager
A UserManager implementation built upon the silverpeas user management system.
-
-
Constructor Summary
Constructors Constructor Description UserManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
getRelatedUser(User user, String relation, String peasId)
Get a user from a given user and relationUser
getUser(String userId)
Returns the user with the given userIdUser[]
getUsers(String[] userIds)
Make a User[] from a userIds' String[].User[]
getUsersInGroup(String groupId, String modelId)
Returns all the users into given group and its sub groups.User[]
getUsersInRole(String roleName, String modelId)
Returns all the users having a given role relative to a processModel.
-
-
-
Method Detail
-
getUser
public User getUser(String userId) throws WorkflowException
Returns the user with the given userId- Specified by:
getUser
in interfaceUserManager
- Parameters:
userId
-- Returns:
- the user with the given userId.
- Throws:
WorkflowException
- if the userId is unknown.
-
getUsers
public User[] getUsers(String[] userIds) throws WorkflowException
Make a User[] from a userIds' String[].- Specified by:
getUsers
in interfaceUserManager
- Parameters:
userIds
-- Returns:
- Throws:
WorkflowException
-
getUsersInRole
public User[] getUsersInRole(String roleName, String modelId)
Description copied from interface:UserManager
Returns all the users having a given role relative to a processModel.Users in removed states are taken into account if it exists a valid replacement at the instant of method call for the given role name on the process represented by modelId parameter.
- Specified by:
getUsersInRole
in interfaceUserManager
- Parameters:
roleName
- the role name to check.modelId
- the identifier of the model which is the identifier of the component instance id.- Returns:
- an array of
User
instances corresponding to given parameters.
-
getUsersInGroup
public User[] getUsersInGroup(String groupId, String modelId)
Description copied from interface:UserManager
Returns all the users into given group and its sub groups.Users in removed states are taken into account if it exists a valid replacement at the instant of method call on the process represented by modelId parameter.
- Specified by:
getUsersInGroup
in interfaceUserManager
modelId
- the identifier of the model which is the identifier of the component instance id.- Returns:
- an array of
User
instances corresponding to given parameters.
-
getRelatedUser
public User getRelatedUser(User user, String relation, String peasId) throws WorkflowException
Get a user from a given user and relation- Specified by:
getRelatedUser
in interfaceUserManager
- Parameters:
user
- reference userrelation
- relation between given user and searched userpeasId
- the id of workflow peas associated to that information- Returns:
- the user that has the given relation with given user
- Throws:
WorkflowException
-
-