org.alfresco.repo.model.ml
Class MultilingualDocumentAspect

java.lang.Object
  extended by org.alfresco.repo.model.ml.MultilingualDocumentAspect
All Implemented Interfaces:
CopyServicePolicies.OnCopyNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, ClassPolicy, Policy

public class MultilingualDocumentAspect
extends java.lang.Object
implements CopyServicePolicies.OnCopyNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy

Class containing behaviour for the multilingual document aspect. ml document aspect


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.BeforeDeleteNodePolicy
QNAME
 
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME
 
Fields inherited from interface org.alfresco.repo.policy.Policy
NAMESPACE
 
Constructor Summary
MultilingualDocumentAspect()
           
 
Method Summary
 void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Ensure that the node is properly unhooked from the translation mechanism first.
 CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
          The copy of a cm:mlDocument can't keep the Multilingual aspect.
 void init()
          Initialise the Multilingual Aspect Ensures that the ml document aspect
 void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map before, java.util.Map after)
          Ensure that the locale is unique inside the mlContainer.
 void setMultilingualContentService(MultilingualContentService multilingualContentService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPolicyComponent(PolicyComponent policyComponent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultilingualDocumentAspect

public MultilingualDocumentAspect()
Method Detail

init

public void init()
Initialise the Multilingual Aspect Ensures that the ml 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:
getCopyCallback in interface CopyServicePolicies.OnCopyNodePolicy
Parameters:
classRef - the type or aspect qualified name
copyDetails - the details of the impending copy
Returns:
Returns the DoNothingCopyBehaviourCallback
See Also:
CopyServicePolicies

beforeDeleteNode

public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Ensure that the node is properly unhooked from the translation mechanism first.

Specified by:
beforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicy
Parameters:
nodeRef - the node reference

onUpdateProperties

public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                               java.util.Map before,
                               java.util.Map 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:
onUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicy
Parameters:
nodeRef - reference to the updated node
before - the node's properties before the change
after - the node's properties after the change


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.