Class AdminWorkgroupHome
java.lang.Object
fr.paris.lutece.portal.business.workgroup.AdminWorkgroupHome
This class provides instances management methods (create, find, ...) for AdminWorkgroup objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddUserForWorkgroup(AdminUser user, String strWorkgroupKey) Add user to the workgroupstatic booleancheckExistWorkgroup(String strWorkgroupKey) Check that the given key points to an existing workgroupstatic booleancheckUserHasWorkgroup(int nIdUser) Is the user member of the workgroupstatic AdminWorkgroupcreate(AdminWorkgroup workgroup) Creation of an instance of workgroupstatic Collection<AdminWorkgroup>findAll()Returns a collection of workgroups objectsstatic Collection<AdminWorkgroup>findByFilter(AdminWorkgroupFilter awFilter) Find workgroups from a filterstatic AdminWorkgroupfindByPrimaryKey(String strWorkgroupKey) Returns an instance of a workgroup whose identifier is specified in parameterstatic Collection<AdminUser>getUserListForWorkgroup(String strWorkgroupKey) Returns the list of all users for a workgroupstatic ReferenceListgetUserWorkgroups(AdminUser user) Returns the list of all workgroups the user is memberstatic booleanisUserInWorkgroup(AdminUser user, String strWorkgroup) Is the user member of the workgroupstatic voidRemove the AdminWorkgroup whose identifier is specified in parameterstatic voidremoveAllUsersForWorkgroup(String strWorkgroupKey) Remove all users of a workgroupstatic voidremoveUserFromWorkgroup(AdminUser user, String strWorkgroupKey) Remove an user from a workgroupstatic AdminWorkgroupupdate(AdminWorkgroup workgroup) Update of the workgroup which is specified in parameter
-
Method Details
-
create
Creation of an instance of workgroup- Parameters:
workgroup- The instance of the workgroup which contains the informations to store- Returns:
- The instance of workgroup which has been created with its primary key.
-
update
Update of the workgroup which is specified in parameter- Parameters:
workgroup- The instance of the workgroup which contains the new data to store- Returns:
- The instance of the workgroup which has been updated
-
remove
Remove the AdminWorkgroup whose identifier is specified in parameter- Parameters:
strWorkgroupKey- The AdminWorkgroup object to remove
-
findByPrimaryKey
Returns an instance of a workgroup whose identifier is specified in parameter- Parameters:
strWorkgroupKey- The key of the workgroup- Returns:
- An instance of workgroup
-
findAll
Returns a collection of workgroups objects- Returns:
- A collection of workgroups
-
checkExistWorkgroup
Check that the given key points to an existing workgroup- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- true if the workgroup exists, false otherwise
-
isUserInWorkgroup
Is the user member of the workgroup- Parameters:
user- The userstrWorkgroup- The workgroup key- Returns:
- True if the user is in the workgroup, otherwise false
-
checkUserHasWorkgroup
public static boolean checkUserHasWorkgroup(int nIdUser) Is the user member of the workgroup- Parameters:
nIdUser- The user identifier- Returns:
- True if the user is in a workgroup, otherwise false
-
getUserWorkgroups
Returns the list of all workgroups the user is member- Parameters:
user- The user- Returns:
- A reference list of all user's workgroups
-
getUserListForWorkgroup
Returns the list of all users for a workgroup- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- A list of all users of the workgroup
-
addUserForWorkgroup
Add user to the workgroup- Parameters:
user- The userstrWorkgroupKey- The workgroup key
-
removeAllUsersForWorkgroup
Remove all users of a workgroup- Parameters:
strWorkgroupKey- The workgroup key
-
removeUserFromWorkgroup
Remove an user from a workgroup- Parameters:
user- The userstrWorkgroupKey- The workgroup key
-
findByFilter
Find workgroups from a filter- Parameters:
awFilter- the filter- Returns:
- the list of workgroups
-