public class UnmovableAspect extends Object implements NodeServicePolicies.BeforeMoveNodePolicy
ContentModel.ASPECT_UNMOVABLE
are not allowed by default.
This class registers the behaviour that prevents the move.
This aspect/behaviour combination allows for detailed application control of when node deletion is allowed
or disallowed for particular nodes. It is not related to the normal permissions controls, which of course apply.
Policy.Arg
QNAME
Constructor and Description |
---|
UnmovableAspect() |
Modifier and Type | Method and Description |
---|---|
void |
beforeMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
org.alfresco.service.cmr.repository.NodeRef newParentRef)
Prevents node from to be moved
|
void |
init()
Initialise method
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service
|
void |
setPolicyComponent(PolicyComponent policyComponent)
Set the policy component
|
public void setPolicyComponent(PolicyComponent policyComponent)
policyComponent
- policy componentpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- node servicepublic void init()
public void beforeMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef, org.alfresco.service.cmr.repository.NodeRef newParentRef)
beforeMoveNode
in interface NodeServicePolicies.BeforeMoveNodePolicy
oldChildAssocRef
- the child association reference prior to the movenewParentRef
- the new parent node referenceCopyright © 2005–2017 Alfresco Software. All rights reserved.