|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.service.JiraServiceContainer
Proxies calls to JiraService & manages delay between calls.
Constructor Summary | |
JiraServiceContainer(JiraService service)
|
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[] |
getAcceptedParams()
Deprecated. |
java.lang.String |
getDefaultProperty(java.lang.String propertyKey)
|
long |
getDelay()
The length of delay in milliseconds between runs of this service. |
java.lang.String |
getDescription()
A textual description of the service. |
java.lang.String |
getKey()
|
long |
getLastRun()
The time that this service was last run. |
java.lang.Long |
getLongProperty(java.lang.String propertyKey)
|
com.atlassian.configurable.ObjectConfiguration |
getObjectConfiguration()
|
com.opensymphony.module.propertyset.PropertySet |
getProperties()
|
java.lang.String |
getProperty(java.lang.String propertyKey)
|
boolean |
hasProperty(java.lang.String propertyKey)
|
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 |
isRunning()
Whether a service is currently running. |
boolean |
isUnique()
Whether this service class should be unique. |
void |
run()
Perform the action of this service. |
void |
setDelay(long delay)
Sets the delay between invocation of each service. |
void |
setLastRun()
Set the last run time to be the current time. |
void |
setRunning(boolean running)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JiraServiceContainer(JiraService service)
Method Detail |
public void init(com.opensymphony.module.propertyset.PropertySet props) throws com.atlassian.configurable.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
com.atlassian.configurable.ObjectConfigurationException
public java.lang.String[] getAcceptedParams()
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.
run
in interface JiraService
JiraService.init(com.opensymphony.module.propertyset.PropertySet)
public void destroy()
You may wish to remove any connections that you have established, eg. database connections.
destroy
in interface JiraService
public boolean isInternal()
Generally only Atlassian services should return true from this.
isInternal
in interface JiraService
public final long getLastRun()
public final void setLastRun()
run()
public void setDelay(long delay)
delay
- The time in milliseconds between runs of the service.public long getDelay()
public boolean isUnique()
JiraService
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
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 java.lang.String toString()
public com.atlassian.configurable.ObjectConfiguration getObjectConfiguration() throws com.atlassian.configurable.ObjectConfigurationException
getObjectConfiguration
in interface com.atlassian.configurable.ObjectConfigurable
com.atlassian.configurable.ObjectConfigurationException
public boolean hasProperty(java.lang.String propertyKey) throws com.atlassian.configurable.ObjectConfigurationException
hasProperty
in interface com.atlassian.configurable.ObjectConfigurable
com.atlassian.configurable.ObjectConfigurationException
public java.lang.String getProperty(java.lang.String propertyKey) throws com.atlassian.configurable.ObjectConfigurationException
getProperty
in interface com.atlassian.configurable.ObjectConfigurable
com.atlassian.configurable.ObjectConfigurationException
public java.lang.Long getLongProperty(java.lang.String propertyKey) throws com.atlassian.configurable.ObjectConfigurationException
getLongProperty
in interface com.atlassian.configurable.ObjectConfigurable
com.atlassian.configurable.ObjectConfigurationException
public java.lang.String getDefaultProperty(java.lang.String propertyKey) throws com.atlassian.configurable.ObjectConfigurationException
getDefaultProperty
in interface com.atlassian.configurable.ObjectConfigurable
com.atlassian.configurable.ObjectConfigurationException
public com.opensymphony.module.propertyset.PropertySet getProperties() throws com.atlassian.configurable.ObjectConfigurationException
getProperties
in interface com.atlassian.configurable.ObjectConfigurable
com.atlassian.configurable.ObjectConfigurationException
public boolean isRunning()
public void setRunning(boolean running)
public java.lang.String getKey()
getKey
in interface com.atlassian.configurable.ObjectConfigurable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |