public class VersionableAspect extends java.lang.Object implements ContentServicePolicies.OnContentUpdatePolicy, NodeServicePolicies.BeforeAddAspectPolicy, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, VersionServicePolicies.AfterCreateVersionPolicy, CopyServicePolicies.OnCopyNodePolicy, org.alfresco.repo.dictionary.DictionaryListener
Policy.Arg| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
QNAMEQNAMEQNAMEQNAMEQNAMEARG_0, ARG_1, ARG_2, QNAMEQNAMEARG_0, ARG_1, QNAME| Constructor and Description |
|---|
VersionableAspect() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCreateVersion(org.alfresco.service.cmr.repository.NodeRef versionableNode,
Version version)
Called after the version has been created
|
void |
afterDictionaryDestroy() |
void |
afterDictionaryInit() |
void |
beforeAddAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
Before add aspect policy behaviour
|
CopyBehaviourCallback |
getCopyCallback(org.alfresco.service.namespace.QName classRef,
CopyDetails copyDetails)
Called for all types and aspects before copying a node.
|
java.util.List |
getExcludedOnUpdateProps() |
void |
init()
Initialise the versionable aspect policies
|
void |
onAddAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
On add aspect policy behaviour
|
void |
onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean newContent)
On content update policy behaviour
If applicable and "cm:autoVersion" is TRUE then version the node on content update (even if no property updates)
|
void |
onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
boolean isNodeArchived)
Called after a node is deleted.
|
void |
onDictionaryInit() |
void |
onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
Called after an aspect has been removed from a node
|
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
On update properties policy behaviour
If applicable and "cm:autoVersionOnUpdateProps" is TRUE then version the node on properties update (even if no content updates)
|
void |
setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
Sets the dictionary DAO.
|
void |
setEnableAutoVersioning(boolean enableAutoVersioning)
Set whether the aspect-associated behaviour should be enabled or disabled.
|
void |
setExcludedOnUpdateProps(java.util.List excludedOnUpdateProps) |
void |
setLockService(LockService lockService)
Set the lock service
|
void |
setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
Sets the namespace prefix resolver.
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service
|
void |
setPolicyComponent(PolicyComponent policyComponent)
Set the policy component
|
void |
setVersionService(VersionService versionService)
Set the version service
|
public void setPolicyComponent(PolicyComponent policyComponent)
policyComponent - the policy componentpublic void setVersionService(VersionService versionService)
versionService - the version servicepublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - the node servicepublic void setLockService(LockService lockService)
lockService - the lock servicepublic void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
dictionaryDAO - the dictionary DAOpublic void setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
namespacePrefixResolver - the namespace prefix resolverpublic java.util.List getExcludedOnUpdateProps()
public void setExcludedOnUpdateProps(java.util.List excludedOnUpdateProps)
excludedOnUpdateProps - the list of properties that force versioning to ignore changespublic void setEnableAutoVersioning(boolean enableAutoVersioning)
initialization.enableAutoVersioning - true to enable the aspect behaviour otherwise falsepublic void init()
public void onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
boolean isNodeArchived)
NodeServicePolicies.OnDeleteNodePolicyonDeleteNode in interface NodeServicePolicies.OnDeleteNodePolicychildAssocRef - the primary parent-child association of the deleted nodeisNodeArchived - indicates whether the node has been archived rather than purgedNodeServicePolicies.OnDeleteNodePolicy.onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef, boolean)public CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
CopyServicePolicies.OnCopyNodePolicygetCopyCallback in interface CopyServicePolicies.OnCopyNodePolicyclassRef - the type or aspect qualified namecopyDetails - the details of the impending copyVersionableAspectCopyBehaviourCallbackCopyServicePoliciespublic void beforeAddAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
beforeAddAspect in interface NodeServicePolicies.BeforeAddAspectPolicynodeRef - aspectTypeQName - public void onAddAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
onAddAspect in interface NodeServicePolicies.OnAddAspectPolicynodeRef - aspectTypeQName - public void onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
NodeServicePolicies.OnRemoveAspectPolicyonRemoveAspect in interface NodeServicePolicies.OnRemoveAspectPolicynodeRef - the node from which the aspect will be removedaspectTypeQName - the type of the aspectNodeServicePolicies.OnRemoveAspectPolicy.onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)public void onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean newContent)
onContentUpdate in interface ContentServicePolicies.OnContentUpdatePolicynodeRef - the node referencepublic void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
onUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicynodeRef - reference to the updated nodebefore - the node's properties before the changeafter - the node's properties after the changepublic void afterCreateVersion(org.alfresco.service.cmr.repository.NodeRef versionableNode,
Version version)
VersionServicePolicies.AfterCreateVersionPolicyafterCreateVersion in interface VersionServicePolicies.AfterCreateVersionPolicyversionableNode - the node that has been versionedversion - the created versionVersionServicePolicies.OnCreateVersionPolicy.onCreateVersion(org.alfresco.service.namespace.QName, org.alfresco.service.cmr.repository.NodeRef, java.util.Map, org.alfresco.repo.policy.PolicyScope)public void onDictionaryInit()
onDictionaryInit in interface org.alfresco.repo.dictionary.DictionaryListenerpublic void afterDictionaryInit()
afterDictionaryInit in interface org.alfresco.repo.dictionary.DictionaryListenerpublic void afterDictionaryDestroy()
afterDictionaryDestroy in interface org.alfresco.repo.dictionary.DictionaryListenerCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.