|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.service.AbstractService
public abstract class AbstractService
A convenience class - if you extend this class, all that needs to be implemented is run()
| Field Summary | |
|---|---|
protected org.apache.log4j.Logger |
log
|
protected String |
name
|
| Fields inherited from interface com.atlassian.jira.service.JiraService |
|---|
NAME_COMPARATOR |
| 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). |
String |
getDefaultProperty(String propertyKey)
Returns the default property value for a key |
String |
getDescription()
A textual description of the service. |
String |
getKey()
Return the key of this object |
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. |
protected ObjectConfiguration |
getObjectConfiguration(String id,
String xmlfile,
Map<String,String[]> params)
|
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 |
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 |
isInternal()
By default, returns false. |
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. |
void |
setName(String name)
Used to set the service's name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.configurable.ObjectConfigurable |
|---|
getObjectConfiguration |
| Field Detail |
|---|
protected org.apache.log4j.Logger log
protected String name
| Constructor Detail |
|---|
public AbstractService()
| Method Detail |
|---|
public abstract void run()
run in interface JiraServicerun in interface RunnableJiraService.init(com.opensymphony.module.propertyset.PropertySet)
public void init(com.opensymphony.module.propertyset.PropertySet props)
throws ObjectConfigurationException
JiraService
init in interface JiraServiceprops - initialisation parameters
ObjectConfigurationException - in case of an error with initialisation parameterspublic void destroy()
destroy in interface JiraServicepublic boolean isInternal()
isInternal in interface JiraServicepublic String getKey()
ObjectConfigurable
getKey in interface ObjectConfigurablepublic boolean isUnique()
isUnique in interface JiraServicepublic String getDescription()
JiraService
getDescription in interface JiraService
public boolean hasProperty(String propertyKey)
throws ObjectConfigurationException
ObjectConfigurable
hasProperty in interface ObjectConfigurablepropertyKey - to look for
ObjectConfigurationException
public String getProperty(String propertyKey)
throws ObjectConfigurationException
ObjectConfigurable
getProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the property value
ObjectConfigurationException
public String getTextProperty(String propertyKey)
throws ObjectConfigurationException
ObjectConfigurable
getTextProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the property value
ObjectConfigurationException
public Long getLongProperty(String propertyKey)
throws ObjectConfigurationException
ObjectConfigurable
getLongProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the property value
ObjectConfigurationException
public String getDefaultProperty(String propertyKey)
throws ObjectConfigurationException
ObjectConfigurable
getDefaultProperty in interface ObjectConfigurablepropertyKey - String key used to retrieve the properties default value
ObjectConfigurationException
public com.opensymphony.module.propertyset.PropertySet getProperties()
throws ObjectConfigurationException
ObjectConfigurable
getProperties in interface ObjectConfigurableObjectConfigurationException
protected ObjectConfiguration getObjectConfiguration(String id,
String xmlfile,
Map<String,String[]> params)
throws ObjectConfigurationException
ObjectConfigurationExceptionpublic String getName()
JiraService
getName in interface JiraServicepublic void setName(String name)
JiraServiceJiraService.getName()
setName in interface JiraServicename - service name to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||