Class AbstractSetLookupEntityActionResource

All Implemented Interfaces:
RestResource

public abstract class AbstractSetLookupEntityActionResource extends AbstractActionResource
Abstract class based on AbstractActionResource.

This class provides functionality for setting a specific LookupEntity#unique_id,

  • #createValidationCondition(PrimaryKeyList selection) can be overridden
  • #createPreActionResponseBean() can be overridden
  • #createRelationToSet() can be overridden
  • #createActionResultBean() can be overridden
  • Field Details

  • Constructor Details

    • AbstractSetLookupEntityActionResource

      public AbstractSetLookupEntityActionResource(QueryBuilderFactory queryBuilderFactory)
  • Method Details

    • preAction

      public PreActionResponseBean preAction(ActionResourceBean actionResourceBean)
      Description copied from class: AbstractPreActionResource
      is ran before the actual logic and can be used to run checks or return a form that needs to be filled before execution
      Overrides:
      preAction in class AbstractPreActionResource
    • doPerformAction

      protected AbstractActionResource.ActionResultBean doPerformAction(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean, TaskContext taskContext)
      Specified by:
      doPerformAction in class AbstractActionResource
    • createValidationCondition

      protected Condition createValidationCondition(PrimaryKeyList selection)
      All selected entities need to fulfill this condition. This condition checks that the unique_id to be set is different from the existing one. - Override for a custom Condition
    • createPreActionResponseBean

      protected PreActionResponseBean createPreActionResponseBean()
      No confirm-message is generated. - Override for a custom confirm-message: PreCheckResponseBean.confirm(message)
    • createRelationToSet

      protected String createRelationToSet()
      The relation that is set is retrieved by #getLookupEntityName(). - Override for a relation that is different from the lookupEntity
    • createActionResultBean

      protected AbstractActionResource.ActionResultBean createActionResultBean()
      No message is generated and #selectionDeleted() is not executed. - Override for custom-message or/and if #selectionDeleted() should be executed
    • getParentEntityName

      protected abstract String getParentEntityName()
      the model name of the selected entity
    • getLookupEntityName

      protected abstract String getLookupEntityName()
      the model name of the lookup-entity, which is to be set
    • getUniqueId

      protected abstract String getUniqueId()
      the unique_id of the desired lookup-entity