Class AdminWorkgroupHome
- java.lang.Object
-
- fr.paris.lutece.portal.business.workgroup.AdminWorkgroupHome
-
public final class AdminWorkgroupHome extends Object
This class provides instances management methods (create, find, ...) for AdminWorkgroup objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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(String strWorkgroupKey)Remove 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 Detail
-
create
public static AdminWorkgroup create(AdminWorkgroup workgroup)
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
public static AdminWorkgroup update(AdminWorkgroup workgroup)
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
public static void remove(String strWorkgroupKey)
Remove the AdminWorkgroup whose identifier is specified in parameter- Parameters:
strWorkgroupKey- The AdminWorkgroup object to remove
-
findByPrimaryKey
public static AdminWorkgroup findByPrimaryKey(String strWorkgroupKey)
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
public static Collection<AdminWorkgroup> findAll()
Returns a collection of workgroups objects- Returns:
- A collection of workgroups
-
checkExistWorkgroup
public static boolean checkExistWorkgroup(String strWorkgroupKey)
Check that the given key points to an existing workgroup- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- true if the workgroup exists, false otherwise
-
isUserInWorkgroup
public static boolean isUserInWorkgroup(AdminUser user, String strWorkgroup)
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
public static ReferenceList getUserWorkgroups(AdminUser user)
Returns the list of all workgroups the user is member- Parameters:
user- The user- Returns:
- A reference list of all user's workgroups
-
getUserListForWorkgroup
public static Collection<AdminUser> getUserListForWorkgroup(String strWorkgroupKey)
Returns the list of all users for a workgroup- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- A list of all users of the workgroup
-
addUserForWorkgroup
public static void addUserForWorkgroup(AdminUser user, String strWorkgroupKey)
Add user to the workgroup- Parameters:
user- The userstrWorkgroupKey- The workgroup key
-
removeAllUsersForWorkgroup
public static void removeAllUsersForWorkgroup(String strWorkgroupKey)
Remove all users of a workgroup- Parameters:
strWorkgroupKey- The workgroup key
-
removeUserFromWorkgroup
public static void removeUserFromWorkgroup(AdminUser user, String strWorkgroupKey)
Remove an user from a workgroup- Parameters:
user- The userstrWorkgroupKey- The workgroup key
-
findByFilter
public static Collection<AdminWorkgroup> findByFilter(AdminWorkgroupFilter awFilter)
Find workgroups from a filter- Parameters:
awFilter- the filter- Returns:
- the list of workgroups
-
-