Package org.alfresco.repo.model.ml
Class MultilingualDocumentAspect
java.lang.Object
org.alfresco.repo.model.ml.MultilingualDocumentAspect
- All Implemented Interfaces:
CopyServicePolicies.OnCopyNodePolicy,NodeServicePolicies.BeforeDeleteChildAssociationPolicy,NodeServicePolicies.OnUpdatePropertiesPolicy,AssociationPolicy,ClassPolicy,Policy
public class MultilingualDocumentAspect
extends Object
implements CopyServicePolicies.OnCopyNodePolicy, NodeServicePolicies.BeforeDeleteChildAssociationPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
Class containing behaviour for the multilingual document aspect.
ml document aspect- Author:
- yanipig
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg -
Field Summary
Fields inherited from interface org.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy
ARG_0, ARG_1, QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteChildAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteChildAssociation(ChildAssociationRef childAssocRef) Make sure that the child is no longer a translation and that the associated container is cleaned up, if required.getCopyCallback(QName classRef, CopyDetails copyDetails) The copy of a cm:mlDocument can't keep the Multilingual aspect.voidinit()Initialise the Multilingual Aspect Ensures that theml document aspectvoidonUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) Ensure that the locale is unique inside the mlContainer.voidsetMultilingualContentService(MultilingualContentService multilingualContentService) voidsetNodeService(NodeService nodeService) voidsetPolicyComponent(PolicyComponent policyComponent)
-
Constructor Details
-
MultilingualDocumentAspect
public MultilingualDocumentAspect()
-
-
Method Details
-
init
public void init()Initialise the Multilingual Aspect Ensures that theml document aspect -
setPolicyComponent
- Parameters:
policyComponent- the policy component to register behaviour with
-
setMultilingualContentService
- Parameters:
multilingualContentService- the Multilingual Content Service to set
-
setNodeService
- Parameters:
nodeService- the Node Service to set
-
getCopyCallback
The copy of a cm:mlDocument can't keep the Multilingual aspect.- Specified by:
getCopyCallbackin interfaceCopyServicePolicies.OnCopyNodePolicy- Parameters:
classRef- the type or aspect qualified namecopyDetails- the details of the impending copy- Returns:
- Returns the
DoNothingCopyBehaviourCallback - See Also:
-
beforeDeleteChildAssociation
Make sure that the child is no longer a translation and that the associated container is cleaned up, if required.- Specified by:
beforeDeleteChildAssociationin interfaceNodeServicePolicies.BeforeDeleteChildAssociationPolicy- Parameters:
childAssocRef- the child association to be deleted
-
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) Ensure that the locale is unique inside the mlContainer. If the locale of a pivot translation is modified, the pivot locale reference of the mlContainer must be modified too.- Specified by:
onUpdatePropertiesin interfaceNodeServicePolicies.OnUpdatePropertiesPolicy- Parameters:
nodeRef- reference to the updated nodebefore- the node's properties before the changeafter- the node's properties after the change
-