public abstract class AbstractNotificationType extends Object implements NotificationType
NotificationType.Scope
Modifier and Type | Field and Description |
---|---|
protected NotificationTypeModuleDescriptor |
notificationTypeModuleDescriptor |
Constructor and Description |
---|
AbstractNotificationType() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
String |
getConfigurationData()
Returns the string representation of the configurable data of the notification type to be persisted to the db
|
String |
getDescription()
Returns generic string description of this notification type
|
String |
getEditHtml()
Returns the html to be displayed on the edit screen (to input data into notification type)
|
String |
getKey()
returns key for this condition object
|
com.atlassian.plugin.web.descriptors.WeightedDescriptor |
getModuleDescriptor()
returns the moduleDescriptor for this plugin object if it exists.
|
String |
getName()
Returns a short name of the notification type
|
NotificationType.Scope |
getScope() |
String |
getViewHtml()
Returns the HTML representing the notification type for the notification
|
void |
init(com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
initialises the notification type plugin object with its module descriptor
|
boolean |
isNotificationRequired(Object event)
Determines whether or not a notification should be sent based on the event.
|
void |
populate(Map<String,String[]> config)
takes the map of config data from action and extracts the parameters it needs
|
void |
setConfigurationData(String data)
initalises the notification type object with its data based on the config string retrieved from the database
|
ErrorCollection |
validate(Map<String,String[]> params)
validate the user inputed data
|
protected NotificationTypeModuleDescriptor notificationTypeModuleDescriptor
public void setConfigurationData(@Nullable String data)
NotificationType
setConfigurationData
in interface NotificationType
data
- string representation of configurable datapublic boolean isNotificationRequired(@NotNull Object event)
NotificationType
isNotificationRequired
in interface NotificationType
public void init(@NotNull com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
NotificationType
init
in interface NotificationType
moduleDescriptor
- for this plugin object@Nullable public com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
NotificationType
getModuleDescriptor
in interface NotificationType
@NotNull public String getKey()
NotificationType
getKey
in interface NotificationType
@NotNull public String getName()
NotificationType
getName
in interface NotificationType
@NotNull public String getDescription()
NotificationType
getDescription
in interface NotificationType
public NotificationType.Scope getScope()
getScope
in interface NotificationType
@NotNull public String getConfigurationData()
NotificationType
getConfigurationData
in interface NotificationType
@NotNull public String getEditHtml()
NotificationType
getEditHtml
in interface NotificationType
@NotNull public String getViewHtml()
NotificationType
getViewHtml
in interface NotificationType
@NotNull public ErrorCollection validate(@NotNull Map<String,String[]> params)
NotificationType
validate
in interface NotificationType
params
- map of key (String), value (String []) pairs from actionpublic void populate(@NotNull Map<String,String[]> config)
NotificationType
populate
in interface NotificationType
config
- map of key (String), value (String []) pairs from actionpublic int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.