Package com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands
Class CustomContentCommand
java.lang.Object
com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.CustomContentCommand
- All Implemented Interfaces:
Command<CustomContentJournalMessage,,ContentManagementIncSyncModel> CommandCreator<CustomContentJournalMessage,ContentManagementIncSyncModel>
public class CustomContentCommand
extends Object
implements Command<CustomContentJournalMessage,ContentManagementIncSyncModel>, CommandCreator<CustomContentJournalMessage,ContentManagementIncSyncModel>
Command to handle processing of custom content journal entries. It processes
CustomContentJournalMessage
and converts them to ContentManagementIncSyncModel objects for the API response.- Since:
- 9.2.11
-
Constructor Summary
ConstructorsConstructorDescriptionCustomContentCommand(ContentCommandSupport commandSupport, ContentService contentService) -
Method Summary
Modifier and TypeMethodDescriptionnewCommand(JournalEntry journalEntry) Create new command from a journal entry.Create new command from an eventvoidprocessEvent(CustomContentJournalMessage event, Object... params) Processing an event then serialize as one or manyJournalEntryprocessJournalEntries(Collection<JournalEntry> journalEntries) DeserializeJournalEntryto JSON representable objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.internal.api.service.incrementalsync.CommandCreator
shouldProcess
-
Constructor Details
-
CustomContentCommand
-
-
Method Details
-
processJournalEntries
public Collection<ContentManagementIncSyncModel> processJournalEntries(Collection<JournalEntry> journalEntries) Description copied from interface:CommandDeserializeJournalEntryto JSON representable object- Specified by:
processJournalEntriesin interfaceCommand<CustomContentJournalMessage,ContentManagementIncSyncModel> - Parameters:
journalEntries-- Returns:
-
processEvent
Description copied from interface:CommandProcessing an event then serialize as one or manyJournalEntry- Specified by:
processEventin interfaceCommand<CustomContentJournalMessage,ContentManagementIncSyncModel> - Parameters:
event-
-
newCommand
public Optional<Command<CustomContentJournalMessage,ContentManagementIncSyncModel>> newCommand(CustomContentJournalMessage event) Description copied from interface:CommandCreatorCreate new command from an event- Specified by:
newCommandin interfaceCommandCreator<CustomContentJournalMessage,ContentManagementIncSyncModel> - Parameters:
event-- Returns:
-
newCommand
public Optional<Command<CustomContentJournalMessage,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<CustomContentJournalMessage,ContentManagementIncSyncModel> - Parameters:
journalEntry-- Returns:
-