Package com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands
Class AttachmentUpdateCommand
java.lang.Object
com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.AttachmentUpdateCommand
- All Implemented Interfaces:
Command<AttachmentUpdateEvent,,ContentManagementIncSyncModel> CommandCreator<AttachmentUpdateEvent,ContentManagementIncSyncModel>
public class AttachmentUpdateCommand
extends Object
implements Command<AttachmentUpdateEvent,ContentManagementIncSyncModel>, CommandCreator<AttachmentUpdateEvent,ContentManagementIncSyncModel>
A command to handle AttachmentUpdateEvent
- Since:
- 9.2.6
-
Constructor Summary
ConstructorsConstructorDescriptionAttachmentUpdateCommand(ContentCommandSupport commandSupport, ContentService contentService, SpaceFilteringService spaceFilteringService) -
Method Summary
Modifier and TypeMethodDescriptionnewCommand(JournalEntry journalEntry) Create new command from a journal entry.newCommand(AttachmentUpdateEvent event) Create new command from an eventvoidprocessEvent(AttachmentUpdateEvent event, Object... params) Processing an event then serialize as one or manyJournalEntryprocessJournalEntries(Collection<JournalEntry> journalEntries) DeserializeJournalEntryto JSON representable objectReturns predicate, that indicates if the given event should be processed or not.
-
Constructor Details
-
AttachmentUpdateCommand
public AttachmentUpdateCommand(ContentCommandSupport commandSupport, ContentService contentService, SpaceFilteringService spaceFilteringService)
-
-
Method Details
-
processEvent
Description copied from interface:CommandProcessing an event then serialize as one or manyJournalEntry- Specified by:
processEventin interfaceCommand<AttachmentUpdateEvent,ContentManagementIncSyncModel> - Parameters:
event-
-
processJournalEntries
public Collection<ContentManagementIncSyncModel> processJournalEntries(Collection<JournalEntry> journalEntries) Description copied from interface:CommandDeserializeJournalEntryto JSON representable object- Specified by:
processJournalEntriesin interfaceCommand<AttachmentUpdateEvent,ContentManagementIncSyncModel> - Parameters:
journalEntries-- Returns:
-
shouldProcess
Description copied from interface:CommandCreatorReturns 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.- Specified by:
shouldProcessin interfaceCommandCreator<AttachmentUpdateEvent,ContentManagementIncSyncModel> - Returns:
- predicate that indicates if particular event has to be processed.
-
newCommand
public Optional<Command<AttachmentUpdateEvent,ContentManagementIncSyncModel>> newCommand(AttachmentUpdateEvent event) Description copied from interface:CommandCreatorCreate new command from an event- Specified by:
newCommandin interfaceCommandCreator<AttachmentUpdateEvent,ContentManagementIncSyncModel> - Parameters:
event-- Returns:
-
newCommand
public Optional<Command<AttachmentUpdateEvent,ContentManagementIncSyncModel>> newCommand(JournalEntry journalEntry) Description copied from interface:CommandCreatorCreate new command from a journal entry. Concrete class should only return newCommandif the journalEntry is suitable for thatCommand- Specified by:
newCommandin interfaceCommandCreator<AttachmentUpdateEvent,ContentManagementIncSyncModel> - Parameters:
journalEntry-- Returns:
-