Package com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands
Class AbstractLabelCommand<E extends LabelEvent>
java.lang.Object
com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.AbstractLabelCommand<E>
- All Implemented Interfaces:
Command<E,,ContentManagementIncSyncModel> CommandCreator<E,ContentManagementIncSyncModel>
- Direct Known Subclasses:
LabelAddCommand,LabelRemoveCommand
public abstract class AbstractLabelCommand<E extends LabelEvent>
extends Object
implements Command<E,ContentManagementIncSyncModel>, CommandCreator<E,ContentManagementIncSyncModel>
Abstract command class to handle LabelEvent
- Since:
- 9.2.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContentCommandSupportprotected final ContentServiceprotected final org.slf4j.Loggerprotected final SpaceFilteringService -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractLabelCommand(ContentCommandSupport commandSupport, ContentService contentService, SpaceFilteringService spaceFilteringService) -
Method Summary
Modifier and TypeMethodDescriptionnewCommand(JournalEntry journalEntry) Create new command from a journal entry.voidprocessEvent(E event, Object... parameters) 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.Methods 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
newCommand
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
commandSupport
-
contentService
-
spaceFilteringService
-
-
Constructor Details
-
AbstractLabelCommand
protected AbstractLabelCommand(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<E extends LabelEvent,ContentManagementIncSyncModel> - Parameters:
event-
-
processJournalEntries
public Collection<ContentManagementIncSyncModel> processJournalEntries(Collection<JournalEntry> journalEntries) Description copied from interface:CommandDeserializeJournalEntryto JSON representable object- Specified by:
processJournalEntriesin interfaceCommand<E extends LabelEvent,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<E extends LabelEvent,ContentManagementIncSyncModel> - Returns:
- predicate that indicates if particular event has to be processed.
-
newCommand
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<E extends LabelEvent,ContentManagementIncSyncModel> - Parameters:
journalEntry-- Returns:
-