Interface ModelSecurityService
- All Known Implementing Classes:
ModelSecurityServiceImpl
@AlfrescoPublicApi
public interface ModelSecurityService
Model security service interface.
- Since:
- 2.1
- Author:
- Roy Wetherall
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canEditProtectedAspect
(NodeRef nodeRef, QName aspect) Indicates whether the current user can edit (ie add or remove) a protected aspect in the context of a given node.boolean
canEditProtectedProperty
(NodeRef nodeRef, QName property) Indicates whether the current user can edit a protected property in the context of a given node.void
disable()
Disable model security checks for the current thread.void
enable()
Enable model security checks for the current thread.getProtectedAspect
(QName name) Get the details of the protected aspect, returns null if aspect is not protected.Get the protected aspects.Get the protected propertiesgetProtectedProperty
(QName name) Get the details of the protected property, returns null if property is not protected.boolean
Indicates whether model security is enabled or not.boolean
isProtectedAspect
(QName aspect) Indicates whether an aspect is protected or not.boolean
isProtectedProperty
(QName property) Indicates whether a property is protected or not.void
register
(ProtectedModelArtifact atrifact) Registers a protected model artifact with the service.void
setEnabled
(boolean enabled) Sets whether model security is enabled globally or not.
-
Method Details
-
setEnabled
void setEnabled(boolean enabled) Sets whether model security is enabled globally or not.- Parameters:
enabled
-
-
isEnabled
boolean isEnabled()Indicates whether model security is enabled or not.- Returns:
-
disable
void disable()Disable model security checks for the current thread. -
enable
void enable()Enable model security checks for the current thread. -
register
Registers a protected model artifact with the service.- Parameters:
atrifact
- protected model artifact
-
isProtectedProperty
Indicates whether a property is protected or not.- Parameters:
property
- name of property- Returns:
- boolean true if property is protected, false otherwise
-
getProtectedProperties
Get the protected properties -
getProtectedProperty
Get the details of the protected property, returns null if property is not protected.- Parameters:
name
- name of the protected property- Returns:
ProtectedProperty
protected property details, null otherwise
-
canEditProtectedProperty
Indicates whether the current user can edit a protected property in the context of a given node.If the property is not protected then returns true.
- Parameters:
nodeRef
- node referenceproperty
- name of the property- Returns:
- boolean true if the current user can edit the protected property or the property is not protected, false otherwise
-
isProtectedAspect
Indicates whether an aspect is protected or not.- Parameters:
aspect
- aspect name- Returns:
- boolean true if aspect is protected, false otherwise
-
getProtectedAspects
Get the protected aspects. -
getProtectedAspect
Get the details of the protected aspect, returns null if aspect is not protected.- Parameters:
name
- name of the aspect- Returns:
ProtectedAspect
protected aspect details, null otherwise
-
canEditProtectedAspect
Indicates whether the current user can edit (ie add or remove) a protected aspect in the context of a given node.If the aspect is not protected then returns true.
- Parameters:
nodeRef
- node referenceaspect
- name of the of aspect- Returns:
- boolean true if the current user can edit the protected aspect or the the aspect is not protected, false otherwise
-