Package fr.becpg.repo.copy
Class BeCPGCopyPolicy
java.lang.Object
fr.becpg.repo.policy.AbstractBeCPGPolicy
fr.becpg.repo.copy.BeCPGCopyPolicy
- All Implemented Interfaces:
org.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy,org.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy,org.alfresco.repo.policy.ClassPolicy,org.alfresco.repo.policy.Policy
public class BeCPGCopyPolicy
extends AbstractBeCPGPolicy
implements org.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy
BeCPGCopyPolicy class.
- Author:
- matthieu
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
AbstractBeCPGPolicy.BeCPGPolicyTransactionListenerNested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
org.alfresco.repo.policy.Policy.Arg -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AssociationServiceprivate static final Stringprivate static final Stringprivate static final Stringprivate BeCPGCopyPlugin[]private EntityDictionaryServiceprivate EntityServiceprivate static final org.slf4j.Loggerprivate org.alfresco.service.namespace.NamespaceServiceprivate SystemConfigurationServiceFields inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
ASSOC_REGISTRY, KEY_PENDING_DELETE_NODES, KEY_REGISTRY, lockService, nodeService, policyBehaviourFilter, policyComponent, postTransactionListener, transactionListenerFields inherited from interface org.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy
QNAMEFields inherited from interface org.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy
ARG_0, ARG_1, QNAMEFields inherited from interface org.alfresco.repo.policy.Policy
NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoInit()doInit.private StringextractPropertyName(String propertyToReset, BeCPGCopyPolicy.CopyContext context) org.alfresco.repo.copy.CopyBehaviourCallbackgetCopyCallback(org.alfresco.service.namespace.QName classRef, org.alfresco.repo.copy.CopyDetails copyDetails) private voidhandleResetProperty(BeCPGCopyPolicy.CopyContext context, String propertyToReset) voidonCopyComplete(org.alfresco.service.namespace.QName classRef, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef targetNodeRef, boolean copyToNewNode, Map<org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef> copyMap) voidsetAssociationService(AssociationService associationService) Setter for the fieldassociationService.voidsetCopyPlugins(BeCPGCopyPlugin[] copyPlugins) Setter for the fieldcopyPlugins.voidsetEntityDictionaryService(EntityDictionaryService entityDictionaryService) Setter for the fieldentityDictionaryService.voidsetEntityService(EntityService entityService) Setter for the fieldentityService.voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the fieldnamespaceService.voidsetSystemConfigurationService(SystemConfigurationService systemConfigurationService) Setter for the fieldsystemConfigurationService.private booleanshouldCopy(String typeToReset, String nodeRefType, org.alfresco.repo.copy.CopyDetails copyDetails) private booleanshouldCopyFromPlugins(String typeToReset, org.alfresco.repo.copy.CopyDetails copyDetails) Methods inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
containsNodeInQueue, containsNodeInQueue, disableOnCopyBehaviour, doAfterAssocsCommit, doAfterCommit, doBeforeAssocsCommit, doBeforeCommit, generateDefaultKey, getKeyRegistry, init, isBeCPGVersion, isEntityTemplate, isNotLocked, isPendingDelete, isPropChanged, isVersionNode, isVersionStoreNode, isWorkingCopyOrVersion, queueAssoc, queueAssoc, queueNode, queueNode, setLockService, setNodeService, setPolicyBehaviourFilter, setPolicyComponent, unQueueNode, unQueueNode
-
Field Details
-
COPY_SUFFIX
- See Also:
-
BRANCH_SUFFIX
- See Also:
-
BRANCH_ONLY_SUFFIX
- See Also:
-
logger
private static final org.slf4j.Logger logger -
copyPlugins
-
systemConfigurationService
-
entityDictionaryService
-
entityService
-
namespaceService
private org.alfresco.service.namespace.NamespaceService namespaceService -
associationService
-
-
Constructor Details
-
BeCPGCopyPolicy
public BeCPGCopyPolicy()
-
-
Method Details
-
setCopyPlugins
Setter for the field
copyPlugins.- Parameters:
copyPlugins- an array ofBeCPGCopyPluginobjects
-
setSystemConfigurationService
Setter for the field
systemConfigurationService.- Parameters:
systemConfigurationService- aSystemConfigurationServiceobject
-
setEntityDictionaryService
Setter for the field
entityDictionaryService.- Parameters:
entityDictionaryService- aEntityDictionaryServiceobject
-
setEntityService
Setter for the field
entityService.- Parameters:
entityService- aEntityServiceobject
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the field
namespaceService.- Parameters:
namespaceService- aNamespaceServiceobject
-
setAssociationService
Setter for the field
associationService.- Parameters:
associationService- aAssociationServiceobject
-
typesToReset
-
propertiesToReset
-
doInit
public void doInit()doInit.
- Specified by:
doInitin classAbstractBeCPGPolicy
-
getCopyCallback
public org.alfresco.repo.copy.CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, org.alfresco.repo.copy.CopyDetails copyDetails) - Specified by:
getCopyCallbackin interfaceorg.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy- Overrides:
getCopyCallbackin classAbstractBeCPGPolicy
-
onCopyComplete
public void onCopyComplete(org.alfresco.service.namespace.QName classRef, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef targetNodeRef, boolean copyToNewNode, Map<org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef> copyMap) - Specified by:
onCopyCompletein interfaceorg.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy- Overrides:
onCopyCompletein classAbstractBeCPGPolicy
-
shouldCopyFromPlugins
private boolean shouldCopyFromPlugins(String typeToReset, org.alfresco.repo.copy.CopyDetails copyDetails) -
shouldCopy
-
handleResetProperty
-
extractPropertyName
-