Class AbstractNotification
java.lang.Object
com.atlassian.bamboo.notification.AbstractNotification
- All Implemented Interfaces:
Notification,Notification.HtmlImContentProvidingNotification
- Direct Known Subclasses:
AbstractAccessTokenNotification,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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecipient(@NotNull NotificationRecipient recipient) Add a singular recipient to this notificationbooleanDetermines 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 BambooEventgetEvent()Retrieves the event object that triggered this notification.@NotNull Set<NotificationRecipient> Returns the excluded recipients of this Notification@NotNull Set<NotificationRecipient> Returns the recipients of this Notification@Nullable ObjectRetrieves the event object that triggered this notificationvoidsetEvent(@Nullable BambooEvent event) Sets the event object that triggered this notification Before 10.0 this method received a com.atlassian.event.Event object.voidSets 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 NotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.notification.Notification
getDescription, getEmailSubject, getHtmlEmailContent, getIMContent, getTextEmailContent
-
Field Details
-
NAVIGATION_SOURCE
- See Also:
-
-
Constructor Details
-
AbstractNotification
public AbstractNotification()
-
-
Method Details
-
setEvent
Description copied from interface:NotificationSets the event object that triggered this notification Before 10.0 this method received a com.atlassian.event.Event object. Now it receivesBambooEvent.- Specified by:
setEventin interfaceNotification- Parameters:
event- Event object that triggered this notification
-
setEvent
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
Description copied from interface:NotificationRetrieves the event object that triggered this notification. Before 10.0 this method returned a com.atlassian.event.Event object. Now it returnsBambooEvent.- Specified by:
getEventin interfaceNotification- Returns:
- Event object that triggered this notification
-
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
Description copied from interface:NotificationReturns the recipients of this Notification- Specified by:
getNotificationRecipientsin interfaceNotification- Returns:
- Set of notification recipients
-
getExcludedNotificationRecipients
Description copied from interface:NotificationReturns the excluded recipients of this Notification- Specified by:
getExcludedNotificationRecipientsin interfaceNotification- Returns:
- Set of excluded notification recipients
-
setNotificationRecipients
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
Description copied from interface:NotificationAdd a singular recipient to this notification- Specified by:
addRecipientin interfaceNotification- Parameters:
recipient- Recipient to be added to notification
-
excludeRecipient
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
-
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
- 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:
-