Package fr.becpg.repo.entity.policy
Class EntityTplRefAspectPolicy
java.lang.Object
fr.becpg.repo.policy.AbstractBeCPGPolicy
fr.becpg.repo.entity.policy.EntityTplRefAspectPolicy
- All Implemented Interfaces:
org.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy,org.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy,org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy,org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy,org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy,org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy,org.alfresco.repo.policy.AssociationPolicy,org.alfresco.repo.policy.ClassPolicy,org.alfresco.repo.policy.Policy
public class EntityTplRefAspectPolicy
extends AbstractBeCPGPolicy
implements org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy, org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy, org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy, org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
The Class EntityFolderPolicy.
- Version:
- $Id: $Id
- Author:
- querephi
-
Nested Class Summary
Nested 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 AttributeExtractorServiceprivate BeCPGCacheServiceprivate EntityTplServiceprivate static final org.apache.commons.logging.Logprivate org.alfresco.service.namespace.NamespaceServiceprivate static final StringFields 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.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAMEFields inherited from interface org.alfresco.repo.policy.Policy
NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef) private Stringdecorate(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef) protected booleandoBeforeCommit(String key, Set<org.alfresco.service.cmr.repository.NodeRef> pendingNodes) doBeforeCommit.voiddoInit()doInit.private voidinvalidateTplCache(Set<org.alfresco.service.namespace.QName> impactedTypes) voidonAddAspect(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, org.alfresco.service.namespace.QName aspectTypeQName) voidonCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef assocRef) voidonUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, Map<org.alfresco.service.namespace.QName, Serializable> before, Map<org.alfresco.service.namespace.QName, Serializable> after) voidsetAssociationService(AssociationService associationService) Setter for the fieldassociationService.voidsetAttributeExtractorService(AttributeExtractorService attributeExtractorService) Setter for the fieldattributeExtractorService.voidsetBeCPGCacheService(BeCPGCacheService beCPGCacheService) Setter for the fieldbeCPGCacheService.voidsetEntityTplService(EntityTplService entityTplService) Setter for the fieldentityTplService.voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the fieldnamespaceService.Methods inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
containsNodeInQueue, containsNodeInQueue, disableOnCopyBehaviour, doAfterAssocsCommit, doAfterCommit, doBeforeAssocsCommit, generateDefaultKey, getCopyCallback, getKeyRegistry, init, isBeCPGVersion, isEntityTemplate, isNotLocked, isPendingDelete, isPropChanged, isVersionNode, isVersionStoreNode, isWorkingCopyOrVersion, onCopyComplete, queueAssoc, queueAssoc, queueNode, queueNode, setLockService, setNodeService, setPolicyBehaviourFilter, setPolicyComponent, unQueueNode, unQueueNode
-
Field Details
-
logger
private static final org.apache.commons.logging.Log logger -
TPL_CACHE_NAME
-
associationService
-
entityTplService
-
attributeExtractorService
-
beCPGCacheService
-
namespaceService
private org.alfresco.service.namespace.NamespaceService namespaceService
-
-
Constructor Details
-
EntityTplRefAspectPolicy
public EntityTplRefAspectPolicy()
-
-
Method Details
-
setAttributeExtractorService
Setter for the field
attributeExtractorService.- Parameters:
attributeExtractorService- aAttributeExtractorServiceobject
-
setAssociationService
Setter for the field
associationService.- Parameters:
associationService- aAssociationServiceobject.
-
setEntityTplService
Setter for the field
entityTplService.- Parameters:
entityTplService- aEntityTplServiceobject.
-
setBeCPGCacheService
Setter for the field
beCPGCacheService.- Parameters:
beCPGCacheService- aBeCPGCacheServiceobject
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the field
namespaceService.- Parameters:
namespaceService- aNamespaceServiceobject
-
doInit
public void doInit()doInit.
- Specified by:
doInitin classAbstractBeCPGPolicy
-
onAddAspect
public void onAddAspect(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, org.alfresco.service.namespace.QName aspectTypeQName) - Specified by:
onAddAspectin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy
-
onCreateAssociation
public void onCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef assocRef) - Specified by:
onCreateAssociationin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
-
doBeforeCommit
protected boolean doBeforeCommit(String key, Set<org.alfresco.service.cmr.repository.NodeRef> pendingNodes) doBeforeCommit.
- Overrides:
doBeforeCommitin classAbstractBeCPGPolicy- Parameters:
key- aStringobject.pendingNodes- aSetobject.- Returns:
- a boolean.
-
invalidateTplCache
-
onUpdateProperties
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, Map<org.alfresco.service.namespace.QName, Serializable> before, Map<org.alfresco.service.namespace.QName, Serializable> after) - Specified by:
onUpdatePropertiesin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
-
beforeDeleteNode
public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef) - Specified by:
beforeDeleteNodein interfaceorg.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
-
decorate
-