Class PageEntityHistoryConfiguration
java.lang.Object
ch.tocco.nice2.optional.cms.impl.history.PageEntityHistoryConfiguration
- All Implemented Interfaces:
EntityHistoryConfiguration
@Component
public class PageEntityHistoryConfiguration
extends Object
implements EntityHistoryConfiguration
Custom history configuration for 'Page' entities.
A history entry will only be created when the Page is published.
Also, additional related entities are included in the history snapshot.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.persist.history.api.v2.EntityHistoryConfiguration
EntityHistoryConfiguration.RelationDefinition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetIncludedFields
(EntityModel entityModel) getIncludedRelations
(Entity page) boolean
int
priority()
boolean
supports
(EntityModel entityModel)
-
Constructor Details
-
PageEntityHistoryConfiguration
public PageEntityHistoryConfiguration()
-
-
Method Details
-
supports
- Specified by:
supports
in interfaceEntityHistoryConfiguration
-
priority
public int priority()- Specified by:
priority
in interfaceEntityHistoryConfiguration
-
isApplicableForHistory
- Specified by:
isApplicableForHistory
in interfaceEntityHistoryConfiguration
- Returns:
- true if the given event should trigger the creation of a history entry
-
getIncludedFields
- Specified by:
getIncludedFields
in interfaceEntityHistoryConfiguration
- Returns:
- which fields should be included in the history snapshot for the given entity model
-
getIncludedRelations
- Specified by:
getIncludedRelations
in interfaceEntityHistoryConfiguration
- Returns:
- which relations should be included in the history snapshot for the given entity model
-