Interface EntityHistoryConfiguration

All Known Implementing Classes:
DefaultEntityHistoryConfig, LookupEntityHistoryConfig, PageEntityHistoryConfiguration

public interface EntityHistoryConfiguration
Configuration that defines when a history snapshot is created for a certain entity and what is included in the snapshot.
  • Method Details

    • supports

      boolean supports(EntityModel entityModel, boolean isRootEntity)
      Returns:
      true if EntityHistoryConfiguration supports this entity model. `isRootEntity` is used to distinguish between a lookup entity itself is changed and the full xml should be generated or a related entity is changed and only some fields should be in the xml.
    • priority

      int priority()
    • isApplicableForHistory

      boolean isApplicableForHistory(EntityFacadeEvent event)
      Returns:
      true if the given event should trigger the creation of a history entry
    • getIncludedFields

      List<FieldModel> getIncludedFields(EntityModel entityModel)
      Returns:
      which fields should be included in the history snapshot for the given entity model
    • getIncludedRelations

      List<EntityHistoryConfiguration.RelationDefinition> getIncludedRelations(Entity centerEntity)
      Returns:
      which relations should be included in the history snapshot for the given entity model