org.nuxeo.ecm.core.security
Class DefaultPermissionProvider
java.lang.Object
org.nuxeo.ecm.core.security.DefaultPermissionProvider
- All Implemented Interfaces:
- PermissionProvider, PermissionProviderLocal
public class DefaultPermissionProvider
- extends Object
- implements PermissionProviderLocal
- Author:
- Bogdan Stefanescu, Olivier Grisel
DefaultPermissionProvider
public DefaultPermissionProvider()
getUserVisiblePermissionDescriptors
public List<UserVisiblePermission> getUserVisiblePermissionDescriptors(String typeName)
throws ClientException
- Specified by:
getUserVisiblePermissionDescriptors
in interface PermissionProvider
- Parameters:
typeName
- the name of a Core type of the document whose ACP is to
be edited by the user
- Returns:
- get the sorted list of UserVisiblePermission objects to be used in the
permission management screen of the UI (be it web based, a rich
client or any-thing else) ; if no specific permissions are
registered for typeName, the default list is returned
- Throws:
ClientException
getUserVisiblePermissionDescriptors
public List<UserVisiblePermission> getUserVisiblePermissionDescriptors()
throws ClientException
- Specified by:
getUserVisiblePermissionDescriptors
in interface PermissionProvider
- Returns:
- get the sorted list of UserVisiblePermission objects to be used in the
permission management screen of the UI (be it web based, a rich
client or any-thing else)
- Throws:
ClientException
getSubPermissions
public String[] getSubPermissions(String perm)
throws ClientException
- Specified by:
getSubPermissions
in interface PermissionProvider
- Parameters:
perm
- the name of a registered compound permission
- Returns:
- the list of permission names of sub-permissions of 'perm'
- Throws:
ClientException
- if 'perm' is not a registered permission
getAliasPermissions
public String[] getAliasPermissions(String perm)
throws ClientException
- Specified by:
getAliasPermissions
in interface PermissionProvider
- Parameters:
perm
- the name of a registered permission
- Returns:
- the list of alias permissions to 'perm'
- Throws:
ClientException
- if 'perm' is not a registered permission
getPermissionGroups
public String[] getPermissionGroups(String perm)
- Specified by:
getPermissionGroups
in interface PermissionProvider
- Parameters:
perm
- the name of a registered permissions that belongs to
permission groups (aka compound permissions)
- Returns:
- an array of a all compound permissions 'perm' is a sub-permission
of, directly or not ; returns null if 'perm' is not registered or
if 'perm' does not belong to any compound permission
getPermissions
public String[] getPermissions()
- Specified by:
getPermissions
in interface PermissionProvider
- Returns:
- an array of a all registered permission names
registerDescriptor
public void registerDescriptor(PermissionDescriptor descriptor)
throws Exception
- Specified by:
registerDescriptor
in interface PermissionProviderLocal
- Throws:
Exception
unregisterDescriptor
public void unregisterDescriptor(PermissionDescriptor descriptor)
- Specified by:
unregisterDescriptor
in interface PermissionProviderLocal
registerDescriptor
public void registerDescriptor(PermissionVisibilityDescriptor descriptor)
- Specified by:
registerDescriptor
in interface PermissionProviderLocal
unregisterDescriptor
public void unregisterDescriptor(PermissionVisibilityDescriptor descriptor)
- Specified by:
unregisterDescriptor
in interface PermissionProviderLocal
Copyright © 2011 Nuxeo SAS. All Rights Reserved.