com.atlassian.bamboo.notification.recipients
Class GroupRecipient

java.lang.Object
  extended by com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
      extended by com.atlassian.bamboo.notification.recipients.GroupRecipient
All Implemented Interfaces:
NotificationRecipient, NotificationRecipient.UserRecipientExpandable, Comparable

public class GroupRecipient
extends AbstractNotificationRecipient
implements NotificationRecipient.UserRecipientExpandable

Represents a group recipient. Knows how to evaluate the group into relavent users.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.bamboo.notification.NotificationRecipient
NotificationRecipient.RequiresEvent, NotificationRecipient.RequiresPlan, NotificationRecipient.RequiresResultSummary, NotificationRecipient.UserRecipientExpandable
 
Field Summary
static String GROUP_FIELD
           
 
Fields inherited from class com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
notificationRecipientModuleDescriptor
 
Constructor Summary
GroupRecipient()
           
 
Method Summary
 String getEditHtml()
          Returns the html to be displayed on the edit screen (to input data into notification type)
 String getRecipientConfig()
          Retrieve string representation of data - if none exists retrun empty string
 List<NotificationTransport> getTransports()
          Evaluates the appropriate mediums for sending notificaions for this recipient, returning a list of appropriate transports.
 Set<UserRecipient> getUserRecipients()
           
 String getViewHtml()
          Returns the HTML representing the notification type for the notification
 void init(String configurationData)
          Initialise recipient with string based represention of its configuration data
 void populate(Map<String,String[]> params)
          takes the map of config data from action and extracts the parameters it needs
 void setBambooUserManager(BambooUserManager bambooUserManager)
           
 void setGroupName(String groupName)
           
 void setNotificationFactory(NotificationFactory notificationFactory)
           
 void setTemplateRenderer(TemplateRenderer templateRenderer)
           
 ErrorCollection validate(Map<String,String[]> params)
          validate the user inputed data
 
Methods inherited from class com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
compareTo, getDescription, getKey, getModuleDescriptor, getParam, getTransports, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GROUP_FIELD

public static final String GROUP_FIELD
See Also:
Constant Field Values
Constructor Detail

GroupRecipient

public GroupRecipient()
Method Detail

getTransports

@NotNull
public List<NotificationTransport> getTransports()
Description copied from interface: NotificationRecipient
Evaluates the appropriate mediums for sending notificaions for this recipient, returning a list of appropriate transports.

Specified by:
getTransports in interface NotificationRecipient
Returns:

getUserRecipients

@NotNull
public Set<UserRecipient> getUserRecipients()
Specified by:
getUserRecipients in interface NotificationRecipient.UserRecipientExpandable

init

public void init(@Nullable
                 String configurationData)
Description copied from interface: NotificationRecipient
Initialise recipient with string based represention of its configuration data

Specified by:
init in interface NotificationRecipient
Overrides:
init in class AbstractNotificationRecipient

getRecipientConfig

@NotNull
public String getRecipientConfig()
Description copied from interface: NotificationRecipient
Retrieve string representation of data - if none exists retrun empty string

Specified by:
getRecipientConfig in interface NotificationRecipient
Overrides:
getRecipientConfig in class AbstractNotificationRecipient
Returns:

populate

public void populate(@NotNull
                     Map<String,String[]> params)
Description copied from interface: NotificationRecipient
takes the map of config data from action and extracts the parameters it needs

Specified by:
populate in interface NotificationRecipient
Overrides:
populate in class AbstractNotificationRecipient
Parameters:
params - map of key (String), value (String []) pairs from action

validate

@NotNull
public ErrorCollection validate(@NotNull
                                        Map<String,String[]> params)
Description copied from interface: NotificationRecipient
validate the user inputed data

Specified by:
validate in interface NotificationRecipient
Overrides:
validate in class AbstractNotificationRecipient
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

@NotNull
public String 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 interface NotificationRecipient
Overrides:
getEditHtml in class AbstractNotificationRecipient
Returns:
String of html

getViewHtml

@NotNull
public String getViewHtml()
Description copied from interface: NotificationRecipient
Returns the HTML representing the notification type for the notification

Specified by:
getViewHtml in interface NotificationRecipient
Overrides:
getViewHtml in class AbstractNotificationRecipient
Returns:
HTML of data for view configuration. If this returns null the description will be used.

setGroupName

public void setGroupName(String groupName)

setBambooUserManager

public void setBambooUserManager(BambooUserManager bambooUserManager)

setTemplateRenderer

public void setTemplateRenderer(TemplateRenderer templateRenderer)

setNotificationFactory

public void setNotificationFactory(NotificationFactory notificationFactory)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.