@PublicSpi public interface JiraService extends ObjectConfigurable, Runnable
Modifier and Type | Field and Description |
---|---|
static Comparator<JiraService> |
NAME_COMPARATOR
Compares two given JiraService objects by their names and returns the result of the comparison.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
This method is called when the service is unloaded (usually when the web application or server
is being shut down).
|
String |
getDescription()
A textual description of the service.
|
String |
getName()
A textual name of the service as entered by the user from the web interface.
|
void |
init(com.opensymphony.module.propertyset.PropertySet props)
Deprecated.
|
default void |
init(com.opensymphony.module.propertyset.PropertySet props,
long configurationIdentifier)
Initialise the service passing configuration identifier which is unique per configuration of the service.
|
boolean |
isInternal()
Indicates whether administrators can delete this service from within the web interface.
|
boolean |
isUnique()
Whether this service class should be unique.
|
void |
run()
Perform the action of this service.
|
void |
setName(String name)
Used to set the service's name.
|
getDefaultProperty, getKey, getLongProperty, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty
static final Comparator<JiraService> NAME_COMPARATOR
@Deprecated void init(com.opensymphony.module.propertyset.PropertySet props) throws ObjectConfigurationException
init(PropertySet, long)
As the parameters are gained from the user's interaction with the website, it is not guaranteed to be called with the correct, or indeed with any parameters.
init() may be called multiple times during the services lifetime.
props
- initialisation parametersObjectConfigurationException
- in case of an error with initialisation parametersinit(PropertySet, long)
default void init(com.opensymphony.module.propertyset.PropertySet props, long configurationIdentifier) throws ObjectConfigurationException
As the parameters are gained from the user's interaction with the website, it is not guaranteed to be called with the correct, or indeed with any parameters.
this method may be called multiple times during the services lifetime.
props
- initialisation parametersconfigurationIdentifier
- identifier of the configuration of the serviceObjectConfigurationException
- in case of an error with initialisation parametersvoid run()
init() is guaranteed to be called before run(), but the parameters passed to init() are not guaranteed to be correct. Any parameters expected to be set by init() should be checked in this method upon each invocation.
run
in interface Runnable
init(com.opensymphony.module.propertyset.PropertySet)
void destroy()
You may wish to remove any connections that you have established, eg. database connections.
boolean isInternal()
Generally only Atlassian services should return true from this.
boolean isUnique()
Having multiple backup services could be fine - perhaps you want to backup once an hour, and also once a day.
With other services, you may wish to enforce their uniqueness
String getDescription()
A good description will describe what this service does, and then explains the parameters required for configuring the service.
If no description is appropriate, return null.
String getName()
The name should be unique to identify services of the same class.
This is enforced when adding new services via the web interface.
The value of name does not effect the service, hence can be set to null
Copyright © 2002-2019 Atlassian. All Rights Reserved.