Package com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands
Class SpacePermissionChangeCommand
java.lang.Object
com.atlassian.confluence.internal.api.impl.service.incrementalsync.MultiEventsCommand<T,ContentManagementIncSyncModel,ContentJournalEntryTypes>
com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.ContentManagementMultiEventsCommand<SpacePermissionChangeEvent>
com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.SpacePermissionChangeCommand
- All Implemented Interfaces:
Command<SpacePermissionChangeEvent,
,ContentManagementIncSyncModel> CommandCreator<SpacePermissionChangeEvent,
ContentManagementIncSyncModel>
public class SpacePermissionChangeCommand
extends ContentManagementMultiEventsCommand<SpacePermissionChangeEvent>
Command which handles
SpacePermissionChangeEvent
- Since:
- 9.4.0
-
Field Summary
Fields inherited from class com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.ContentManagementMultiEventsCommand
commandSupport
Fields inherited from class com.atlassian.confluence.internal.api.impl.service.incrementalsync.MultiEventsCommand
logger, supportedEventEntryTypesMap
-
Constructor Summary
ConstructorsConstructorDescriptionSpacePermissionChangeCommand
(ContentCommandSupport commandSupport, SpacePermissionOperationKeyConverter spacePermissionOperationKeyConverter, SpaceService spaceService) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<JournalMessage>
Creates a list ofJournalMessage
instances to store in the database.protected Map<Class<? extends SpacePermissionChangeEvent>,
ContentJournalEntryTypes> Provide a map of all supported eventsnewCommand
(JournalEntry journalEntry) Create new command from a journal entry.Create new command from an eventprocessJournalEntries
(Collection<JournalEntry> journalEntries) DeserializeJournalEntry
to JSON representable objectMethods inherited from class com.atlassian.confluence.internal.api.impl.service.incrementalsync.contentmanagement.commands.ContentManagementMultiEventsCommand
buildContentWithDirectAncestor, getEntryTypeForEvent, newCommand, processEvent, withRelatedContentMessages
-
Constructor Details
-
SpacePermissionChangeCommand
public SpacePermissionChangeCommand(ContentCommandSupport commandSupport, SpacePermissionOperationKeyConverter spacePermissionOperationKeyConverter, SpaceService spaceService)
-
-
Method Details
-
getSupportedEventEntryTypesMap
protected Map<Class<? extends SpacePermissionChangeEvent>,ContentJournalEntryTypes> getSupportedEventEntryTypesMap()Description copied from class:MultiEventsCommand
Provide a map of all supported events- Specified by:
getSupportedEventEntryTypesMap
in classMultiEventsCommand<SpacePermissionChangeEvent,
ContentManagementIncSyncModel, ContentJournalEntryTypes> - Returns:
-
createMessages
Description copied from class:ContentManagementMultiEventsCommand
Creates a list ofJournalMessage
instances to store in the database.A
List
is used to preserve the order of messages as child content must be processed before parent content.- Specified by:
createMessages
in classContentManagementMultiEventsCommand<SpacePermissionChangeEvent>
- Parameters:
event
- the event to process- Returns:
- a list of
JournalMessage
instances, or an empty list if no messages should be stored
-
processJournalEntries
public Collection<ContentManagementIncSyncModel> processJournalEntries(Collection<JournalEntry> journalEntries) Description copied from interface:Command
DeserializeJournalEntry
to JSON representable object- Returns:
-
newCommand
public Optional<Command<SpacePermissionChangeEvent,ContentManagementIncSyncModel>> newCommand(SpacePermissionChangeEvent event) Description copied from interface:CommandCreator
Create new command from an event- Returns:
-
newCommand
public Optional<Command<SpacePermissionChangeEvent,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
- Returns:
-