public class JiraServiceContainerImpl extends Object implements JiraServiceContainer
NAME_COMPARATOR| Constructor and Description |
|---|
JiraServiceContainerImpl(JiraService service,
Long id) |
| 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 |
getCronExpression()
Get the cron expression.
|
String |
getDefaultProperty(String propertyKey)
Returns the default property value for a key
|
long |
getDelay()
The length of delay in milliseconds between runs of this service.
|
String |
getDescription()
A textual description of the service.
|
Long |
getId() |
String |
getKey()
Return the key of this object
|
long |
getLastRun()
The time that this service was last run.
|
Long |
getLongProperty(String propertyKey)
Returns a property of this object with the specified key as a long
|
String |
getName()
A textual name of the service as entered by the user from the web interface.
|
ObjectConfiguration |
getObjectConfiguration()
Retrieves an object configuration object with properties that can be set
|
com.opensymphony.module.propertyset.PropertySet |
getProperties()
Retrieve all the specified Properties for this object
|
String |
getProperty(String propertyKey)
Returns a property of this object with the specified key
|
String |
getServiceClass() |
Class<? extends JiraService> |
getServiceClassObject() |
String |
getTextProperty(String propertyKey)
Returns a property of this object with the specified key, the property is of type text
|
boolean |
hasProperty(String propertyKey)
Checks if this object has a particular property
|
void |
init(com.opensymphony.module.propertyset.PropertySet props)
Initialise the service.
|
boolean |
isDueAt(long time)
Is this service due to run at the specified time.
|
boolean |
isInternal()
Indicates whether administrators can delete this service from within the web interface.
|
boolean |
isLocalService()
Returns true if in a clustered environment this service should run locally on every node.
|
boolean |
isRunning()
Whether a service is currently running.
|
boolean |
isUnique()
Whether this service class should be unique.
|
boolean |
isUsable() |
void |
run()
Perform the action of this service.
|
void |
setCronExpression(String cronExpression)
Set the cron expression.
|
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 |
setName(String name)
Used to set the service's name.
|
String |
toString() |
public JiraServiceContainerImpl(JiraService service, Long id)
public void init(com.opensymphony.module.propertyset.PropertySet props)
throws ObjectConfigurationException
JiraServiceinit in interface JiraServiceprops - initialisation parametersObjectConfigurationException - in case of an error with initialisation parameterspublic void run()
run in interface JiraServicerun in interface RunnableJiraService.init(com.opensymphony.module.propertyset.PropertySet)public void destroy()
destroy in interface JiraServicepublic boolean isInternal()
isInternal in interface JiraServicepublic final long getLastRun()
getLastRun in interface JiraServiceContainerpublic final void setLastRun()
setLastRun in interface JiraServiceContainerrun()public void setDelay(long delay)
setDelay in interface JiraServiceContainerdelay - The time in milliseconds between runs of the service.public long getDelay()
getDelay in interface JiraServiceContainerpublic String getCronExpression()
JiraServiceContainergetCronExpression in interface JiraServiceContainerpublic void setCronExpression(String cronExpression)
JiraServiceContainersetCronExpression in interface JiraServiceContainercronExpression - Cron Expressionpublic boolean isDueAt(long time)
JiraServiceContainerisDueAt in interface JiraServiceContainertime - the time to check whether it is due.public boolean isUnique()
JiraServiceisUnique in interface JiraServicepublic String getDescription()
JiraServicegetDescription in interface JiraServicepublic String getName()
JiraServicegetName in interface JiraServicepublic void setName(String name)
JiraServiceJiraService.getName()setName in interface JiraServicename - service name to setpublic ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException
ObjectConfigurablegetObjectConfiguration in interface ObjectConfigurableObjectConfigurationExceptionpublic boolean hasProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurablehasProperty in interface ObjectConfigurablepropertyKey - to look forObjectConfigurationExceptionpublic String getProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurablegetProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the property valueObjectConfigurationExceptionpublic String getTextProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurablegetTextProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the property valueObjectConfigurationExceptionpublic Long getLongProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurablegetLongProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the property valueObjectConfigurationExceptionpublic String getDefaultProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurablegetDefaultProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the properties default valueObjectConfigurationExceptionpublic com.opensymphony.module.propertyset.PropertySet getProperties()
throws ObjectConfigurationException
ObjectConfigurablegetProperties in interface ObjectConfigurableObjectConfigurationExceptionpublic boolean isRunning()
isRunning in interface JiraServiceContainerpublic String getKey()
ObjectConfigurablegetKey in interface ObjectConfigurablepublic Long getId()
getId in interface JiraServiceContainerpublic String getServiceClass()
getServiceClass in interface JiraServiceContainer@Nonnull public Class<? extends JiraService> getServiceClassObject()
getServiceClassObject in interface JiraServiceContainerpublic boolean isUsable()
isUsable in interface JiraServiceContainerpublic boolean isLocalService()
JiraServiceContainerisLocalService in interface JiraServiceContainerCopyright © 2002-2015 Atlassian. All Rights Reserved.