org.alfresco.repo.model.ml
Class EmptyTranslationAspect

java.lang.Object
  extended by org.alfresco.repo.model.ml.EmptyTranslationAspect
All Implemented Interfaces:
ContentServicePolicies.OnContentUpdatePolicy, CopyServicePolicies.OnCopyNodePolicy, ClassPolicy, Policy

public class EmptyTranslationAspect
extends java.lang.Object
implements CopyServicePolicies.OnCopyNodePolicy, ContentServicePolicies.OnContentUpdatePolicy

Class containing behaviour for the multilingual empty translation aspect. An empty translation is a document's properties translation. This kind of node doesn't have a content. ml empty 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.content.ContentServicePolicies.OnContentUpdatePolicy
QNAME
 
Fields inherited from interface org.alfresco.repo.policy.Policy
NAMESPACE
 
Constructor Summary
EmptyTranslationAspect()
           
 
Method Summary
 CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
          Called for all types and aspects before copying a node.
 void init()
          Initialise the Multilingual Empty Translation Aspect
 void onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean newContent)
          If a content is added to a cm:mlEmptyTranslation, remove this aspect.
 void onCopyNode(org.alfresco.service.namespace.QName classRef, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.StoreRef destinationStoreRef, boolean copyToNewNode, PolicyScope copyDetails)
          Copy a cm:mlEmptyTranslation is not permit.
 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

EmptyTranslationAspect

public EmptyTranslationAspect()
Method Detail

init

public void init()
Initialise the Multilingual Empty Translation Aspect

Ensures that the ml empty document aspect


setPolicyComponent

public void setPolicyComponent(PolicyComponent policyComponent)
Parameters:
policyComponent - the policy component to register behaviour with

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - the Node Service to set

onCopyNode

public void onCopyNode(org.alfresco.service.namespace.QName classRef,
                       org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                       org.alfresco.service.cmr.repository.StoreRef destinationStoreRef,
                       boolean copyToNewNode,
                       PolicyScope copyDetails)
Copy a cm:mlEmptyTranslation is not permit.


onContentUpdate

public void onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                            boolean newContent)
If a content is added to a cm:mlEmptyTranslation, remove this aspect.

Specified by:
onContentUpdate in interface ContentServicePolicies.OnContentUpdatePolicy
Parameters:
nodeRef - the node reference

getCopyCallback

public CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.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 name
copyDetails - the details of the impending copy
Returns:
Returns EmptyTranslationAspectCopyBehaviourCallback
See Also:
CopyServicePolicies


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