Class ModelPermissionEntry
- java.lang.Object
-
- org.alfresco.repo.security.permissions.impl.model.ModelPermissionEntry
-
- All Implemented Interfaces:
XMLModelInitialisable,PermissionEntry
public class ModelPermissionEntry extends java.lang.Object implements PermissionEntry, XMLModelInitialisable
Support to read and store the definion of a permission entry.- Author:
- andyh
-
-
Constructor Summary
Constructors Constructor Description ModelPermissionEntry(org.alfresco.service.cmr.repository.NodeRef nodeRef)Create a permission model entry with the given node context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.alfresco.service.cmr.security.AccessStatusgetAccessStatus()Get the Access enum valuejava.lang.StringgetAuthority()Get the authority to which this entry applies This could be the string value of a username, group, role or any other authority assigned to the authorisation.org.alfresco.service.cmr.repository.NodeRefgetNodeRef()Get the node ref for the node to which this permission applies.PermissionReferencegetPermissionReference()Get the permission definition.intgetPosition()Return the position in the inhertance chain (0 is not inherited and set on the object)java.lang.StringgetRecipient()Synonym for authorityvoidinitialise(org.dom4j.Element element, org.alfresco.service.namespace.NamespacePrefixResolver nspr, PermissionModel permissionModel)booleanisAllowed()Is permission allowed?booleanisDenied()Is permissions denied?booleanisInherited()Is this permission inherited?
-
-
-
Method Detail
-
getPermissionReference
public PermissionReference getPermissionReference()
Description copied from interface:PermissionEntryGet the permission definition. This may be null. Null implies that the settings apply to all permissions- Specified by:
getPermissionReferencein interfacePermissionEntry- Returns:
- PermissionReference
-
getAuthority
public java.lang.String getAuthority()
Description copied from interface:PermissionEntryGet the authority to which this entry applies This could be the string value of a username, group, role or any other authority assigned to the authorisation. If null then this applies to all.- Specified by:
getAuthorityin interfacePermissionEntry- Returns:
- String
-
getRecipient
public java.lang.String getRecipient()
Synonym for authority- Returns:
- recipient/authority
-
getNodeRef
public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
Description copied from interface:PermissionEntryGet the node ref for the node to which this permission applies. This can only be null for a global permission- Specified by:
getNodeRefin interfacePermissionEntry- Returns:
- NodeRef
-
isDenied
public boolean isDenied()
Description copied from interface:PermissionEntryIs permissions denied?- Specified by:
isDeniedin interfacePermissionEntry
-
isAllowed
public boolean isAllowed()
Description copied from interface:PermissionEntryIs permission allowed?- Specified by:
isAllowedin interfacePermissionEntry
-
getAccessStatus
public org.alfresco.service.cmr.security.AccessStatus getAccessStatus()
Description copied from interface:PermissionEntryGet the Access enum value- Specified by:
getAccessStatusin interfacePermissionEntry- Returns:
- AccessStatus
-
initialise
public void initialise(org.dom4j.Element element, org.alfresco.service.namespace.NamespacePrefixResolver nspr, PermissionModel permissionModel)- Specified by:
initialisein interfaceXMLModelInitialisable
-
getPosition
public int getPosition()
Description copied from interface:PermissionEntryReturn the position in the inhertance chain (0 is not inherited and set on the object)- Specified by:
getPositionin interfacePermissionEntry- Returns:
- int
-
isInherited
public boolean isInherited()
Description copied from interface:PermissionEntryIs this permission inherited?- Specified by:
isInheritedin interfacePermissionEntry- Returns:
- boolean
-
-