Class Job
java.lang.Object
com.netscape.cms.jobs.Job
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
RequestInQueueJob
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CMSEnginestatic final org.slf4j.Loggerprotected JobConfigprotected static String[]protected Stringprotected Stringprotected Stringprotected Stringprotected JobCronprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildContentParams(String name, String val) protected voidprotected voidbuildItemParams(String name, String val) protected voidbuildItemParams(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) abstract String[]Returns a list of configuration parameter names.Gets the configuration substore used by this jobgetId()get instance id.gets the plugin name of this job.get cron string associated with this jobprotected StringgetTemplateContent(String templatePath) voidinit(JobsScheduler scheduler, String id, String implName, JobConfig config) Initialize from the configuration file.booleantells if the job is enabledbooleanCheck whether the job has been asked to stop.protected voidmailSummary(String content) voidsetCMSEngine(CMSEngine engine) voidset instance id.voidstop()Request the job to stop gracefully.
-
Field Details
-
logger
public static final org.slf4j.Logger logger -
PROP_SUMMARY
- See Also:
-
PROP_ENABLED
- See Also:
-
PROP_EMAIL_SUBJECT
- See Also:
-
PROP_EMAIL_TEMPLATE
- See Also:
-
PROP_ITEM_TEMPLATE
- See Also:
-
PROP_SENDER_EMAIL
- See Also:
-
PROP_RECEIVER_EMAIL
- See Also:
-
STATUS_FAILURE
- See Also:
-
STATUS_SUCCESS
- See Also:
-
engine
-
mImplName
-
mConfig
-
mId
-
mCron
-
mJobCron
-
mConfigParams
-
mSummaryMailSubject
-
mMailHTML
protected boolean mMailHTML -
mMailForm
-
mItemForm
-
mSummarySenderEmail
-
mSummaryReceiverEmail
-
mContentParams
-
mItemParams
-
-
Constructor Details
-
Job
protected Job()
-
-
Method Details
-
getCMSEngine
-
setCMSEngine
-
getConfigParams
Returns a list of configuration parameter names. The list is passed to the configuration console so instances of this implementation can be configured through the console.- Returns:
- String array of configuration parameter names.
-
isEnabled
public boolean isEnabled()tells if the job is enabled- Returns:
- a boolean value indicating whether the job is enabled or not
-
init
public void init(JobsScheduler scheduler, String id, String implName, JobConfig config) throws EBaseException Initialize from the configuration file.- Parameters:
id- String name of this instanceimplName- string name of this implementationconfig- configuration store for this instance- Throws:
EBaseException- any initialization failure
-
getId
-
setId
-
getJobCron
get cron string associated with this job- Returns:
- a JobCron object that represents the schedule of this job
-
getImplName
gets the plugin name of this job.- Returns:
- a String that is the name of this implementation
-
getConfigStore
Gets the configuration substore used by this job- Returns:
- configuration store
-
getTemplateContent
-
mailSummary
-
buildItemParams
protected void buildItemParams(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) -
buildItemParams
-
buildItemParams
-
buildContentParams
-
stop
public void stop()Request the job to stop gracefully. The job may not stop immediately. -
isStopped
public boolean isStopped()Check whether the job has been asked to stop. Long running jobs should call this method occasionally inside the run() method and exit gracefully if it returns true.
-