fr.paris.lutece.portal.business.workgroup
Class AdminWorkgroupHome

java.lang.Object
  extended by fr.paris.lutece.portal.business.workgroup.AdminWorkgroupHome

public final class AdminWorkgroupHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for AdminWorkgroup objects


Method Summary
static void addUserForWorkgroup(AdminUser user, java.lang.String strWorkgroupKey)
          Add user to the workgroup
static boolean checkExistWorkgroup(java.lang.String strWorkgroupKey)
          Check that the given key points to an existing workgroup
static boolean checkUserHasWorkgroup(int nIdUser)
          Is the user member of the workgroup
static AdminWorkgroup create(AdminWorkgroup workgroup)
          Creation of an instance of workgroup
static java.util.Collection<AdminWorkgroup> findAll()
          Returns a collection of workgroups objects
static java.util.Collection<AdminWorkgroup> findByFilter(AdminWorkgroupFilter awFilter)
          Find workgroups from a filter
static AdminWorkgroup findByPrimaryKey(java.lang.String strWorkgroupKey)
          Returns an instance of a workgroup whose identifier is specified in parameter
static java.util.Collection<AdminUser> getUserListForWorkgroup(java.lang.String strWorkgroupKey)
          Returns the list of all users for a workgroup
static ReferenceList getUserWorkgroups(AdminUser user)
          Returns the list of all workgroups the user is member
static boolean isUserInWorkgroup(AdminUser user, java.lang.String strWorkgroup)
          Is the user member of the workgroup
static void remove(java.lang.String strWorkgroupKey)
          Remove the AdminWorkgroup whose identifier is specified in parameter
static void removeAllUsersForWorkgroup(java.lang.String strWorkgroupKey)
          Remove all users of a workgroup
static void removeUserFromWorkgroup(AdminUser user, java.lang.String strWorkgroupKey)
          Remove an user from a workgroup
static AdminWorkgroup update(AdminWorkgroup workgroup)
          Update of the workgroup which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.lang.String strWorkgroupKey)
Remove the AdminWorkgroup whose identifier is specified in parameter

Parameters:
strWorkgroupKey - The AdminWorkgroup object to remove

findByPrimaryKey

public static AdminWorkgroup findByPrimaryKey(java.lang.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 java.util.Collection<AdminWorkgroup> findAll()
Returns a collection of workgroups objects

Returns:
A collection of workgroups

checkExistWorkgroup

public static boolean checkExistWorkgroup(java.lang.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,
                                        java.lang.String strWorkgroup)
Is the user member of the workgroup

Parameters:
user - The user
strWorkgroup - 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 java.util.Collection<AdminUser> getUserListForWorkgroup(java.lang.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,
                                       java.lang.String strWorkgroupKey)
Add user to the workgroup

Parameters:
user - The user
strWorkgroupKey - The workgroup key

removeAllUsersForWorkgroup

public static void removeAllUsersForWorkgroup(java.lang.String strWorkgroupKey)
Remove all users of a workgroup

Parameters:
strWorkgroupKey - The workgroup key

removeUserFromWorkgroup

public static void removeUserFromWorkgroup(AdminUser user,
                                           java.lang.String strWorkgroupKey)
Remove an user from a workgroup

Parameters:
user - The user
strWorkgroupKey - The workgroup key

findByFilter

public static java.util.Collection<AdminWorkgroup> findByFilter(AdminWorkgroupFilter awFilter)
Find workgroups from a filter

Parameters:
awFilter - the filter
Returns:
the list of workgroups


Copyright © 2012 Mairie de Paris. All Rights Reserved.