Class PermissionServiceNOOPImpl
- java.lang.Object
-
- org.alfresco.repo.security.permissions.noop.PermissionServiceNOOPImpl
-
- All Implemented Interfaces:
PermissionServiceSPI,PermissionService
public class PermissionServiceNOOPImpl extends Object implements PermissionServiceSPI
Dummy implementation of Permissions Service
-
-
Field Summary
-
Fields inherited from interface org.alfresco.service.cmr.security.PermissionService
ADD_CHILDREN, ADMINISTRATOR_AUTHORITY, ALL_AUTHORITIES, ALL_PERMISSIONS, ASPECTS, CANCEL_CHECK_OUT, CHANGE_PERMISSIONS, CHECK_IN, CHECK_OUT, CONSUMER, CONTRIBUTOR, COORDINATOR, CREATE_ASSOCIATIONS, CREATE_CHILDREN, DELETE, DELETE_ASSOCIATIONS, DELETE_CHILDREN, DELETE_NODE, EDITOR, EXECUTE, EXECUTE_CONTENT, FULL_CONTROL, GROUP_PREFIX, GUEST_AUTHORITY, LINK_CHILDREN, LOCK, LOCK_OWNER_AUTHORITY, OWNER_AUTHORITY, PROPERTIES, READ, READ_ASSOCIATIONS, READ_CHILDREN, READ_CONTENT, READ_PERMISSIONS, READ_PROPERTIES, ROLE_PREFIX, SET_OWNER, TAKE_OWNERSHIP, UNLOCK, WRITE, WRITE_CONTENT, WRITE_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description PermissionServiceNOOPImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPermission(NodeRef nodeRef, String authority)voidclearPermission(StoreRef storeRef, String authority)voiddeletePermission(PermissionEntry permissionEntry)Delete a single permission entryvoiddeletePermission(NodeRef nodeRef, String authority, String perm)voiddeletePermission(StoreRef storeRef, String authority, String permission)voiddeletePermissions(String recipient)Delete permissions for the given recipient.voiddeletePermissions(NodePermissionEntry nodePermissionEntry)Delete the permissions defined by the nodePermissionEntryvoiddeletePermissions(NodeRef nodeRef)voiddeletePermissions(StoreRef storeRef)NodePermissionEntryexplainPermission(NodeRef nodeRef, PermissionReference perm)Where is the permission set that controls the behaviour for the given permission for the given authentication to access the specified name.StringgetAllAuthorities()StringgetAllPermission()PermissionReferencegetAllPermissionReference()Get the All PermissionSet<AccessPermission>getAllSetPermissions(NodeRef nodeRef)Set<AccessPermission>getAllSetPermissions(StoreRef storeRef)Set<String>getAuthorisations()booleangetInheritParentPermissions(NodeRef nodeRef)StringgetOwnerAuthority()StringgetPermission(PermissionReference permissionReference)Get the string that can be used to identify the given permission reference.PermissionReferencegetPermissionReference(String permissionName)Get the permission reference by permission name.PermissionReferencegetPermissionReference(QName qname, String permissionName)Get the permission reference for the given data type and permission name.Set<AccessPermission>getPermissions(NodeRef nodeRef)Set<String>getReaders(Long aclId)Set<String>getReadersDenied(Long aclId)NodePermissionEntrygetSetPermissions(NodeRef nodeRef)Get the permissions that have been set on the given node (it knows nothing of the parent permissions)NodePermissionEntrygetSetPermissions(StoreRef storeRef)Get the permissions set for the storeSet<PermissionReference>getSettablePermissionReferences(NodeRef nodeRef)Get the permissions that can be set for a given typeSet<PermissionReference>getSettablePermissionReferences(QName type)Get the permissions that can be set for a given typeSet<String>getSettablePermissions(NodeRef nodeRef)Set<String>getSettablePermissions(QName type)AccessStatushasPermission(Long aclID, PermissionContext context, String permission)AccessStatushasPermission(NodeRef nodeRef, String perm)AccessStatushasPermission(NodeRef nodeRef, PermissionReference perm)Check that the given authentication has a particular permission for the given node.AccessStatushasReadPermission(NodeRef nodeRef)voidsetInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions)voidsetInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions, boolean asyncCall)voidsetPermission(NodePermissionEntry nodePermissionEntry)Set the permissions on a node.voidsetPermission(PermissionEntry permissionEntry)Add or set a permission entry on a node.voidsetPermission(NodeRef nodeRef, String authority, String perm, boolean allow)voidsetPermission(StoreRef storeRef, String authority, String permission, boolean allow)
-
-
-
Method Detail
-
getOwnerAuthority
public String getOwnerAuthority()
- Specified by:
getOwnerAuthorityin interfacePermissionService
-
getAllAuthorities
public String getAllAuthorities()
- Specified by:
getAllAuthoritiesin interfacePermissionService
-
getAllPermission
public String getAllPermission()
- Specified by:
getAllPermissionin interfacePermissionService
-
getPermissions
public Set<AccessPermission> getPermissions(NodeRef nodeRef)
- Specified by:
getPermissionsin interfacePermissionService
-
getAllSetPermissions
public Set<AccessPermission> getAllSetPermissions(NodeRef nodeRef)
- Specified by:
getAllSetPermissionsin interfacePermissionService
-
getSettablePermissions
public Set<String> getSettablePermissions(NodeRef nodeRef)
- Specified by:
getSettablePermissionsin interfacePermissionService
-
getSettablePermissions
public Set<String> getSettablePermissions(QName type)
- Specified by:
getSettablePermissionsin interfacePermissionService
-
hasPermission
public AccessStatus hasPermission(NodeRef nodeRef, String perm)
- Specified by:
hasPermissionin interfacePermissionService
-
deletePermissions
public void deletePermissions(NodeRef nodeRef)
- Specified by:
deletePermissionsin interfacePermissionService
-
deletePermission
public void deletePermission(NodeRef nodeRef, String authority, String perm)
- Specified by:
deletePermissionin interfacePermissionService
-
setPermission
public void setPermission(NodeRef nodeRef, String authority, String perm, boolean allow)
- Specified by:
setPermissionin interfacePermissionService
-
setInheritParentPermissions
public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions)
- Specified by:
setInheritParentPermissionsin interfacePermissionService
-
setInheritParentPermissions
public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions, boolean asyncCall)
- Specified by:
setInheritParentPermissionsin interfacePermissionService
-
getInheritParentPermissions
public boolean getInheritParentPermissions(NodeRef nodeRef)
- Specified by:
getInheritParentPermissionsin interfacePermissionService
-
clearPermission
public void clearPermission(NodeRef nodeRef, String authority)
- Specified by:
clearPermissionin interfacePermissionService
-
deletePermission
public void deletePermission(PermissionEntry permissionEntry)
Description copied from interface:PermissionServiceSPIDelete a single permission entry- Specified by:
deletePermissionin interfacePermissionServiceSPI- Parameters:
permissionEntry- PermissionEntry
-
deletePermissions
public void deletePermissions(NodePermissionEntry nodePermissionEntry)
Description copied from interface:PermissionServiceSPIDelete the permissions defined by the nodePermissionEntry- Specified by:
deletePermissionsin interfacePermissionServiceSPI- Parameters:
nodePermissionEntry- NodePermissionEntry
-
deletePermissions
public void deletePermissions(String recipient)
Description copied from interface:PermissionServiceSPIDelete permissions for the given recipient.- Specified by:
deletePermissionsin interfacePermissionServiceSPI- Parameters:
recipient- String
-
explainPermission
public NodePermissionEntry explainPermission(NodeRef nodeRef, PermissionReference perm)
Description copied from interface:PermissionServiceSPIWhere is the permission set that controls the behaviour for the given permission for the given authentication to access the specified name.- Specified by:
explainPermissionin interfacePermissionServiceSPI- Parameters:
nodeRef- NodeRefperm- PermissionReference- Returns:
- the node permission entry
-
getAllPermissionReference
public PermissionReference getAllPermissionReference()
Description copied from interface:PermissionServiceSPIGet the All Permission- Specified by:
getAllPermissionReferencein interfacePermissionServiceSPI- Returns:
- the All permission
-
getPermission
public String getPermission(PermissionReference permissionReference)
Description copied from interface:PermissionServiceSPIGet the string that can be used to identify the given permission reference.- Specified by:
getPermissionin interfacePermissionServiceSPI- Parameters:
permissionReference- PermissionReference- Returns:
- the permission short name
-
getPermissionReference
public PermissionReference getPermissionReference(QName qname, String permissionName)
Description copied from interface:PermissionServiceSPIGet the permission reference for the given data type and permission name.- Specified by:
getPermissionReferencein interfacePermissionServiceSPI- Parameters:
qname- - may be null if the permission name is uniquepermissionName- String- Returns:
- the permission reference
-
getPermissionReference
public PermissionReference getPermissionReference(String permissionName)
Description copied from interface:PermissionServiceSPIGet the permission reference by permission name.- Specified by:
getPermissionReferencein interfacePermissionServiceSPI- Parameters:
permissionName- String- Returns:
- the permission reference
-
getSetPermissions
public NodePermissionEntry getSetPermissions(NodeRef nodeRef)
Description copied from interface:PermissionServiceSPIGet the permissions that have been set on the given node (it knows nothing of the parent permissions)- Specified by:
getSetPermissionsin interfacePermissionServiceSPI- Parameters:
nodeRef- NodeRef- Returns:
- the node permission entry
-
getSettablePermissionReferences
public Set<PermissionReference> getSettablePermissionReferences(NodeRef nodeRef)
Description copied from interface:PermissionServiceSPIGet the permissions that can be set for a given type- Specified by:
getSettablePermissionReferencesin interfacePermissionServiceSPI- Parameters:
nodeRef- NodeRef- Returns:
- the set of permissions
-
getSettablePermissionReferences
public Set<PermissionReference> getSettablePermissionReferences(QName type)
Description copied from interface:PermissionServiceSPIGet the permissions that can be set for a given type- Specified by:
getSettablePermissionReferencesin interfacePermissionServiceSPI- Parameters:
type- QName- Returns:
- the set of permissions
-
hasPermission
public AccessStatus hasPermission(NodeRef nodeRef, PermissionReference perm)
Description copied from interface:PermissionServiceSPICheck that the given authentication has a particular permission for the given node. (The default behaviour is to inherit permissions)- Specified by:
hasPermissionin interfacePermissionServiceSPI- Parameters:
nodeRef- NodeRefperm- PermissionReference- Returns:
- the access status
-
hasPermission
public AccessStatus hasPermission(Long aclID, PermissionContext context, String permission)
- Specified by:
hasPermissionin interfacePermissionService
-
getReaders
public Set<String> getReaders(Long aclId)
- Specified by:
getReadersin interfacePermissionService
-
getReadersDenied
public Set<String> getReadersDenied(Long aclId)
- Specified by:
getReadersDeniedin interfacePermissionService
-
setPermission
public void setPermission(NodePermissionEntry nodePermissionEntry)
Description copied from interface:PermissionServiceSPISet the permissions on a node.- Specified by:
setPermissionin interfacePermissionServiceSPI- Parameters:
nodePermissionEntry- NodePermissionEntry
-
setPermission
public void setPermission(PermissionEntry permissionEntry)
Description copied from interface:PermissionServiceSPIAdd or set a permission entry on a node.- Specified by:
setPermissionin interfacePermissionServiceSPI- Parameters:
permissionEntry- PermissionEntry
-
clearPermission
public void clearPermission(StoreRef storeRef, String authority)
- Specified by:
clearPermissionin interfacePermissionService
-
deletePermission
public void deletePermission(StoreRef storeRef, String authority, String permission)
- Specified by:
deletePermissionin interfacePermissionService
-
deletePermissions
public void deletePermissions(StoreRef storeRef)
- Specified by:
deletePermissionsin interfacePermissionService
-
setPermission
public void setPermission(StoreRef storeRef, String authority, String permission, boolean allow)
- Specified by:
setPermissionin interfacePermissionService
-
getAllSetPermissions
public Set<AccessPermission> getAllSetPermissions(StoreRef storeRef)
- Specified by:
getAllSetPermissionsin interfacePermissionService
-
getSetPermissions
public NodePermissionEntry getSetPermissions(StoreRef storeRef)
Description copied from interface:PermissionServiceSPIGet the permissions set for the store- Specified by:
getSetPermissionsin interfacePermissionServiceSPI- Parameters:
storeRef- StoreRef- Returns:
- - the node permission entry
-
hasReadPermission
public AccessStatus hasReadPermission(NodeRef nodeRef)
- Specified by:
hasReadPermissionin interfacePermissionService
-
getAuthorisations
public Set<String> getAuthorisations()
- Specified by:
getAuthorisationsin interfacePermissionService
-
-