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 java.lang.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, QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteChildAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME
-
-
Constructor Summary
Constructors Constructor Description MultilingualDocumentAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)Make sure that the child is no longer a translation and that the associated container is cleaned up, if required.CopyBehaviourCallbackgetCopyCallback(org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> after)Ensure that the locale is unique inside the mlContainer.voidsetMultilingualContentService(MultilingualContentService multilingualContentService)voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidsetPolicyComponent(PolicyComponent policyComponent)
-
-
-
Method Detail
-
init
public void init()
Initialise the Multilingual Aspect Ensures that theml document aspect
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
- Parameters:
policyComponent- the policy component to register behaviour with
-
setMultilingualContentService
public void setMultilingualContentService(MultilingualContentService multilingualContentService)
- Parameters:
multilingualContentService- the Multilingual Content Service to set
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService- the Node Service to set
-
getCopyCallback
public CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
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:
CopyServicePolicies
-
beforeDeleteChildAssociation
public void beforeDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.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
-
-