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 Details

    • 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 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 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 user
      strWorkgroupKey - 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 user
      strWorkgroupKey - 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