fr.paris.lutece.portal.service.workgroup
Class AdminWorkgroupService

java.lang.Object
  extended by fr.paris.lutece.portal.service.workgroup.AdminWorkgroupService

public final class AdminWorkgroupService
extends java.lang.Object

AdminWorkgroupService


Field Summary
static java.lang.String ALL_GROUPS
           
 
Method Summary
static java.util.Collection getAuthorizedCollection(java.util.Collection<? extends AdminWorkgroupResource> collection, AdminUser user)
          Filter a collection of resources for a given user
static ReferenceList getUserWorkgroups(AdminUser user, java.util.Locale locale)
          Gets all workgroups of the user
static boolean isAuthorized(AdminWorkgroupResource resource, AdminUser user)
          Check if a resource should be visible to the user according its workgroup
static java.lang.String normalizeWorkgroupKey(java.lang.String strAdminWorkgroup)
          Normalized an empty or null workgroup key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_GROUPS

public static final java.lang.String ALL_GROUPS
See Also:
Constant Field Values
Method Detail

isAuthorized

public static boolean isAuthorized(AdminWorkgroupResource resource,
                                   AdminUser user)
Check if a resource should be visible to the user according its workgroup

Parameters:
resource - The resource to check
user - The current user
Returns:
true if authorized, otherwise false

getAuthorizedCollection

public static java.util.Collection getAuthorizedCollection(java.util.Collection<? extends AdminWorkgroupResource> collection,
                                                           AdminUser user)
Filter a collection of resources for a given user

Parameters:
collection - The collection to filter
user - The user
Returns:
A filtered collection of resources

getUserWorkgroups

public static ReferenceList getUserWorkgroups(AdminUser user,
                                              java.util.Locale locale)
Gets all workgroups of the user

Parameters:
user - The current user
locale - The Locale
Returns:
A list of workgroup

normalizeWorkgroupKey

public static java.lang.String normalizeWorkgroupKey(java.lang.String strAdminWorkgroup)
Normalized an empty or null workgroup key

Parameters:
strAdminWorkgroup - The workgroup key to normalize
Returns:
The workgroup key normalized


Copyright © 2010 Mairie de Paris. All Rights Reserved.