com.silverpeas.workflow.engine.user
Class UserManagerImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.user.UserManagerImpl
All Implemented Interfaces:
UserManager

public class UserManagerImpl
extends Object
implements UserManager

A UserManager implementation built upon the silverpeas user management system.


Constructor Summary
UserManagerImpl()
          The constructor builds and set the shared OrganisationController.
 
Method Summary
 UserSettings getEmptyUserSettings(String userId, String peasId)
          Get an empty user settings in database The full list of information is described in the process model
 User getRelatedUser(User user, String relation, String peasId)
          Get a user from a given user and relation
 String[] getRoleNames(User user, String modelId)
          Returns all the roles of a given user relative to a processModel.
 User getUser(String userId)
          Returns the user with the given userId
 String[] getUserInfoNames()
          returns all the known info for an user; Each returned value can be used as a parameter to the User method getInfo().
 User[] getUsers(String[] userIds)
          Make a User[] from a userIds' String[].
 UserSettings getUserSettings(String userId, String peasId)
          Get the user settings in database The full list of information is described in the process model
 User[] getUsersInGroup(String groupId)
           
 User[] getUsersInRole(String roleName, String modelId)
          Returns all the users having a given role relative to a processModel.
 void resetUserSettings(String userId, String peasId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManagerImpl

public UserManagerImpl()
The constructor builds and set the shared OrganisationController.

Method Detail

getUser

public User getUser(String userId)
             throws WorkflowException
Returns the user with the given userId

Specified by:
getUser in interface UserManager
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 interface UserManager
Parameters:
userIds -
Returns:
Throws:
WorkflowException

getRoleNames

public String[] getRoleNames(User user,
                             String modelId)
                      throws WorkflowException
Returns all the roles of a given user relative to a processModel.

Specified by:
getRoleNames in interface UserManager
Parameters:
user -
modelId -
Returns:
Throws:
WorkflowException

getUsersInRole

public User[] getUsersInRole(String roleName,
                             String modelId)
                      throws WorkflowException
Returns all the users having a given role relative to a processModel.

Specified by:
getUsersInRole in interface UserManager
Parameters:
roleName -
modelId -
Returns:
Throws:
WorkflowException

getUsersInGroup

public User[] getUsersInGroup(String groupId)
Specified by:
getUsersInGroup in interface UserManager

getUserInfoNames

public String[] getUserInfoNames()
returns all the known info for an user; Each returned value can be used as a parameter to the User method getInfo().

Specified by:
getUserInfoNames in interface UserManager
Returns:

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 interface UserManager
Parameters:
user - reference user
relation - relation between given user and searched user
peasId - the id of workflow peas associated to that information
Returns:
the user that has the given relation with given user
Throws:
WorkflowException

getUserSettings

public UserSettings getUserSettings(String userId,
                                    String peasId)
                             throws WorkflowException
Get the user settings in database The full list of information is described in the process model

Specified by:
getUserSettings in interface UserManager
Parameters:
userId - the user Id
peasId - the id of workflow peas associated to that information
Returns:
UserSettings
Throws:
WorkflowException
See Also:
ProcessModel

resetUserSettings

public void resetUserSettings(String userId,
                              String peasId)
                       throws WorkflowException
Specified by:
resetUserSettings in interface UserManager
Parameters:
userId -
peasId -
Throws:
WorkflowException

getEmptyUserSettings

public UserSettings getEmptyUserSettings(String userId,
                                         String peasId)
Get an empty user settings in database The full list of information is described in the process model

Specified by:
getEmptyUserSettings in interface UserManager
Parameters:
userId - the user Id
peasId - the id of workflow peas associated to that information
Returns:
UserSettings
See Also:
ProcessModel


Copyright © 2016 Silverpeas. All Rights Reserved.