com.atlassian.quartz.jobs
Class AbstractJob

java.lang.Object
  extended by org.springframework.scheduling.quartz.QuartzJobBean
      extended by com.atlassian.quartz.jobs.AbstractJob
All Implemented Interfaces:
com.opensymphony.xwork.LocaleProvider, org.quartz.Job
Direct Known Subclasses:
ClearOldMailErrors, DailyReportJob, TaskQueueFlushJob, UserCacheFillerJob

public abstract class AbstractJob
extends org.springframework.scheduling.quartz.QuartzJobBean
implements com.opensymphony.xwork.LocaleProvider

A base class for Quatz jobs in Confluence. It ensures that the application is in a correct state before any jobs are executed.

Author:
Ross Mason

Field Summary
static String DEFAULT_SESSION_FACTORY_BEAN_NAME
           
protected  List textProviders
           
 
Constructor Summary
AbstractJob()
           
 
Method Summary
 void addAssociatedActionForResources(Class actionClass)
           
protected  boolean allowConcurrentExecution()
           
abstract  void doExecute(org.quartz.JobExecutionContext jobExecutionContext)
           
 void executeInternal(org.quartz.JobExecutionContext jobExecutionContext)
           
 Locale getLocale()
           
 ResourceBundle getResourceBundle()
          This is a template method that can be used by extending classes to associate a ResourceBundle with the job.
 String getText(String textName)
           
 String getText(String textName, List args)
           
 void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
           
 void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)
           
 
Methods inherited from class org.springframework.scheduling.quartz.QuartzJobBean
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SESSION_FACTORY_BEAN_NAME

public static final String DEFAULT_SESSION_FACTORY_BEAN_NAME
See Also:
Constant Field Values

textProviders

protected List textProviders
Constructor Detail

AbstractJob

public AbstractJob()
Method Detail

setSessionFactory

public void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)

setApplicationConfig

public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)

executeInternal

public final void executeInternal(org.quartz.JobExecutionContext jobExecutionContext)
                           throws org.quartz.JobExecutionException
Specified by:
executeInternal in class org.springframework.scheduling.quartz.QuartzJobBean
Throws:
org.quartz.JobExecutionException

doExecute

public abstract void doExecute(org.quartz.JobExecutionContext jobExecutionContext)
                        throws org.quartz.JobExecutionException
Throws:
org.quartz.JobExecutionException

getResourceBundle

public ResourceBundle getResourceBundle()
This is a template method that can be used by extending classes to associate a ResourceBundle with the job. This can be useful when using the Job's getText methods for I18n in velocity pages By default the method will lookup a property resource bundle based on the Job class name and package

Returns:
the resource bundle to associate with the job or null

allowConcurrentExecution

protected boolean allowConcurrentExecution()

getLocale

public Locale getLocale()
Specified by:
getLocale in interface com.opensymphony.xwork.LocaleProvider

getText

public String getText(String textName)

getText

public String getText(String textName,
                      List args)

addAssociatedActionForResources

public void addAssociatedActionForResources(Class actionClass)


Copyright © 2003-2011 Atlassian. All Rights Reserved.