public class PolicyScope extends Object
Helper often used by policies which require information about a node to be gathered, for example onCopy or onCreateVersion.
| Modifier and Type | Field and Description |
|---|---|
protected Map<ChildAssociationRef,ChildAssociationRef> |
alwaysTraverseMap
Map of assocs that will always be traversed
|
protected Map<QName,org.alfresco.repo.policy.AspectDetails> |
aspectCopyDetails
The aspects
|
protected List<ChildAssociationRef> |
childAssocs
The child associations
|
protected QName |
classRef
The class ref of the aspect
|
protected Map<QName,Serializable> |
properties
The properties
|
protected List<AssociationRef> |
targetAssocs
The target associations
|
| Constructor and Description |
|---|
PolicyScope(QName classRef)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.alfresco.repo.policy.AspectDetails |
addAspect(QName aspect)
Add an aspect
|
protected void |
addAssociation(AssociationRef nodeAssocRef)
Adds an association to be copied
|
void |
addAssociation(QName classRef,
AssociationRef nodeAssocRef)
Add an association
|
protected void |
addChildAssociation(ChildAssociationRef childAssocRef)
Add a child association
|
protected void |
addChildAssociation(ChildAssociationRef childAssocRef,
boolean alwaysTraverseAssociation)
Add a child association
|
void |
addChildAssociation(QName classRef,
ChildAssociationRef childAssocRef)
Adds a child association
|
void |
addChildAssociation(QName classRef,
ChildAssociationRef childAssocRef,
boolean alwaysTraverseAssociation) |
void |
addProperty(QName classRef,
QName qName,
Serializable value)
Add a property
|
void |
addProperty(QName qName,
Serializable value)
Add a property to the list
|
Set<QName> |
getAspects()
Gets a list of the aspects
|
List<AssociationRef> |
getAssociations()
Gets the map of associations to be copied
|
List<AssociationRef> |
getAssociations(QName classRef)
Get associations
|
List<ChildAssociationRef> |
getChildAssociations()
Gets the child associations to be copied
|
List<ChildAssociationRef> |
getChildAssociations(QName classRef)
Get a child association
|
Map<QName,Serializable> |
getProperties()
Gets the map of properties
|
Map<QName,Serializable> |
getProperties(QName classRef)
Get the properties
|
protected boolean |
isChildAssociationRefAlwaysTraversed(ChildAssociationRef childAssocRef)
Indicates whether a child association ref is always traversed or not
|
boolean |
isChildAssociationRefAlwaysTraversed(QName classRef,
ChildAssociationRef childAssocRef) |
void |
removeAspect(QName aspect)
Removes an aspect from the list
|
void |
removeProperty(QName qName)
Remove a property from the list
|
void |
removeProperty(QName classRef,
QName qName)
Removes a property from the list
|
protected Map<QName,org.alfresco.repo.policy.AspectDetails> aspectCopyDetails
protected Map<QName,Serializable> properties
protected List<ChildAssociationRef> childAssocs
protected List<AssociationRef> targetAssocs
protected QName classRef
protected Map<ChildAssociationRef,ChildAssociationRef> alwaysTraverseMap
public PolicyScope(QName classRef)
classRef - the class referencepublic void addProperty(QName classRef, QName qName, Serializable value)
classRef - the class referenceqName - the qualified name of the propertyvalue - the value of the propertypublic void removeProperty(QName classRef, QName qName)
classRef - the class referenceqName - the qualified namepublic Map<QName,Serializable> getProperties(QName classRef)
classRef - the class refpublic void addChildAssociation(QName classRef, ChildAssociationRef childAssocRef)
classRef - QNamechildAssocRef - ChildAssociationRefpublic void addChildAssociation(QName classRef, ChildAssociationRef childAssocRef, boolean alwaysTraverseAssociation)
classRef - QNamechildAssocRef - ChildAssociationRefalwaysTraverseAssociation - booleanpublic List<ChildAssociationRef> getChildAssociations(QName classRef)
classRef - QNamepublic boolean isChildAssociationRefAlwaysTraversed(QName classRef, ChildAssociationRef childAssocRef)
public void addAssociation(QName classRef, AssociationRef nodeAssocRef)
classRef - QNamenodeAssocRef - AssociationRefpublic List<AssociationRef> getAssociations(QName classRef)
classRef - QNamepublic org.alfresco.repo.policy.AspectDetails addAspect(QName aspect)
aspect - the aspect class referencepublic void removeAspect(QName aspect)
aspect - the aspect class referencepublic Set<QName> getAspects()
public void addProperty(QName qName, Serializable value)
qName - the qualified name of the propertyvalue - the value of the propertypublic void removeProperty(QName qName)
qName - the qualified name of the propertypublic Map<QName,Serializable> getProperties()
protected void addChildAssociation(ChildAssociationRef childAssocRef)
childAssocRef - the child association referenceprotected void addChildAssociation(ChildAssociationRef childAssocRef, boolean alwaysTraverseAssociation)
childAssocRef - the child assoc referencealwaysTraverseAssociation - indicates whether the assoc should always be traversedprotected boolean isChildAssociationRefAlwaysTraversed(ChildAssociationRef childAssocRef)
childAssocRef - the child association referencepublic List<ChildAssociationRef> getChildAssociations()
protected void addAssociation(AssociationRef nodeAssocRef)
nodeAssocRef - the association referencepublic List<AssociationRef> getAssociations()
Copyright © 2005–2020 Alfresco Software. All rights reserved.