|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.service.AbstractService
A convenience class - if you extend this class, all that needs to be implemented is run()
Field Summary | |
protected Category |
log
|
protected java.lang.String |
name
|
Constructor Summary | |
AbstractService()
|
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 |
getDefaultProperty(java.lang.String propertyKey)
|
java.lang.String |
getDescription()
A textual description of the service. |
java.lang.Long |
getLongProperty(java.lang.String propertyKey)
|
protected ObjectConfiguration |
getObjectConfiguration(java.lang.String id,
java.lang.String xmlfile,
java.util.Map params)
|
PropertySet |
getProperties()
|
java.lang.String |
getProperty(java.lang.String propertyKey)
|
boolean |
hasProperty(java.lang.String propertyKey)
|
void |
init(PropertySet props)
Initialise the service. |
boolean |
isInternal()
Indicates whether administrators can delete this service from within the web interface. |
boolean |
isUnique()
By default, services are not unique. |
abstract void |
run()
This method must be implemented in a subclass, and performs the functionality that the service performs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Category log
protected java.lang.String name
Constructor Detail |
public AbstractService()
Method Detail |
public abstract void run()
run
in interface JiraService
JiraService.init(PropertySet)
public void init(PropertySet props) throws ObjectConfigurationException
JiraService
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.
init
in interface JiraService
ObjectConfigurationException
public void destroy()
You may wish to remove any connections that you have established, eg. database connections.
destroy
in interface JiraService
public boolean isInternal()
JiraService
Generally only Atlassian services should return true from this.
isInternal
in interface JiraService
public boolean isUnique()
isUnique
in interface JiraService
public java.lang.String getDescription()
JiraService
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.
getDescription
in interface JiraService
public boolean hasProperty(java.lang.String propertyKey) throws ObjectConfigurationException
ObjectConfigurationException
public java.lang.String getProperty(java.lang.String propertyKey) throws ObjectConfigurationException
ObjectConfigurationException
public java.lang.Long getLongProperty(java.lang.String propertyKey) throws ObjectConfigurationException
ObjectConfigurationException
public java.lang.String getDefaultProperty(java.lang.String propertyKey) throws ObjectConfigurationException
ObjectConfigurationException
public PropertySet getProperties() throws ObjectConfigurationException
ObjectConfigurationException
protected ObjectConfiguration getObjectConfiguration(java.lang.String id, java.lang.String xmlfile, java.util.Map params) throws ObjectConfigurationException
ObjectConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |