Class PermissionModel
java.lang.Object
org.alfresco.repo.security.permissions.impl.model.PermissionModel
- All Implemented Interfaces:
ModelDAO
The implementation of the model DAO Reads and stores the top level model information Encapsulates access to this information
- Author:
- andyh
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPermissionModel(String model) Adds a permission modelbooleancheckPermission(PermissionReference required) Is this permission refernece to a permission and not a permissoinSet?Get all exposed permissions (regardless of type exposure)Get all exposed permissions (regardless of type exposure)getAllPermissions(NodeRef nodeRef) Get the permissions that can be set for the given node.getAllPermissions(QName type) Get the permissions that can be set for the given type.getAllPermissions(QName typeName, Set<QName> aspects) Get the permissions that can be set for the given type.Set the default access statusGet the default acces status for the givne permissiongetExposedPermissions(NodeRef nodeRef) Get the permissions that are exposed to be set for the given node.getExposedPermissions(QName type) Get the permissions that are exposed to be set for the given type.Set<? extends PermissionEntry>Get the global permissions for the model.getGranteePermissions(PermissionReference permissionReference) Get the permissions which are granted by the supplied permission.getGrantingPermissions(PermissionReference permissionReference) Get all the permissions that grant this permission.getImmediateGranteePermissions(PermissionReference permissionReference) Get the permissions which are granted by the supplied permission.getPermissionReference(QName qname, String permissionName) Find a permission by name in the type context.Get the permission sets by typegetRequiredPermissions(PermissionReference required, QName qName, Set<QName> aspectQNames, RequiredPermission.On on) Get the permissions that must also be present on the node for the required permission to apply.booleanhasFull(PermissionReference permissionReference) Does this permission allow full control?voidinit()Adds themodel.booleanisUnique(PermissionReference permissionReference) Does the permission reference have a unique name?voidsetDictionaryService(DictionaryService dictionaryService) Set the dictionary servicevoidsetDtdSchema(String dtdSchema) Set the dtd schema that is used to validate permission modelvoidSet the modelvoidsetNodeService(NodeService nodeService) Set the node servicevoidsetValidate(boolean validate) Indicates whether model should be validated on initialization against specified dtd
-
Constructor Details
-
PermissionModel
public PermissionModel()Default constructor
-
-
Method Details
-
setModel
Set the model- Parameters:
model- String
-
setDtdSchema
Set the dtd schema that is used to validate permission model- Parameters:
dtdSchema- String
-
setValidate
public void setValidate(boolean validate) Indicates whether model should be validated on initialization against specified dtd- Parameters:
validate- boolean
-
setDictionaryService
Set the dictionary service- Parameters:
dictionaryService- DictionaryService
-
setNodeService
Set the node service- Parameters:
nodeService- NodeService
-
init
public void init()Adds themodel. -
addPermissionModel
Adds a permission model- Parameters:
model- path to the permission model to add
-
getDefaultPermission
Set the default access status- Returns:
- the default access status
-
getDefaultPermission
Get the default acces status for the givne permission- Parameters:
pr- PermissionReference- Returns:
- the access status
-
getGlobalPermissionEntries
Description copied from interface:ModelDAOGet the global permissions for the model. Permissions that apply to all nodes and take precedence over node specific permissions.- Specified by:
getGlobalPermissionEntriesin interfaceModelDAO- Returns:
- Set
-
getPermissionSets
Get the permission sets by type- Returns:
- the permission sets by type
-
getAllPermissions
Description copied from interface:ModelDAOGet the permissions that can be set for the given type.- Specified by:
getAllPermissionsin interfaceModelDAO- Parameters:
type- - the type in the data dictionary.
-
getExposedPermissions
Description copied from interface:ModelDAOGet the permissions that are exposed to be set for the given type.- Specified by:
getExposedPermissionsin interfaceModelDAO- Parameters:
type- - the type in the data dictionary.
-
getAllPermissions
Description copied from interface:ModelDAOGet the permissions that can be set for the given node. This is determined by the node type.- Specified by:
getAllPermissionsin interfaceModelDAO- Parameters:
nodeRef- NodeRef
-
getExposedPermissions
Description copied from interface:ModelDAOGet the permissions that are exposed to be set for the given node. This is determined by the node type.- Specified by:
getExposedPermissionsin interfaceModelDAO- Parameters:
nodeRef- NodeRef
-
getAllPermissions
Description copied from interface:ModelDAOGet the permissions that can be set for the given type.- Specified by:
getAllPermissionsin interfaceModelDAO- Parameters:
typeName- - the type in the data dictionary.
-
getGrantingPermissions
Description copied from interface:ModelDAOGet all the permissions that grant this permission.- Specified by:
getGrantingPermissionsin interfaceModelDAO- Parameters:
permissionReference- PermissionReference
-
checkPermission
Description copied from interface:ModelDAOIs this permission refernece to a permission and not a permissoinSet?- Specified by:
checkPermissionin interfaceModelDAO- Parameters:
required- PermissionReference- Returns:
- boolean
-
getGranteePermissions
Description copied from interface:ModelDAOGet the permissions which are granted by the supplied permission.- Specified by:
getGranteePermissionsin interfaceModelDAO- Parameters:
permissionReference- PermissionReference
-
getImmediateGranteePermissions
public Set<PermissionReference> getImmediateGranteePermissions(PermissionReference permissionReference) Description copied from interface:ModelDAOGet the permissions which are granted by the supplied permission.- Specified by:
getImmediateGranteePermissionsin interfaceModelDAO- Parameters:
permissionReference- PermissionReference
-
getPermissionReference
Description copied from interface:ModelDAOFind a permission by name in the type context. If the context is null and the permission name is unique it will be found.- Specified by:
getPermissionReferencein interfaceModelDAO- Parameters:
qname- QNamepermissionName- String- Returns:
- PermissionReference
-
getRequiredPermissions
public Set<PermissionReference> getRequiredPermissions(PermissionReference required, QName qName, Set<QName> aspectQNames, RequiredPermission.On on) Description copied from interface:ModelDAOGet the permissions that must also be present on the node for the required permission to apply.- Specified by:
getRequiredPermissionsin interfaceModelDAO- Parameters:
required- PermissionReferenceqName- QNameon- RequiredPermission.On
-
getUnconditionalRequiredPermissions
public Set<PermissionReference> getUnconditionalRequiredPermissions(PermissionReference required, RequiredPermission.On on) - Specified by:
getUnconditionalRequiredPermissionsin interfaceModelDAO
-
isUnique
Description copied from interface:ModelDAODoes the permission reference have a unique name? -
getAllExposedPermissions
Description copied from interface:ModelDAOGet all exposed permissions (regardless of type exposure)- Specified by:
getAllExposedPermissionsin interfaceModelDAO
-
hasFull
Description copied from interface:ModelDAODoes this permission allow full control? -
getAllPermissions
Description copied from interface:ModelDAOGet all exposed permissions (regardless of type exposure)- Specified by:
getAllPermissionsin interfaceModelDAO
-