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)
           
static boolean checkExistWorkgroup(java.lang.String strWorkgroupKey)
          Check that the given key points to an existing 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 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)
           
static void removeUserFromWorkgroup(AdminUser user, java.lang.String strWorkgroupKey)
           
static AdminWorkgroup update(java.lang.String strWorkgroupKey, 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(java.lang.String strWorkgroupKey,
                                    AdminWorkgroup workgroup)
Update of the workgroup which is specified in parameter

Parameters:
strWorkgroupKey - the key of the workgroup to update
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 Primary key of the workgroup
Returns:
An instance of workgroup

findAll

public static java.util.Collection<AdminWorkgroup> findAll()
Returns a collection of workgroups objects

Parameters:
plugin - The current plugin using this method
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:
strNewWorkgroupKey -
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

getUserWorkgroups

public static ReferenceList getUserWorkgroups(AdminUser user)
Returns the list of all workgroups the user is member

Parameters:
user - The user

getUserListForWorkgroup

public static java.util.Collection<AdminUser> getUserListForWorkgroup(java.lang.String strWorkgroupKey)
Returns the list of all users for a workgroup

Parameters:
user - The user

addUserForWorkgroup

public static void addUserForWorkgroup(AdminUser user,
                                       java.lang.String strWorkgroupKey)
Parameters:
nUserId -
strWorkgroupKey -

removeAllUsersForWorkgroup

public static void removeAllUsersForWorkgroup(java.lang.String strWorkgroupKey)
Parameters:
strWorkgroupKey -

removeUserFromWorkgroup

public static void removeUserFromWorkgroup(AdminUser user,
                                           java.lang.String strWorkgroupKey)
Parameters:
user -
strWorkgroupKey -


Copyright © 2007 Mairie de Paris. All Rights Reserved.