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 ContentCommandSupport
protected final ContentService
protected final org.slf4j.Logger
protected final SpaceFilteringService
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractLabelCommand
(ContentCommandSupport commandSupport, ContentService contentService, SpaceFilteringService spaceFilteringService) -
Method Summary
Modifier and TypeMethodDescriptionnewCommand
(JournalEntry journalEntry) Create new command from a journal entry.void
processEvent
(E event, Object... parameters) Processing an event then serialize as one or manyJournalEntry
processJournalEntries
(Collection<JournalEntry> journalEntries) DeserializeJournalEntry
to 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, wait
Methods 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:Command
Processing an event then serialize as one or manyJournalEntry
- Specified by:
processEvent
in interfaceCommand<E extends LabelEvent,
ContentManagementIncSyncModel> - Parameters:
event
-
-
processJournalEntries
public Collection<ContentManagementIncSyncModel> processJournalEntries(Collection<JournalEntry> journalEntries) Description copied from interface:Command
DeserializeJournalEntry
to JSON representable object- Specified by:
processJournalEntries
in interfaceCommand<E extends LabelEvent,
ContentManagementIncSyncModel> - Parameters:
journalEntries
-- Returns:
-
shouldProcess
Description copied from interface:CommandCreator
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.- Specified by:
shouldProcess
in interfaceCommandCreator<E extends LabelEvent,
ContentManagementIncSyncModel> - Returns:
- predicate that indicates if particular event has to be processed.
-
newCommand
Description copied from interface:CommandCreator
Create new command from a journal entry. Concrete class should only return newCommand
if the journalEntry is suitable for thatCommand
- Specified by:
newCommand
in interfaceCommandCreator<E extends LabelEvent,
ContentManagementIncSyncModel> - Parameters:
journalEntry
-- Returns:
-