Interface CommandCreator<E,M extends IncrementalSyncModel>
- Type Parameters:
E
- is an event type.M
- is an incremental model.
- All Known Implementing Classes:
AbstractLabelCommand
,AbstractLikeCommand
,ApplicationUpdatedEventCommand
,AttachmentUpdateCommand
,ContentCreateCommand
,ContentManagementMultiEventsCommand
,ContentPermissionChangeCommand
,ContentRemoveCommand
,ContentUpdateCommand
,CrowdUserCreatedCommand
,DirectoryEventCommandUserManagement
,GlobalPermissionCommand
,GroupCreatedEventCommand
,GroupEventCommand
,GroupMembershipsCreatedEventCommand
,GroupMembershipsDeletedEventCommand
,GroupMembershipsEventCommand
,GroupRemovingEventCommand
,LabelAddCommand
,LabelRemoveCommand
,LikeCreatedCommand
,LikeRemovedCommand
,MultiEventsCommand
,PostUserRenamedEventCommand
,SpaceEventsCommand
,SpaceFilteringCommand
,SpaceImportCommand
,SpacePermissionChangeCommand
,SpaceRemoveCommand
,UserActivationEventCommandUserManagement
,UserEventCommand
,UserManagementMultiEventsCommand
,UserRemovingEventCommand
,UserSpaceImportCommand
public interface CommandCreator<E,M extends IncrementalSyncModel>
Will associate with single
Command
. Basically, CommandCreator will check if event or journal entry is supported
by the associated Command
then create it.- Since:
- 9.2.6
-
Method Summary
Modifier and TypeMethodDescriptionnewCommand
(JournalEntry journalEntry) Create new command from a journal entry.newCommand
(E event) Create new command from an eventReturns predicate, that indicates if the given event should be processed or not.
-
Method Details
-
shouldProcess
Returns predicate, that indicates if the given event should be processed or not. If event should not be processed it is expected that command creator do not create command for such event and returns empty optional.- Returns:
- predicate that indicates if particular event has to be processed.
- Since:
- 9.2.7
-
newCommand
Create new command from an event- Parameters:
event
-- Returns:
-
newCommand
Create new command from a journal entry. Concrete class should only return newCommand
if the journalEntry is suitable for thatCommand
- Parameters:
journalEntry
-- Returns:
-