Class FormulationServiceImpl<T extends FormulatedEntity>

java.lang.Object
fr.becpg.repo.formulation.impl.FormulationServiceImpl<T>
All Implemented Interfaces:
FormulationPlugin, FormulationService<T>

public class FormulationServiceImpl<T extends FormulatedEntity> extends Object implements FormulationService<T>, FormulationPlugin

FormulationServiceImpl class.

Since:
1.5
Version:
$Id: $Id
Author:
matthieu
  • Field Details

  • Constructor Details

    • FormulationServiceImpl

      public FormulationServiceImpl()
  • Method Details

    • setAlfrescoRepository

      public void setAlfrescoRepository(AlfrescoRepository<T> alfrescoRepository)

      Setter for the field alfrescoRepository.

      Parameters:
      alfrescoRepository - a AlfrescoRepository object.
    • setNodeService

      public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

      Setter for the field nodeService.

      Parameters:
      nodeService - a NodeService object.
    • setMutexFactory

      public void setMutexFactory(MutexFactory mutexFactory)

      Setter for the field mutexFactory.

      Parameters:
      mutexFactory - a MutexFactory object.
    • setBeCPGAuditService

      public void setBeCPGAuditService(BeCPGAuditService beCPGAuditService)

      Setter for the field beCPGAuditService.

      Parameters:
      beCPGAuditService - a BeCPGAuditService object
    • registerFormulationChain

      public void registerFormulationChain(Class<T> clazz, FormulationChain<T> chain)

      registerFormulationChain.

      Specified by:
      registerFormulationChain in interface FormulationService<T extends FormulatedEntity>
      Parameters:
      clazz - a Class object.
      chain - a FormulationChain object.
    • formulate

      public T formulate(org.alfresco.service.cmr.repository.NodeRef entityNodeRef)

      formulate.

      Specified by:
      formulate in interface FormulationService<T extends FormulatedEntity>
      Parameters:
      entityNodeRef - a NodeRef object.
      Returns:
      a T object.
    • formulate

      public T formulate(T repositoryEntity)

      formulate.

      Specified by:
      formulate in interface FormulationService<T extends FormulatedEntity>
      Parameters:
      repositoryEntity - a T object.
      Returns:
      a T object.
    • formulate

      public T formulate(T repositoryEntity, String chainId)

      formulate.

      Specified by:
      formulate in interface FormulationService<T extends FormulatedEntity>
      Parameters:
      repositoryEntity - a T object.
      chainId - a String object.
      Returns:
      a T object.
    • formulate

      public T formulate(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, String chainId)

      formulate.

      Specified by:
      formulate in interface FormulationService<T extends FormulatedEntity>
      Parameters:
      entityNodeRef - a NodeRef object.
      chainId - a String object.
      Returns:
      a T object.
    • formulateInternal

      private T formulateInternal(T repositoryEntity, String chainId)
    • shouldFormulate

      public boolean shouldFormulate(org.alfresco.service.cmr.repository.NodeRef entityNodeRef)

      shouldFormulate.

      Specified by:
      shouldFormulate in interface FormulationService<T extends FormulatedEntity>
      Parameters:
      entityNodeRef - a NodeRef object.
      Returns:
      a boolean.
    • getChain

      private FormulationChain<T> getChain(Class<?> clazz, String chainId)
    • getMatchPriority

      public FormulationPlugin.FormulationPluginPriority getMatchPriority(org.alfresco.service.namespace.QName type)

      getMatchPriority.

      Specified by:
      getMatchPriority in interface FormulationPlugin
      Parameters:
      type - a QName object.
      Returns:
      a FormulationPlugin.FormulationPluginPriority object.
    • runFormulation

      public void runFormulation(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, String chainId)

      runFormulation.

      Specified by:
      runFormulation in interface FormulationPlugin
      Parameters:
      entityNodeRef - a NodeRef object.
      chainId - a String object
    • getMutexKey

      private String getMutexKey(T repositoryEntity)
      Generates a mutex key for the given repository entity. Uses NodeRef ID if available, otherwise falls back to entity name.
      Parameters:
      repositoryEntity - the repository entity
      Returns:
      a unique mutex key string