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 Details

    • shouldProcess

      default Predicate<E> 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

      Optional<Command<E,M>> newCommand(E event)
      Create new command from an event
      Parameters:
      event -
      Returns:
    • newCommand

      Optional<Command<E,M>> newCommand(JournalEntry journalEntry)
      Create new command from a journal entry. Concrete class should only return new Command if the journalEntry is suitable for that Command
      Parameters:
      journalEntry -
      Returns: