Package com.kenshoo.pl.entity.internal
Class CreationDateEnricher<E extends EntityType<E>>
- java.lang.Object
-
- com.kenshoo.pl.entity.internal.CreationDateEnricher<E>
-
- All Implemented Interfaces:
CurrentStateConsumer<E>,PostFetchCommandEnricher<E>
public class CreationDateEnricher<E extends EntityType<E>> extends java.lang.Object implements PostFetchCommandEnricher<E>
Created by yuvalr on 2/3/16.
-
-
Constructor Summary
Constructors Constructor Description CreationDateEnricher(EntityField<E,java.time.Instant> creationDateField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenrich(java.util.Collection<? extends ChangeEntityCommand<E>> changeEntityCommands, ChangeOperation changeOperation, ChangeContext changeContext)"Enriches" the commands with system-imposed changes.java.util.stream.Stream<EntityField<E,?>>fieldsToEnrich()return stream of enriched fields according to input commands.SupportedChangeOperationgetSupportedChangeOperation()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.kenshoo.pl.entity.spi.CurrentStateConsumer
requiredFields
-
Methods inherited from interface com.kenshoo.pl.entity.spi.PostFetchCommandEnricher
shouldRun
-
-
-
-
Constructor Detail
-
CreationDateEnricher
public CreationDateEnricher(EntityField<E,java.time.Instant> creationDateField)
-
-
Method Detail
-
enrich
public void enrich(java.util.Collection<? extends ChangeEntityCommand<E>> changeEntityCommands, ChangeOperation changeOperation, ChangeContext changeContext)
Description copied from interface:PostFetchCommandEnricher"Enriches" the commands with system-imposed changes.- Specified by:
enrichin interfacePostFetchCommandEnricher<E extends EntityType<E>>- Parameters:
changeEntityCommands- commands to enrichchangeOperation- operationchangeContext- the context of the operation
-
fieldsToEnrich
public java.util.stream.Stream<EntityField<E,?>> fieldsToEnrich()
Description copied from interface:PostFetchCommandEnricherreturn stream of enriched fields according to input commands.- Specified by:
fieldsToEnrichin interfacePostFetchCommandEnricher<E extends EntityType<E>>- Returns:
- the fields should be enriched
-
getSupportedChangeOperation
public SupportedChangeOperation getSupportedChangeOperation()
- Specified by:
getSupportedChangeOperationin interfaceCurrentStateConsumer<E extends EntityType<E>>
-
-