Package com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands
Class SpaceRemoveCommand
java.lang.Object
com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.SpaceRemoveCommand
- All Implemented Interfaces:
Command<SpaceRemoveEvent,
,ContentManagementIncSyncModel> CommandCreator<SpaceRemoveEvent,
ContentManagementIncSyncModel>
public class SpaceRemoveCommand
extends Object
implements Command<SpaceRemoveEvent,ContentManagementIncSyncModel>, CommandCreator<SpaceRemoveEvent,ContentManagementIncSyncModel>
Command which handles
SpaceRemoveEvent
- Since:
- 9.2.6
-
Constructor Summary
ConstructorsConstructorDescriptionSpaceRemoveCommand
(ContentCommandSupport commandSupport, SpaceFilteringService spaceFilteringService) -
Method Summary
Modifier and TypeMethodDescriptionnewCommand
(JournalEntry journalEntry) Create new command from a journal entry.newCommand
(SpaceRemoveEvent event) Create new command from an eventvoid
processEvent
(SpaceRemoveEvent 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.
-
Constructor Details
-
SpaceRemoveCommand
public SpaceRemoveCommand(ContentCommandSupport commandSupport, SpaceFilteringService spaceFilteringService)
-
-
Method Details
-
processEvent
Description copied from interface:Command
Processing an event then serialize as one or manyJournalEntry
- Specified by:
processEvent
in interfaceCommand<SpaceRemoveEvent,
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<SpaceRemoveEvent,
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<SpaceRemoveEvent,
ContentManagementIncSyncModel> - Returns:
- predicate that indicates if particular event has to be processed.
-
newCommand
public Optional<Command<SpaceRemoveEvent,ContentManagementIncSyncModel>> newCommand(SpaceRemoveEvent event) Description copied from interface:CommandCreator
Create new command from an event- Specified by:
newCommand
in interfaceCommandCreator<SpaceRemoveEvent,
ContentManagementIncSyncModel> - Parameters:
event
-- Returns:
-
newCommand
public Optional<Command<SpaceRemoveEvent,ContentManagementIncSyncModel>> newCommand(JournalEntry journalEntry) 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<SpaceRemoveEvent,
ContentManagementIncSyncModel> - Parameters:
journalEntry
-- Returns:
-