com.netscape.cms.jobs
Class UnpublishExpiredJob

java.lang.Object
  extended by com.netscape.cms.jobs.AJobBase
      extended by com.netscape.cms.jobs.UnpublishExpiredJob
All Implemented Interfaces:
IExtendedPluginInfo, IJob, java.lang.Runnable

public class UnpublishExpiredJob
extends AJobBase
implements IJob, java.lang.Runnable, IExtendedPluginInfo

a job for the Jobs Scheduler. This job checks in the internal ldap db for certs that have expired and remove them from the ldap publishing directory.

the $TOKENS that are available for the this jobs's summary outer form are:

and for the inner list items:

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
protected static java.lang.String[] mConfigParams
           
protected static java.util.Vector mExtendedPluginInfo
           
 
Fields inherited from class com.netscape.cms.jobs.AJobBase
mConfig, mContentParams, mCron, mId, mImplName, mItemForm, mItemParams, mJobCron, mLogger, mMailForm, mMailHTML, mSummaryMailSubject, mSummaryReceiverEmail, mSummarySenderEmail, PROP_EMAIL_SUBJECT, PROP_EMAIL_TEMPLATE, PROP_ENABLED, PROP_ITEM_TEMPLATE, PROP_RECEIVER_EMAIL, PROP_SENDER_EMAIL, PROP_SUMMARY, STATUS_FAILURE, STATUS_SUCCESS
 
Fields inherited from interface com.netscape.certsrv.base.IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN
 
Constructor Summary
UnpublishExpiredJob()
           
 
Method Summary
 java.lang.String[] getConfigParams()
          Returns a list of configuration parameter names.
 java.lang.String[] getExtendedPluginInfo(java.util.Locale locale)
          This method returns an array of strings.
 void init(ISubsystem owner, java.lang.String id, java.lang.String implName, IConfigStore config)
          initialize from the configuration file
 void run()
          look in the internal db for certificateRecords that are expired.
 
Methods inherited from class com.netscape.cms.jobs.AJobBase
buildContentParams, buildItemParams, buildItemParams, buildItemParams, getConfigStore, getId, getImplName, getJobCron, getTemplateContent, isEnabled, log, log, mailSummary, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.netscape.certsrv.jobs.IJob
getConfigStore, getId, getImplName, getJobCron, isEnabled, setId
 

Field Detail

mConfigParams

protected static java.lang.String[] mConfigParams

mExtendedPluginInfo

protected static java.util.Vector mExtendedPluginInfo
Constructor Detail

UnpublishExpiredJob

public UnpublishExpiredJob()
Method Detail

getExtendedPluginInfo

public java.lang.String[] getExtendedPluginInfo(java.util.Locale locale)
Description copied from interface: IExtendedPluginInfo
This method returns an array of strings. Each element of the array represents a configurable parameter, or some other meta-info (such as help-token) there is an entry indexed on that parameter name ;[,required];;... Where: type_info is either 'string', 'number', 'boolean', 'password' or 'choice(ch1,ch2,ch3,...)' If the marker 'required' is included after the type_info, the parameter will has some visually distinctive marking in the UI. 'description' is a short sentence describing the parameter 'choice' is rendered as a drop-down list. The first parameter in the list will be activated by default 'boolean' is rendered as a checkbox. The resulting parameter will be either 'true' or 'false' 'string' allows any characters 'number' allows only numbers 'password' is rendered as a password field (the characters are replaced with *'s when being types. This parameter is not passed through to the plugin. It is instead inserted directly into the password cache keyed on the instance name. The value of the parameter 'bindPWPrompt' (see example below) is set to the key. In addition to the configurable parameters, the following magic parameters may be defined: HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin HELP_TEXT;helptext - a general help string describing the plugin For example: "username;string;The username you wish to login as" "bindPWPrompt;password;Enter password to bind as above user with" "algorithm;choice(RSA,DSA);Which algorithm do you want to use" "enable;boolean;Do you want to run this plugin" "port;number;Which port number do you want to use"

Specified by:
getExtendedPluginInfo in interface IExtendedPluginInfo

init

public void init(ISubsystem owner,
                 java.lang.String id,
                 java.lang.String implName,
                 IConfigStore config)
          throws EBaseException
initialize from the configuration file

Specified by:
init in interface IJob
Specified by:
init in class AJobBase
id - String name of this instance
implName - string name of this implementation
config - configuration store for this instance
Throws:
EBaseException - any initilization failure

run

public void run()
look in the internal db for certificateRecords that are expired. remove them from ldap publishing directory if remove successfully, mark false on the InLdapPublishDir flag, else, if remove unsuccessfully, log it

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class AJobBase

getConfigParams

public java.lang.String[] 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.

Specified by:
getConfigParams in interface IJob
Returns:
String array of configuration parameter names.