Class AbstractActionFactory

All Implemented Interfaces:
Direct Known Subclasses:
AbstractEntityActionsFactory, AbstractModelActionFactory, AcceptConflictActionFactory, ActionsModelFactory, EntityMergeActionFactory, EvaluationQuestionLogicCopyActionFactory, EventLogicCopyActionFactory, ExportingActionFactory, GenericLabelActionFactory, GridUserSettingActionFactory, HistoryActionFactory, ImportingActionFactory, OpenDmsNodeActionFactory, OrderPositionActionFactory, QuestionLogicCopyActionFactory, QuestionnaireLogicCopyActionFactory, ReportingLogicCopyActionFactory, RoomProposalActionFactory, ShowDocumentsActionFactory, SingleMarkActionFactory, ZipFileImportActionFactory

public abstract class AbstractActionFactory extends Object implements ActionFactory
  • Field Details

  • Constructor Details

    • AbstractActionFactory

      public AbstractActionFactory(ActionsBuilder actionBuilder)
  • Method Details

    • addToList

      protected ActionModel addToList(List<ActionModel> actionList, @Nullable @Nullable ActionModel action)
      Adds the action preserving the order as they were added to this list.

      If the position property is set, it will not be changed.

      action - the action to add, may be null so nothing is added
      the action that was added to the list (and potentially the position property changed)
    • addSeparator

      protected void addSeparator(List<ActionModel> actionList)
    • asCollection

      protected Collection<ActionModel> asCollection(ActionModel... actions)
      Adds the given actions to a collection.
    • isScope

      protected Predicate<Situation> isScope(String scope)
    • isScreen

      protected Predicate<Situation> isScreen(String screen)
    • isPlace

      protected Predicate<Situation> isPlace(String place)
    • isEntity

      protected Predicate<Situation> isEntity(String entityName)
      Returns a Predicate which evaluates to true, if the applied Situation is providing a entity name (like SituationWithEntityName for list forms or SituationWithEntity for detail forms) and the entity name equals the specified entity name.
    • isForm

      protected Predicate<Situation> isForm(String formName)
    • getEntityName

      @Nullable protected @Nullable String getEntityName(Situation sit)
      Returns the entity-name if it is available via the specified situation object. Returns null, if entityname is null or the situation is not capable of storing entity-names.
    • getPrimaryKey

      @Nullable protected @Nullable String getPrimaryKey(Situation sit)
      Returns the primary key if it is available from the specified situation. Returns null if the primary key is null or the situation is not capable of holding a primary key (for example if we are in situation "EntityList").