org.alfresco.repo.version
Class VersionableAspect
java.lang.Object
org.alfresco.repo.version.VersionableAspect
- All Implemented Interfaces:
- ContentServicePolicies.OnContentUpdatePolicy, CopyServicePolicies.OnCopyNodePolicy, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, ClassPolicy, Policy, VersionServicePolicies.AfterCreateVersionPolicy
public class VersionableAspect
- extends java.lang.Object
- implements ContentServicePolicies.OnContentUpdatePolicy, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, VersionServicePolicies.AfterCreateVersionPolicy, CopyServicePolicies.OnCopyNodePolicy
Class containing behaviour for the versionable aspect
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VersionableAspect
public VersionableAspect()
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
- Set the policy component
- Parameters:
policyComponent
- the policy component
setVersionService
public void setVersionService(VersionService versionService)
- Set the version service
- Parameters:
versionService
- the version service
setNodeService
public void setNodeService(NodeService nodeService)
- Set the node service
- Parameters:
nodeService
- the node service
setExcludedOnUpdateProps
public void setExcludedOnUpdateProps(java.util.List excludedOnUpdateProps)
init
public void init()
- Initialise the versionable aspect policies
onDeleteNode
public void onDeleteNode(ChildAssociationRef childAssocRef,
boolean isNodeArchived)
- Description copied from interface:
NodeServicePolicies.OnDeleteNodePolicy
- Called after a node is deleted. The reference given is for an association
which has been deleted and cannot be used to retrieve node or associaton
information from any of the services.
- Specified by:
onDeleteNode
in interface NodeServicePolicies.OnDeleteNodePolicy
- Parameters:
childAssocRef
- the primary parent-child association of the deleted nodeisNodeArchived
- indicates whether the node has been archived rather than purged- See Also:
NodeServicePolicies.OnDeleteNodePolicy.onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef, boolean)
getCopyCallback
public CopyBehaviourCallback getCopyCallback(QName classRef,
CopyDetails copyDetails)
- Description copied from interface:
CopyServicePolicies.OnCopyNodePolicy
- Called for all types and aspects before copying a node.
- Specified by:
getCopyCallback
in interface CopyServicePolicies.OnCopyNodePolicy
- Parameters:
classRef
- the type or aspect qualified namecopyDetails
- the details of the impending copy
- Returns:
- Returns the
VersionableAspectCopyBehaviourCallback
- See Also:
CopyServicePolicies
onAddAspect
public void onAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
- On add aspect policy behaviour
- Specified by:
onAddAspect
in interface NodeServicePolicies.OnAddAspectPolicy
- Parameters:
nodeRef
- aspectTypeQName
-
onRemoveAspect
public void onRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
- Description copied from interface:
NodeServicePolicies.OnRemoveAspectPolicy
- Called after an aspect has been removed from a node
- Specified by:
onRemoveAspect
in interface NodeServicePolicies.OnRemoveAspectPolicy
- Parameters:
nodeRef
- the node from which the aspect will be removedaspectTypeQName
- the type of the aspect- See Also:
NodeServicePolicies.OnRemoveAspectPolicy.onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)
onContentUpdate
public void onContentUpdate(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)
- Specified by:
onContentUpdate
in interface ContentServicePolicies.OnContentUpdatePolicy
- Parameters:
nodeRef
- the node reference
onUpdateProperties
public void onUpdateProperties(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)
- Specified by:
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
- Parameters:
nodeRef
- reference to the updated nodebefore
- the node's properties before the changeafter
- the node's properties after the change- Since:
- 3.2
afterCreateVersion
public void afterCreateVersion(NodeRef versionableNode,
Version version)
- Description copied from interface:
VersionServicePolicies.AfterCreateVersionPolicy
- Called after the version has been created
- Specified by:
afterCreateVersion
in interface VersionServicePolicies.AfterCreateVersionPolicy
- Parameters:
versionableNode
- the node that has been versionedversion
- the created version- See Also:
VersionServicePolicies.OnCreateVersionPolicy.onCreateVersion(org.alfresco.service.namespace.QName, org.alfresco.service.cmr.repository.NodeRef, java.util.Map, org.alfresco.repo.policy.PolicyScope)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.