Package org.alfresco.repo.policy
Class PolicyScope
java.lang.Object
org.alfresco.repo.policy.PolicyScope
Policy scope.
Helper often used by policies which require information about a node to be gathered, for example onCopy or onCreateVersion.
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<ChildAssociationRef,ChildAssociationRef> Map of assocs that will always be traversedThe aspectsprotected List<ChildAssociationRef>The child associationsprotected QNameThe class ref of the aspectprotected Map<QName,Serializable> The propertiesprotected List<AssociationRef>The target associations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.alfresco.repo.policy.AspectDetailsAdd an aspectprotected voidaddAssociation(AssociationRef nodeAssocRef) Adds an association to be copiedvoidaddAssociation(QName classRef, AssociationRef nodeAssocRef) Add an associationprotected voidaddChildAssociation(ChildAssociationRef childAssocRef) Add a child associationprotected voidaddChildAssociation(ChildAssociationRef childAssocRef, boolean alwaysTraverseAssociation) Add a child associationvoidaddChildAssociation(QName classRef, ChildAssociationRef childAssocRef) Adds a child associationvoidaddChildAssociation(QName classRef, ChildAssociationRef childAssocRef, boolean alwaysTraverseAssociation) voidaddProperty(QName qName, Serializable value) Add a property to the listvoidaddProperty(QName classRef, QName qName, Serializable value) Add a propertyGets a list of the aspectsGets the map of associations to be copiedgetAssociations(QName classRef) Get associationsGets the child associations to be copiedgetChildAssociations(QName classRef) Get a child associationGets the map of propertiesgetProperties(QName classRef) Get the propertiesprotected booleanisChildAssociationRefAlwaysTraversed(ChildAssociationRef childAssocRef) Indicates whether a child association ref is always traversed or notbooleanisChildAssociationRefAlwaysTraversed(QName classRef, ChildAssociationRef childAssocRef) voidremoveAspect(QName aspect) Removes an aspect from the listvoidremoveProperty(QName qName) Remove a property from the listvoidremoveProperty(QName classRef, QName qName) Removes a property from the list
-
Field Details
-
aspectCopyDetails
The aspects -
properties
The properties -
childAssocs
The child associations -
targetAssocs
The target associations -
classRef
The class ref of the aspect -
alwaysTraverseMap
Map of assocs that will always be traversed
-
-
Constructor Details
-
PolicyScope
Constructor- Parameters:
classRef- the class reference
-
-
Method Details
-
addProperty
Add a property- Parameters:
classRef- the class referenceqName- the qualified name of the propertyvalue- the value of the property
-
removeProperty
Removes a property from the list- Parameters:
classRef- the class referenceqName- the qualified name
-
getProperties
Get the properties- Parameters:
classRef- the class ref- Returns:
- the properties that should be copied
-
addChildAssociation
Adds a child association- Parameters:
classRef- QNamechildAssocRef- ChildAssociationRef
-
addChildAssociation
public void addChildAssociation(QName classRef, ChildAssociationRef childAssocRef, boolean alwaysTraverseAssociation) - Parameters:
classRef- QNamechildAssocRef- ChildAssociationRefalwaysTraverseAssociation- boolean
-
getChildAssociations
Get a child association- Parameters:
classRef- QName
-
isChildAssociationRefAlwaysTraversed
public boolean isChildAssociationRefAlwaysTraversed(QName classRef, ChildAssociationRef childAssocRef) -
addAssociation
Add an association- Parameters:
classRef- QNamenodeAssocRef- AssociationRef
-
getAssociations
Get associations- Parameters:
classRef- QName
-
addAspect
Add an aspect- Parameters:
aspect- the aspect class reference- Returns:
- the apsect copy details (returned as a helper)
-
removeAspect
Removes an aspect from the list- Parameters:
aspect- the aspect class reference
-
getAspects
Gets a list of the aspects- Returns:
- a list of aspect to copy
-
addProperty
Add a property to the list- Parameters:
qName- the qualified name of the propertyvalue- the value of the property
-
removeProperty
Remove a property from the list- Parameters:
qName- the qualified name of the property
-
getProperties
Gets the map of properties- Returns:
- map of property names and values
-
addChildAssociation
Add a child association- Parameters:
childAssocRef- the child association reference
-
addChildAssociation
protected void addChildAssociation(ChildAssociationRef childAssocRef, boolean alwaysTraverseAssociation) Add a child association- Parameters:
childAssocRef- the child assoc referencealwaysTraverseAssociation- indicates whether the assoc should always be traversed
-
isChildAssociationRefAlwaysTraversed
Indicates whether a child association ref is always traversed or not- Parameters:
childAssocRef- the child association reference- Returns:
- true if the assoc is always traversed, false otherwise
-
getChildAssociations
Gets the child associations to be copied- Returns:
- map containing the child associations to be copied
-
addAssociation
Adds an association to be copied- Parameters:
nodeAssocRef- the association reference
-
getAssociations
Gets the map of associations to be copied- Returns:
- a map conatining the associations to be copied
-