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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRecipient
(@NotNull NotificationRecipient recipient) Add a singular recipient to this notificationboolean
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 BambooEvent
getEvent()
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 Object
Retrieves the event object that triggered this notificationgetRepositoryData
(@Nullable RepositoryDataEntity entity) Deprecated.since 6.4 old repository interfacegetRepositoryData
(@Nullable RepositoryChangeset repositoryChangeset) Deprecated.since 6.4 old repository interfacevoid
setEvent
(@Nullable BambooEvent event) Sets the event object that triggered this notification Before 10.0 this method received a com.atlassian.event.Event object.void
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 NotificationMethods 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 Details
-
NAVIGATION_SOURCE
- See Also:
-
-
Constructor Details
-
AbstractNotification
public AbstractNotification()
-
-
Method Details
-
setEvent
Description copied from interface:Notification
Sets the event object that triggered this notification Before 10.0 this method received a com.atlassian.event.Event object. Now it receivesBambooEvent
.- Specified by:
setEvent
in interfaceNotification
- Parameters:
event
- Event object that triggered this notification
-
setEvent
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
Description copied from interface:Notification
Retrieves the event object that triggered this notification. Before 10.0 this method returned a com.atlassian.event.Event object. Now it returnsBambooEvent
.- Specified by:
getEvent
in interfaceNotification
- Returns:
- Event object that triggered this notification
-
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
Description copied from interface:Notification
Returns the recipients of this Notification- Specified by:
getNotificationRecipients
in interfaceNotification
- Returns:
- Set of notification recipients
-
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
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
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
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
- 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:
-