Klasse DisplayEntityHistory

java.lang.Object
org.obrel.core.RelatedObject
org.obrel.core.SerializableRelatedObject
Alle implementierten Schnittstellen:
de.esoco.lib.manage.Initializable, de.esoco.lib.property.Updatable, Serializable, org.obrel.core.Relatable

public class DisplayEntityHistory extends InteractionFragment implements de.esoco.lib.property.Updatable
A fragment that displays the history of an arbitrary Entity and optionally allows to create new history entries.

Input parameters:

Siehe auch:
  • Felddetails

    • ENTITY_HISTORY_FRAGMENT

      public static final org.obrel.core.RelationType<List<org.obrel.core.RelationType<?>>> ENTITY_HISTORY_FRAGMENT
      A standard parameter that can be used to display this fragment in a process step.
    • ENTITY_HISTORY_TARGET

      public static final org.obrel.core.RelationType<Entity> ENTITY_HISTORY_TARGET
      Input parameter: the target entity to display and create history for.
    • ENTITY_HISTORY_ROOT_TARGET

      public static final org.obrel.core.RelationType<Entity> ENTITY_HISTORY_ROOT_TARGET
      Input parameter (optional): the root target entity to create history for.
    • ENTITY_HISTORY_TARGET_CRITERIA

      public static final org.obrel.core.RelationType<de.esoco.lib.expression.Predicate<org.obrel.core.Relatable>> ENTITY_HISTORY_TARGET_CRITERIA
      Optional: a predicate containing the target query criteria. If set the history target parameter will be ignored.
    • ENTITY_HISTORY_ORIGINS

      public static final org.obrel.core.RelationType<List<Entity>> ENTITY_HISTORY_ORIGINS
      Input parameter: the origin entities to display the history for.
    • ENTITY_HISTORY_TYPES

      public static final org.obrel.core.RelationType<Set<HistoryRecord.HistoryType>> ENTITY_HISTORY_TYPES
      Input parameter: the history types to display.
    • ENTITY_HISTORY_QUERY_MODE

      public static final org.obrel.core.RelationType<EntityRelationTypes.HierarchicalQueryMode> ENTITY_HISTORY_QUERY_MODE
      Input parameter: the hierarchical query mode (defaults to EntityRelationTypes.HierarchicalQueryMode.UNCONSTRAINED).
    • ENTITY_HISTORY

      public static final org.obrel.core.RelationType<HistoryRecord> ENTITY_HISTORY
      The entity history table parameter.
    • ENTITY_HISTORY_DATE

      public static final org.obrel.core.RelationType<de.esoco.lib.datatype.DateRange.StandardDateRange> ENTITY_HISTORY_DATE
      The history date range to be displayed.
  • Konstruktordetails

    • DisplayEntityHistory

      public DisplayEntityHistory(Entity historyOrigin, boolean noteEditAllowed, boolean showRootTarget, boolean showTarget)
      Creates a new instance.
      Parameter:
      historyOrigin - The origin entity of to always limit the history to or NULL for all history
      noteEditAllowed - TRUE to allow the editing of existing history notes
      showRootTarget - TRUE to display the root target column
      showTarget - TRUE to display the target column
  • Methodendetails

    • getHistoryQueryAttributes

      public static List<de.esoco.lib.expression.Function<? super HistoryRecord,?>> getHistoryQueryAttributes(boolean includeRootTarget, boolean includeTarget)
      A helper method that returns a list of history record attributes to be used in a query.
      Parameter:
      includeRootTarget - TRUE to includeHistoryRecord.ROOT_TARGET
      includeTarget - TRUE to includeHistoryRecord.TARGET
      Gibt zurück:
      The list of history attributes
    • initHistoryParameter

      public static de.esoco.lib.expression.Predicate<org.obrel.core.Relatable> initHistoryParameter(ProcessFragment processFragment, org.obrel.core.RelationType<HistoryRecord> historyParam, Collection<Entity> rootTargets, boolean includeTarget, HistoryRecord.HistoryType... excludedTypes)
      Initializes the a history parameter with a history query for certain targets.
      Parameter:
      processFragment - The process fragment
      historyParam - The history parameter to initialize
      rootTargets - The target entities to query the history for
      includeTarget - TRUE to always include the history target column or else only if multiple targets exist
      excludedTypes - An optional list of excluded history record types
      Gibt zurück:
      The criteria predicate for the history record query
    • getInputParameters

      public List<org.obrel.core.RelationType<?>> getInputParameters()
      Returns the collection of input parameters of this fragment. These must be a subset of InteractionFragment.getInteractionParameters(). The default implementation returns a mutable collection that can been modified directly by a subclass. Or it can be overridden by subclasses to return their own input parameter collection.
      Setzt außer Kraft:
      getInputParameters in Klasse InteractionFragment
      Gibt zurück:
      The list of this fragment's input parameters
    • getInteractionParameters

      public List<org.obrel.core.RelationType<?>> getInteractionParameters()
      Returns the list of interaction parameters for this fragment. The default implementation returns a mutable list that can been modified directly by a subclass. Or it can be overridden by subclasses to return their own interaction parameter list.
      Setzt außer Kraft:
      getInteractionParameters in Klasse InteractionFragment
      Gibt zurück:
      The list of this fragment's interaction parameters
    • handleInteraction

      public void handleInteraction(org.obrel.core.RelationType<?> interactionParam) throws Exception
      Must be implemented by subclasses to handle interactions for this fragment. The default implementation does nothing.
      Setzt außer Kraft:
      handleInteraction in Klasse InteractionFragment
      Parameter:
      interactionParam - The interaction parameter
      Löst aus:
      Exception - Any kind of exception may be thrown in case of errors
    • init

      public void init() throws Exception
      Must be implemented to initialize the interaction parameters of this fragment.
      Angegeben von:
      init in Schnittstelle de.esoco.lib.manage.Initializable
      Angegeben von:
      init in Klasse InteractionFragment
      Löst aus:
      Exception - Any kind of exception may be thrown in case of errors
    • resetHistoryCriteria

      public void resetHistoryCriteria()
      Resets all history input criteria.
    • update

      public void update()
      Updates the history display to reflect the state of the input parameters of this fragment.
      Angegeben von:
      update in Schnittstelle de.esoco.lib.property.Updatable
    • initComplete

      protected void initComplete()
      This method will be invoked after the initialization of a fragment and it's hierarchy of sub-fragments has been completed. This means that when this method is invoked on a child fragment it's parent has been initialized but it's InteractionFragment.initComplete() method hasn't been invoked yet.

      The purpose of this method is for subclasses to execute code that depends on a full initialization. The default implementation does nothing.

      Setzt außer Kraft:
      initComplete in Klasse InteractionFragment
    • performHistoryRecordAction

      protected void performHistoryRecordAction(HistoryRecord historyRecord)
      This method can be overridden by subclasses to react to an action event for a certain history record. The default implementation does nothing.
      Parameter:
      historyRecord - The history record for which the even occurred