com.atlassian.jira.service.JiraService |
Clients of @PublicSpi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicSpi
as per each product's API policy (clients should refer to each product's API policy for
the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).
@PublicSpi
interfaces and classes are specifically designed to be implemented/extended by clients.
Hence, the guarantee of binary compatibility is different to that of @PublicApi
elements (if an element
is both @PublicApi
and @PublicSpi
, both guarantees apply).
Classes that are to be run as services within JIRA must implement this interface.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NAME_COMPARATOR | Compares two given JiraService objects by their names and returns the result of the comparison. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is called when the service is unloaded (usually when the web application or server
is being shut down).
| |||||||||||
A textual description of the service.
| |||||||||||
A textual name of the service as entered by the user from the web interface.
| |||||||||||
Initialise the service.
| |||||||||||
Indicates whether administrators can delete this service from within the web interface.
| |||||||||||
Whether this service class should be unique.
| |||||||||||
Perform the action of this service.
| |||||||||||
Used to set the service's name.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.configurable.ObjectConfigurable
| |||||||||||
From interface
java.lang.Runnable
|
Compares two given JiraService objects by their names and returns the result of the comparison.
This method is called when the service is unloaded (usually when the web application or server is being shut down).
You may wish to remove any connections that you have established, eg. database connections.A textual description of the service. You can include HTML if required, but do not use tables, or DHTML, as the description may be displayed inside tables / frames.
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.A textual name of the service as entered by the user from the web interface.
The name should be unique to identify services of the same class.Initialise the service. This method is guaranteed to be called before the first call to run().
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 parameters |
---|
ObjectConfigurationException | in case of an error with initialisation parameters |
---|
Indicates whether administrators can delete this service from within the web interface.
Generally only Atlassian services should return true from this.Whether this service class should be unique. Some service are fine to have multiples, and some are not.
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 uniquenessPerform the action of this service. The caller of this method assumes that no housekeeping has been done, and will call setLastRun() after the run() method.
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.Used to set the service's name. For details on the services name see getName()
name | service name to set |
---|