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