Class UserActivationEventCommandUserManagement
java.lang.Object
com.atlassian.confluence.internal.api.impl.service.incrementalsync.MultiEventsCommand<T,UserManagementInSyncModel,UserJournalEntryTypes>
com.atlassian.confluence.internal.api.impl.service.incrementalsync.usermanagement.commands.UserManagementMultiEventsCommand<com.atlassian.crowd.event.user.UserEditedEvent>
com.atlassian.confluence.internal.api.impl.service.incrementalsync.usermanagement.commands.UserActivationEventCommandUserManagement
- All Implemented Interfaces:
Command<com.atlassian.crowd.event.user.UserEditedEvent,
,UserManagementInSyncModel> CommandCreator<com.atlassian.crowd.event.user.UserEditedEvent,
UserManagementInSyncModel>
public class UserActivationEventCommandUserManagement
extends UserManagementMultiEventsCommand<com.atlassian.crowd.event.user.UserEditedEvent>
-
Field Summary
Fields inherited from class com.atlassian.confluence.internal.api.impl.service.incrementalsync.usermanagement.commands.UserManagementMultiEventsCommand
commandSupport
Fields inherited from class com.atlassian.confluence.internal.api.impl.service.incrementalsync.MultiEventsCommand
logger, supportedEventEntryTypesMap
-
Constructor Summary
ConstructorsConstructorDescriptionUserActivationEventCommandUserManagement
(UserGroupCommandSupport commandSupport, PersonFactory personFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<JournalMessage>
createMessage
(com.atlassian.crowd.event.user.UserEditedEvent event) Creates anOptional
containing aJournalMessage
to store in the DB.Map<Class<? extends com.atlassian.crowd.event.user.UserEditedEvent>,
UserJournalEntryTypes> Provide a map of all supported eventsOptional<Command<com.atlassian.crowd.event.user.UserEditedEvent,
UserManagementInSyncModel>> newCommand
(JournalEntry journalEntry) Create new command from a journal entry.Optional<Command<com.atlassian.crowd.event.user.UserEditedEvent,
UserManagementInSyncModel>> newCommand
(com.atlassian.crowd.event.user.UserEditedEvent event) Create new command from an eventvoid
processEvent
(com.atlassian.crowd.event.user.UserEditedEvent event, Object... parameters) Processing an event then serialize as one or manyJournalEntry
processJournalEntries
(Collection<JournalEntry> journalEntries) DeserializeJournalEntry
to JSON representable objectMethods inherited from class com.atlassian.confluence.internal.api.impl.service.incrementalsync.usermanagement.commands.UserManagementMultiEventsCommand
newCommand
-
Constructor Details
-
UserActivationEventCommandUserManagement
public UserActivationEventCommandUserManagement(UserGroupCommandSupport commandSupport, PersonFactory personFactory)
-
-
Method Details
-
getSupportedEventEntryTypesMap
public Map<Class<? extends com.atlassian.crowd.event.user.UserEditedEvent>,UserJournalEntryTypes> getSupportedEventEntryTypesMap()Description copied from class:MultiEventsCommand
Provide a map of all supported events- Specified by:
getSupportedEventEntryTypesMap
in classMultiEventsCommand<com.atlassian.crowd.event.user.UserEditedEvent,
UserManagementInSyncModel, UserJournalEntryTypes> - Returns:
-
createMessage
protected Optional<JournalMessage> createMessage(com.atlassian.crowd.event.user.UserEditedEvent event) Description copied from class:UserManagementMultiEventsCommand
Creates anOptional
containing aJournalMessage
to store in the DB.- Specified by:
createMessage
in classUserManagementMultiEventsCommand<com.atlassian.crowd.event.user.UserEditedEvent>
- Parameters:
event
- the event to process- Returns:
- an
Optional
containing theJournalMessage
, orOptional.empty()
if we don't want to store the value
-
processJournalEntries
public Collection<UserManagementInSyncModel> processJournalEntries(Collection<JournalEntry> journalEntries) Description copied from interface:Command
DeserializeJournalEntry
to JSON representable object- Returns:
-
processEvent
public void processEvent(com.atlassian.crowd.event.user.UserEditedEvent event, Object... parameters) Description copied from interface:Command
Processing an event then serialize as one or manyJournalEntry
- Specified by:
processEvent
in interfaceCommand<com.atlassian.crowd.event.user.UserEditedEvent,
UserManagementInSyncModel> - Overrides:
processEvent
in classUserManagementMultiEventsCommand<com.atlassian.crowd.event.user.UserEditedEvent>
-
newCommand
public Optional<Command<com.atlassian.crowd.event.user.UserEditedEvent,UserManagementInSyncModel>> newCommand(com.atlassian.crowd.event.user.UserEditedEvent event) Description copied from interface:CommandCreator
Create new command from an event- Returns:
-
newCommand
public Optional<Command<com.atlassian.crowd.event.user.UserEditedEvent,UserManagementInSyncModel>> 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:
-