Class AbstractLikeEventRenderContextProvider
java.lang.Object
com.atlassian.confluence.notifications.RenderContextProviderTemplate<LikePayload>
com.atlassian.confluence.plugins.like.notifications.AbstractLikeEventRenderContextProvider
- All Implemented Interfaces:
com.atlassian.confluence.notifications.RenderContextProvider<LikePayload>
- Direct Known Subclasses:
LikeEventEmailRenderContextProvider
public abstract class AbstractLikeEventRenderContextProvider
extends com.atlassian.confluence.notifications.RenderContextProviderTemplate<LikePayload>
-
Field Summary
Fields inherited from class com.atlassian.confluence.notifications.RenderContextProviderTemplate
CONTEXT_SOY_INJECTED_DATA
Fields inherited from interface com.atlassian.confluence.notifications.RenderContextProvider
OVERRIDE_SYSTEM_FROM_FIELD
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLikeEventRenderContextProvider
(ContentService contentService, UserAccessor userAccessor, FollowManager followManager) -
Method Summary
Modifier and TypeMethodDescriptioncheckedCreate
(com.atlassian.confluence.notifications.Notification<LikePayload> notification, com.atlassian.plugin.notifications.api.medium.ServerConfiguration serverConfiguration, com.atlassian.plugin.notifications.api.medium.NotificationAddress notificationAddress) checkedCreate
(com.atlassian.confluence.notifications.Notification<LikePayload> notification, com.atlassian.plugin.notifications.api.medium.ServerConfiguration serverConfiguration, com.atlassian.plugin.notifications.api.medium.recipient.RoleRecipient recipient) getMediumSpecificContext
(Content content, LikePayload payload, boolean recipientIsAuthor) All the medium-specific context items (e.g.protected abstract Expansion[]
Methods inherited from class com.atlassian.confluence.notifications.RenderContextProviderTemplate
create, create, getPayloadType
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.notifications.RenderContextProvider
createMessageMetadata, createMessageOriginator
-
Constructor Details
-
AbstractLikeEventRenderContextProvider
public AbstractLikeEventRenderContextProvider(ContentService contentService, UserAccessor userAccessor, FollowManager followManager)
-
-
Method Details
-
checkedCreate
public Optional<Map<String,Object>> checkedCreate(com.atlassian.confluence.notifications.Notification<LikePayload> notification, com.atlassian.plugin.notifications.api.medium.ServerConfiguration serverConfiguration, com.atlassian.plugin.notifications.api.medium.NotificationAddress notificationAddress) - Specified by:
checkedCreate
in classcom.atlassian.confluence.notifications.RenderContextProviderTemplate<LikePayload>
-
checkedCreate
public Optional<Map<String,Object>> checkedCreate(com.atlassian.confluence.notifications.Notification<LikePayload> notification, com.atlassian.plugin.notifications.api.medium.ServerConfiguration serverConfiguration, com.atlassian.plugin.notifications.api.medium.recipient.RoleRecipient recipient) - Specified by:
checkedCreate
in classcom.atlassian.confluence.notifications.RenderContextProviderTemplate<LikePayload>
-
getMediumSpecificExpansions
- Returns:
- the content expansions required for the notification medium
-
getMediumSpecificContext
protected abstract com.atlassian.fugue.Maybe<Map<String,Object>> getMediumSpecificContext(Content content, LikePayload payload, boolean recipientIsAuthor) All the medium-specific context items (e.g. for email or hipchat)- Parameters:
content
- the notification contentpayload
- notification payload- Returns:
- a Maybe either containing the medium-specific sub-context or a MaybeNot if a problem occurs
-