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 StringNAVIGATION_SOURCE
-
Constructor Summary
Constructors Constructor Description AbstractNotification()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddRecipient(@NotNull NotificationRecipient recipient)Add a singular recipient to this notificationbooleanapplyDefaultCssStyles()Determines if this notification HTML templates should be decorated with default CSS styles.voidexcludeRecipient(@NotNull NotificationRecipient recipient)Exclude a singular recipient from this notification.protected StringgetCommitUrl(@NotNull RepositoryDataEntity repositoryDataEntity, @Nullable String revision, @NotNull ImmutablePlan plan, @NotNull CustomVariableContext customVariableContext, @NotNull RepositoryDefinitionManager repositoryDefinitionManager, @NotNull VcsRepositoryViewerManager vcsRepositoryViewerManager)@Nullable com.atlassian.event.EventgetEvent()Retrieves the event object that triggered this notification@NotNull Set<NotificationRecipient>getExcludedNotificationRecipients()Returns the excluded recipients of this NotificationStringgetHtmlImContent()@NotNull Set<NotificationRecipient>getNotificationRecipients()Returns the recipients of this Notification@Nullable ObjectgetPojoEvent()Retrieves the event object that triggered this notificationRepositoryDatagetRepositoryData(@Nullable RepositoryDataEntity entity)Deprecated.since 6.4 old repository interfaceRepositoryDatagetRepositoryData(@Nullable RepositoryChangeset repositoryChangeset)Deprecated.since 6.4 old repository interfacevoidsetEvent(@Nullable com.atlassian.event.Event event)Sets the event object that triggered this notificationvoidsetEvent(@Nullable Object event)Sets the event object that triggered this notificationvoidsetExcludedNotificationRecipients(@NotNull Set<NotificationRecipient> recipients)Sets the excluded recipients for this NotificationvoidsetNotificationRecipients(@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:NotificationSets the event object that triggered this notification- Specified by:
setEventin interfaceNotification- Parameters:
event- Event object that triggered this notification
-
setEvent
public void setEvent(@Nullable @Nullable Object event)Description copied from interface:NotificationSets the event object that triggered this notification- Specified by:
setEventin interfaceNotification- Parameters:
event- Event object that triggered this notification
-
getEvent
@Nullable public @Nullable com.atlassian.event.Event getEvent()
Description copied from interface:NotificationRetrieves the event object that triggered this notification- Specified by:
getEventin interfaceNotification- Returns:
- Event object that triggered this notification
-
getPojoEvent
@Nullable public @Nullable Object getPojoEvent()
Description copied from interface:NotificationRetrieves the event object that triggered this notification- Specified by:
getPojoEventin interfaceNotification- Returns:
- Event object that triggered this notification
-
getNotificationRecipients
@NotNull public @NotNull Set<NotificationRecipient> getNotificationRecipients()
Description copied from interface:NotificationReturns the recipients of this Notification- Specified by:
getNotificationRecipientsin interfaceNotification- Returns:
- Set of notification recipients
-
getExcludedNotificationRecipients
@NotNull public @NotNull Set<NotificationRecipient> getExcludedNotificationRecipients()
Description copied from interface:NotificationReturns the excluded recipients of this Notification- Specified by:
getExcludedNotificationRecipientsin interfaceNotification- Returns:
- Set of excluded notification recipients
-
setNotificationRecipients
public void setNotificationRecipients(@NotNull @NotNull Set<NotificationRecipient> recipients)Description copied from interface:NotificationSets the recipients for this Notification- Specified by:
setNotificationRecipientsin interfaceNotification- Parameters:
recipients- Set of notification recipients
-
setExcludedNotificationRecipients
public void setExcludedNotificationRecipients(@NotNull @NotNull Set<NotificationRecipient> recipients)Description copied from interface:NotificationSets the excluded recipients for this Notification- Specified by:
setExcludedNotificationRecipientsin interfaceNotification- Parameters:
recipients- Set of excluded notification recipients
-
addRecipient
public void addRecipient(@NotNull @NotNull NotificationRecipient recipient)Description copied from interface:NotificationAdd a singular recipient to this notification- Specified by:
addRecipientin interfaceNotification- Parameters:
recipient- Recipient to be added to notification
-
excludeRecipient
public void excludeRecipient(@NotNull @NotNull NotificationRecipient recipient)Description copied from interface:NotificationExclude a singular recipient from this notification. Recipient exclusion takes precedence over inclusion.- Specified by:
excludeRecipientin 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:
getHtmlImContentin interfaceNotification.HtmlImContentProvidingNotification
-
applyDefaultCssStyles
public boolean applyDefaultCssStyles()
Description copied from interface:NotificationDetermines if this notification HTML templates should be decorated with default CSS styles.- Specified by:
applyDefaultCssStylesin interfaceNotification- Returns:
- true, if default styles should be applied and inlined, false otherwise
- See Also:
NotificationFormatter.applyStyles(String)
-
-