public String getName() { return service.getName(); }
/** * This method is called when the service is unloaded (usually when the web application or server * is being shut down). * <p/> * You may wish to remove any connections that you have established, eg. database connections. */ public void destroy() { service.destroy(); }
public String getDescription() { return service.getDescription(); }
try fieldKeys = service.getObjectConfiguration().getFieldKeys(); throw new ServiceException("Unable to get ObjectConfiguration for Service '" + service.getName() + "'.", ex);
/** * Indicates whether administrators can delete this service from within the web interface. * <p/> * Generally only Atlassian services should return true from this. */ public boolean isInternal() { return service.isInternal(); }
public void init(final PropertySet props) throws ObjectConfigurationException { service.init(props); }
public String getProperty(final String propertyKey) throws ObjectConfigurationException { return service.getProperty(propertyKey); }
public PropertySet getProperties() throws ObjectConfigurationException { return service.getProperties(); }
public boolean hasProperty(final String propertyKey) throws ObjectConfigurationException { return service.hasProperty(propertyKey); }
public String getTextProperty(final String propertyKey) throws ObjectConfigurationException { return service.getTextProperty(propertyKey); }
public ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException { return service.getObjectConfiguration(); }
public void onOpenTransaction() { log.error("Connection not cleared from thread local while running service."); if (service != null) { log.error("Service name: " + service.getName()); } else { log.error("The service is null"); } } });
private static JiraServiceContainer instantiateServiceContainer(final JiraService service, final GenericValue serviceConfigGV, final PropertySet ps) throws ServiceException { final Long id = serviceConfigGV.getLong(SERVICE_CONFIG_ID); try { final JiraServiceContainer jiraServiceContainer = new JiraServiceContainerImpl(service, id); jiraServiceContainer.init(ps); jiraServiceContainer.setName(serviceConfigGV.getString(SERVICE_CONFIG_NAME)); final Long delay = serviceConfigGV.getLong(SERVICE_CONFIG_TIME); jiraServiceContainer.setDelay(delay == null ? -1 : delay); jiraServiceContainer.setCronExpression(serviceConfigGV.getString(SERVICE_CONFIG_CRON)); return jiraServiceContainer; } catch (ObjectConfigurationException e) { throw new ServiceException("Could not initialize service '" + service.getName() + "'.", e); } catch (RuntimeException e) { throw new ServiceException("Error creating service '" + service.getName() + "'.", e); } }