Class AdminWorkgroupService
- java.lang.Object
-
- fr.paris.lutece.portal.service.workgroup.AdminWorkgroupService
-
public final class AdminWorkgroupService extends Object
AdminWorkgroupService
-
-
Field Summary
Fields Modifier and Type Field Description static StringALL_GROUPS
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource>
Collection<E>getAuthorizedCollection(Collection<E> collection, fr.paris.lutece.api.user.User user)Filter a collection of resources for a given userstatic <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource>
Collection<E>getAuthorizedCollection(Collection<E> collection, AdminUser user)Deprecated.use getAuthorizedCollection( Collection, User )static ReferenceListgetUserWorkgroups(AdminUser user, Locale locale)Gets all workgroups of the userstatic booleanisAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, fr.paris.lutece.api.user.User user)Check if a resource should be visible to the user according its workgroupstatic booleanisAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, AdminUser user)Deprecated.use isAuthorized( AdminWorkgroupResource, User )static StringnormalizeWorkgroupKey(String strAdminWorkgroup)Normalized an empty or null workgroup key
-
-
-
Field Detail
-
ALL_GROUPS
public static final String ALL_GROUPS
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAuthorized
public static boolean isAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, fr.paris.lutece.api.user.User user)Check if a resource should be visible to the user according its workgroup- Parameters:
resource- The resource to checkuser- The current user- Returns:
- true if authorized, otherwise false
-
isAuthorized
@Deprecated public static boolean isAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, AdminUser user)
Deprecated.use isAuthorized( AdminWorkgroupResource, User )Check if a resource should be visible to the user according its workgroup- Parameters:
resource- The resource to checkuser- The current user- Returns:
- true if authorized, otherwise false
-
getAuthorizedCollection
public static <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource> Collection<E> getAuthorizedCollection(Collection<E> collection, fr.paris.lutece.api.user.User user)
Filter a collection of resources for a given user- Type Parameters:
E- The workgroup resource- Parameters:
collection- The collection to filteruser- The user- Returns:
- A filtered collection of resources
-
getAuthorizedCollection
@Deprecated public static <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource> Collection<E> getAuthorizedCollection(Collection<E> collection, AdminUser user)
Deprecated.use getAuthorizedCollection( Collection, User )Filter a collection of resources for a given user- Type Parameters:
E- The workgroup resource- Parameters:
collection- The collection to filteruser- The user- Returns:
- A filtered collection of resources
-
getUserWorkgroups
public static ReferenceList getUserWorkgroups(AdminUser user, Locale locale)
Gets all workgroups of the user- Parameters:
user- The current userlocale- The Locale- Returns:
- A list of workgroup
-
-