Class AbstractNotification
- java.lang.Object
-
- com.atlassian.bamboo.notification.AbstractNotification
-
- All Implemented Interfaces:
Notification
,Notification.HtmlImContentProvidingNotification
- Direct Known Subclasses:
AbstractAccessTokenNotification
,AbstractArtifactStorageCappingNotification
,AbstractCompletedNotification
,AbstractTrackingNotification
,AfterXFailedNotification
,BuildErrorNotification
,BuildHungNotification
,BuildMissingCapableAgentNotification
,BuildQueueTimeoutNotification
,CommentNotification
,DeploymentFinishedNotification
,DeploymentStartedNotification
,RssNotification
,StageCompletedNotification
public abstract class AbstractNotification extends Object implements Notification, Notification.HtmlImContentProvidingNotification
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.notification.Notification
Notification.HtmlImContentProvidingNotification
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
NAVIGATION_SOURCE
-
Constructor Summary
Constructors Constructor Description AbstractNotification()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addRecipient(@NotNull NotificationRecipient recipient)
Add a singular recipient to this notificationboolean
applyDefaultCssStyles()
Determines if this notification HTML templates should be decorated with default CSS styles.void
excludeRecipient(@NotNull NotificationRecipient recipient)
Exclude a singular recipient from this notification.protected String
getCommitUrl(@NotNull RepositoryDataEntity repositoryDataEntity, @Nullable String revision, @NotNull ImmutablePlan plan, @NotNull CustomVariableContext customVariableContext, @NotNull RepositoryDefinitionManager repositoryDefinitionManager, @NotNull VcsRepositoryViewerManager vcsRepositoryViewerManager)
@Nullable com.atlassian.event.Event
getEvent()
Retrieves the event object that triggered this notification@NotNull Set<NotificationRecipient>
getExcludedNotificationRecipients()
Returns the excluded recipients of this NotificationString
getHtmlImContent()
@NotNull Set<NotificationRecipient>
getNotificationRecipients()
Returns the recipients of this Notification@Nullable Object
getPojoEvent()
Retrieves the event object that triggered this notificationRepositoryData
getRepositoryData(@Nullable RepositoryDataEntity entity)
Deprecated.since 6.4 old repository interfaceRepositoryData
getRepositoryData(@Nullable RepositoryChangeset repositoryChangeset)
Deprecated.since 6.4 old repository interfacevoid
setEvent(@Nullable com.atlassian.event.Event event)
Sets the event object that triggered this notificationvoid
setEvent(@Nullable Object event)
Sets the event object that triggered this notificationvoid
setExcludedNotificationRecipients(@NotNull Set<NotificationRecipient> recipients)
Sets the excluded recipients for this Notificationvoid
setNotificationRecipients(@NotNull Set<NotificationRecipient> recipients)
Sets the recipients for this Notification-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.notification.Notification
getDescription, getEmailSubject, getHtmlEmailContent, getIMContent, getTextEmailContent
-
-
-
-
Field Detail
-
NAVIGATION_SOURCE
protected static final String NAVIGATION_SOURCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setEvent
public void setEvent(@Nullable @Nullable com.atlassian.event.Event event)
Description copied from interface:Notification
Sets the event object that triggered this notification- Specified by:
setEvent
in interfaceNotification
- Parameters:
event
- Event object that triggered this notification
-
setEvent
public void setEvent(@Nullable @Nullable Object event)
Description copied from interface:Notification
Sets the event object that triggered this notification- Specified by:
setEvent
in interfaceNotification
- Parameters:
event
- Event object that triggered this notification
-
getEvent
@Nullable public @Nullable com.atlassian.event.Event getEvent()
Description copied from interface:Notification
Retrieves the event object that triggered this notification- Specified by:
getEvent
in interfaceNotification
- Returns:
- Event object that triggered this notification
-
getPojoEvent
@Nullable public @Nullable Object getPojoEvent()
Description copied from interface:Notification
Retrieves the event object that triggered this notification- Specified by:
getPojoEvent
in interfaceNotification
- Returns:
- Event object that triggered this notification
-
getNotificationRecipients
@NotNull public @NotNull Set<NotificationRecipient> getNotificationRecipients()
Description copied from interface:Notification
Returns the recipients of this Notification- Specified by:
getNotificationRecipients
in interfaceNotification
- Returns:
- Set of notification recipients
-
getExcludedNotificationRecipients
@NotNull public @NotNull Set<NotificationRecipient> getExcludedNotificationRecipients()
Description copied from interface:Notification
Returns the excluded recipients of this Notification- Specified by:
getExcludedNotificationRecipients
in interfaceNotification
- Returns:
- Set of excluded notification recipients
-
setNotificationRecipients
public void setNotificationRecipients(@NotNull @NotNull Set<NotificationRecipient> recipients)
Description copied from interface:Notification
Sets the recipients for this Notification- Specified by:
setNotificationRecipients
in interfaceNotification
- Parameters:
recipients
- Set of notification recipients
-
setExcludedNotificationRecipients
public void setExcludedNotificationRecipients(@NotNull @NotNull Set<NotificationRecipient> recipients)
Description copied from interface:Notification
Sets the excluded recipients for this Notification- Specified by:
setExcludedNotificationRecipients
in interfaceNotification
- Parameters:
recipients
- Set of excluded notification recipients
-
addRecipient
public void addRecipient(@NotNull @NotNull NotificationRecipient recipient)
Description copied from interface:Notification
Add a singular recipient to this notification- Specified by:
addRecipient
in interfaceNotification
- Parameters:
recipient
- Recipient to be added to notification
-
excludeRecipient
public void excludeRecipient(@NotNull @NotNull NotificationRecipient recipient)
Description copied from interface:Notification
Exclude a singular recipient from this notification. Recipient exclusion takes precedence over inclusion.- Specified by:
excludeRecipient
in interfaceNotification
- Parameters:
recipient
- Recipient to be excluded from notification
-
getRepositoryData
@Deprecated public RepositoryData getRepositoryData(@Nullable @Nullable RepositoryDataEntity entity)
Deprecated.since 6.4 old repository interfaceThis method was originally used to render commit links. UsegetCommitUrl(RepositoryDataEntity, String, ImmutablePlan, CustomVariableContext, RepositoryDefinitionManager, VcsRepositoryViewerManager)
instead.
-
getRepositoryData
@Deprecated public RepositoryData getRepositoryData(@Nullable @Nullable RepositoryChangeset repositoryChangeset)
Deprecated.since 6.4 old repository interfaceThis method was originally used to render commit links. UsegetCommitUrl(RepositoryDataEntity, String, ImmutablePlan, CustomVariableContext, RepositoryDefinitionManager, VcsRepositoryViewerManager)
instead.
-
getCommitUrl
protected String getCommitUrl(@NotNull @NotNull RepositoryDataEntity repositoryDataEntity, @Nullable @Nullable String revision, @NotNull @NotNull ImmutablePlan plan, @NotNull @NotNull CustomVariableContext customVariableContext, @NotNull @NotNull RepositoryDefinitionManager repositoryDefinitionManager, @NotNull @NotNull VcsRepositoryViewerManager vcsRepositoryViewerManager)
-
getHtmlImContent
public String getHtmlImContent()
- Specified by:
getHtmlImContent
in interfaceNotification.HtmlImContentProvidingNotification
-
applyDefaultCssStyles
public boolean applyDefaultCssStyles()
Description copied from interface:Notification
Determines if this notification HTML templates should be decorated with default CSS styles.- Specified by:
applyDefaultCssStyles
in interfaceNotification
- Returns:
- true, if default styles should be applied and inlined, false otherwise
- See Also:
NotificationFormatter.applyStyles(String)
-
-