|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes that are to be run as services within JIRA must implement this class.
Method Summary | |
void |
destroy()
This method is called when the service is unloaded (usually when the web application or server is being shut down). |
java.lang.String |
getDescription()
A textual description of the service. |
void |
init(com.opensymphony.module.propertyset.PropertySet props)
Initialise 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. |
Methods inherited from interface com.atlassian.configurable.ObjectConfigurable |
getDefaultProperty, getKey, getLongProperty, getObjectConfiguration, getProperties, getProperty, hasProperty |
Method Detail |
public void init(com.opensymphony.module.propertyset.PropertySet props) throws com.atlassian.configurable.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.
init() may be called multiple times during the services lifetime.
com.atlassian.configurable.ObjectConfigurationException
public void 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.
init(com.opensymphony.module.propertyset.PropertySet)
public void destroy()
You may wish to remove any connections that you have established, eg. database connections.
public boolean isInternal()
Generally only Atlassian services should return true from this.
public 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
public java.lang.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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |