Class UserRecipientImpl
java.lang.Object
com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
com.atlassian.bamboo.notification.recipients.UserRecipientImpl
- All Implemented Interfaces:
NotificationRecipient
,UserRecipient
,BambooPluginModule
,Comparable
Represents a user notification recipient. Knows how to obtain user notification preferences
and generate NotificationTransports accordingly.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.notification.NotificationRecipient
NotificationRecipient.RequiresEvent, NotificationRecipient.RequiresPlan, NotificationRecipient.RequiresResultSummary, NotificationRecipient.Scope, NotificationRecipient.UserRecipientExpandable
-
Field Summary
Fields inherited from class com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
notificationRecipientModuleDescriptor
Fields inherited from interface com.atlassian.bamboo.notification.recipients.UserRecipient
USER_FIELD, USER_LONG_FIELD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
Returns the html to be displayed on the edit screen (to input data into notification type)@NotNull String
Retrieve string representation of data - if none exists return empty string@NotNull List<NotificationTransport>
Evaluates the appropriate mediums for sending notifications for this recipient, returning a list of appropriate transports.@NotNull String
Returns the HTML representing the notification type for the notificationvoid
Initialise recipient with string based representation of its configuration datavoid
takes the map of config data from action and extracts the parameters it needsvoid
setBambooUserManager
(BambooUserManager bambooUserManager) void
setNotificationFactory
(NotificationFactory notificationFactory) void
setTemplateRenderer
(TemplateRenderer templateRenderer) void
setTextProvider
(com.opensymphony.xwork2.TextProvider textProvider) void
setUsername
(String username) toString()
@NotNull ErrorCollection
Validate the data user provided.Methods inherited from class com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
compareTo, getDescription, getKey, getModuleDescriptor, getParam, getScopes, getTransports, init
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.atlassian.bamboo.notification.NotificationRecipient
getDescription, getKey, getModuleDescriptor, getScopes, init
-
Constructor Details
-
UserRecipientImpl
public UserRecipientImpl()
-
-
Method Details
-
getTransports
Description copied from interface:NotificationRecipient
Evaluates the appropriate mediums for sending notifications for this recipient, returning a list of appropriate transports.- Specified by:
getTransports
in interfaceNotificationRecipient
-
init
Description copied from interface:NotificationRecipient
Initialise recipient with string based representation of its configuration data- Specified by:
init
in interfaceNotificationRecipient
- Overrides:
init
in classAbstractNotificationRecipient
-
getRecipientConfig
Description copied from interface:NotificationRecipient
Retrieve string representation of data - if none exists return empty string- Specified by:
getRecipientConfig
in interfaceNotificationRecipient
- Overrides:
getRecipientConfig
in classAbstractNotificationRecipient
-
populate
Description copied from interface:NotificationRecipient
takes the map of config data from action and extracts the parameters it needs- Specified by:
populate
in interfaceNotificationRecipient
- Overrides:
populate
in classAbstractNotificationRecipient
- Parameters:
params
- map of key (String), value (String []) pairs from action
-
validate
Description copied from interface:NotificationRecipient
Validate the data user provided.- Specified by:
validate
in interfaceNotificationRecipient
- Overrides:
validate
in classAbstractNotificationRecipient
- Parameters:
params
- map of key (String), value (String []) pairs from action- Returns:
- error collection of any errors to be reported back to the user
-
getEditHtml
Description copied from interface:NotificationRecipient
Returns the html to be displayed on the edit screen (to input data into notification type)- Specified by:
getEditHtml
in interfaceNotificationRecipient
- Overrides:
getEditHtml
in classAbstractNotificationRecipient
- Returns:
- String of html
-
getViewHtml
Description copied from interface:NotificationRecipient
Returns the HTML representing the notification type for the notification- Specified by:
getViewHtml
in interfaceNotificationRecipient
- Overrides:
getViewHtml
in classAbstractNotificationRecipient
- Returns:
- HTML of data for view configuration. If this returns null the description will be used.
-
setUsername
- Specified by:
setUsername
in interfaceUserRecipient
-
getUsername
- Specified by:
getUsername
in interfaceUserRecipient
-
setBambooUserManager
-
setNotificationFactory
-
setTemplateRenderer
-
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider) -
toString
-