Class FormulationChain<T extends FormulatedEntity>

java.lang.Object
fr.becpg.repo.formulation.FormulationChain<T>

public class FormulationChain<T extends FormulatedEntity> extends Object
Chain of responsibility executor. Any type passed as context information.
Version:
$Id: $Id
Author:
matthieu
  • Field Details

  • Constructor Details

    • FormulationChain

      public FormulationChain()
  • Method Details

    • setUpdateFormulatedDate

      public void setUpdateFormulatedDate(boolean updateFormulatedDate)

      Setter for the field updateFormulatedDate.

      Parameters:
      updateFormulatedDate - a boolean.
    • setChainId

      public void setChainId(String chainId)

      Setter for the field chainId.

      Parameters:
      chainId - a String object.
    • getChainId

      public String getChainId()

      Getter for the field chainId.

      Returns:
      a String object.
    • setFormulationService

      public void setFormulationService(FormulationService<T> formulationService)

      Setter for the field formulationService.

      Parameters:
      formulationService - a FormulationService object.
    • setContextClass

      public void setContextClass(Class<T> contextClass)

      Setter for the field contextClass.

      Parameters:
      contextClass - a Class object.
    • init

      public void init()

      init.

    • executeChain

      public void executeChain(T context)

      executeChain.

      Parameters:
      context - a T object.
      Throws:
      FormulateException - if any.
    • setHandlers

      public void setHandlers(List<FormulationHandler<T>> handlers)
      Sets handler list. Intended to be injected.
      Parameters:
      handlers - Handler list.
    • getHandlers

      public List<FormulationHandler<T>> getHandlers()

      Getter for the field handlers.

      Returns:
      a List object.
    • prepareHandlerChain

      private void prepareHandlerChain()
    • shouldUpdateFormulatedDate

      public boolean shouldUpdateFormulatedDate()

      shouldUpdateFormulatedDate.

      Returns:
      a boolean.
    • onError

      public void onError(T repositoryEntity)

      onError.

      Parameters:
      repositoryEntity - a T object