Package com.netscape.cms.jobs
Class PublishCertsJob
- java.lang.Object
-
- com.netscape.cms.jobs.AJobBase
-
- com.netscape.cms.jobs.PublishCertsJob
-
- All Implemented Interfaces:
IExtendedPluginInfo
,IJob
,java.lang.Runnable
public class PublishCertsJob extends AJobBase implements IJob, java.lang.Runnable, IExtendedPluginInfo
a job for the Jobs Scheduler. This job checks in the internal ldap db for valid certs that have not been published to the publishing directory.the $TOKENS that are available for the this jobs's summary outer form are:
-
$Status $InstanceID $SummaryItemList $SummaryTotalNum $SummaryTotalSuccess $SummaryTotalfailure $ExecutionTime
-
$SerialNumber $IssuerDN $SubjectDN $NotAfter $NotBefore $RequestorEmail $CertType
- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]
mConfigParams
-
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
Constructors Constructor Description PublishCertsJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 filevoid
run()
look in the internal db for certificateRecords that are valid but not published The publish() method should set InLdapPublishDir flag accordingly.-
Methods inherited from class com.netscape.cms.jobs.AJobBase
buildContentParams, buildItemParams, buildItemParams, buildItemParams, getConfigStore, getId, getImplName, getJobCron, getTemplateContent, isEnabled, isStopped, log, log, mailSummary, setId, stop
-
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, isStopped, setId, stop
-
-
-
-
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 interfaceIExtendedPluginInfo
-
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 interfaceIJob
- Specified by:
init
in classAJobBase
id
- String name of this instanceimplName
- string name of this implementationconfig
- configuration store for this instance- Throws:
EBaseException
- any initilization failure
-
run
public void run()
look in the internal db for certificateRecords that are valid but not published The publish() method should set InLdapPublishDir flag accordingly. if publish unsuccessfully, log it -- unsuccessful certs should be picked up and attempted again at the next scheduled run
-
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 interfaceIJob
- Returns:
- String array of configuration parameter names.
-
-