Class RenewalNotificationJob

  • All Implemented Interfaces:
    IExtendedPluginInfo, IJob, java.lang.Runnable

    public class RenewalNotificationJob
    extends AJobBase
    implements IJob, java.lang.Runnable, IExtendedPluginInfo
    A job for the Jobs Scheduler. This job checks in the internal ldap db for certs about to expire within the next configurable days and sends email notifications to the appropriate recipients. the $TOKENS that are available for the this jobs's summary outer form are:
    • $Status
    • $InstanceID
    • $SummaryItemList
    • $SummaryTotalNum
    • $SummaryTotalSuccess
    • $SummaryTotalfailure
    • $ExecutionTime
    and for the inner list items:
    • $SerialNumber
    • $IssuerDN
    • $SubjectDN
    • $NotAfter
    • $NotBefore
    • $RequestorEmail
    • $CertType
    • $RequestType
    • $HttpHost
    • $HttpPort
    Version:
    $Revision$, $Date$
    See Also:
    IJob, AJobBase
    • Field Detail

      • PROP_PROFILE_ID

        public static final java.lang.String PROP_PROFILE_ID
        Profile ID specifies which profile approves the certificate.
        See Also:
        Constant Field Values
      • PROP_NOTIFYTRIGGEROFFSET

        public static final java.lang.String PROP_NOTIFYTRIGGEROFFSET
        This job will send notification at this much time before the enpiration date
        See Also:
        Constant Field Values
      • PROP_NOTIFYENDOFFSET

        public static final java.lang.String PROP_NOTIFYENDOFFSET
        This job will stop sending notification this much time after the expiration date
        See Also:
        Constant Field Values
      • PROP_SENDEREMAIL

        public static final java.lang.String PROP_SENDEREMAIL
        sender email address as appeared on the notification email
        See Also:
        Constant Field Values
      • PROP_EMAILSUBJECT

        public static final java.lang.String PROP_EMAILSUBJECT
        email subject line as appeared on the notification email
        See Also:
        Constant Field Values
      • PROP_EMAILTEMPLATE

        public static final java.lang.String PROP_EMAILTEMPLATE
        location of the template file used for email notification
        See Also:
        Constant Field Values
      • PROP_MAXNOTIFYCOUNT

        public static final java.lang.String PROP_MAXNOTIFYCOUNT
        See Also:
        Constant Field Values
      • PROP_SUMMARY_SENDEREMAIL

        public static final java.lang.String PROP_SUMMARY_SENDEREMAIL
        sender email as appeared on the notification summary email
        See Also:
        Constant Field Values
      • PROP_SUMMARY_RECIPIENTEMAIL

        public static final java.lang.String PROP_SUMMARY_RECIPIENTEMAIL
        recipient of the notification summary email
        See Also:
        Constant Field Values
      • PROP_SUMMARY_SUBJECT

        public static final java.lang.String PROP_SUMMARY_SUBJECT
        email subject as appeared on the notification summary email
        See Also:
        Constant Field Values
      • PROP_SUMMARY_TEMPLATE

        public static final java.lang.String PROP_SUMMARY_TEMPLATE
        location of the email template used for notification summary
        See Also:
        Constant Field Values
      • PROP_SUMMARY_ITEMTEMPLATE

        public static final java.lang.String PROP_SUMMARY_ITEMTEMPLATE
        location of the template file for each item appeared on the notification summary
        See Also:
        Constant Field Values
      • mConfigParams

        protected static java.lang.String[] mConfigParams
      • mSummary

        protected boolean mSummary
      • mEmailSender

        protected java.lang.String mEmailSender
      • mEmailSubject

        protected java.lang.String mEmailSubject
      • mEmailTemplateName

        protected java.lang.String mEmailTemplateName
      • mSummaryItemTemplateName

        protected java.lang.String mSummaryItemTemplateName
      • mSummaryTemplateName

        protected java.lang.String mSummaryTemplateName
      • mSummaryHTML

        protected boolean mSummaryHTML
      • mHTML

        protected boolean mHTML
      • mHttpHost

        protected java.lang.String mHttpHost
      • mHttpPort

        protected java.lang.String mHttpPort
    • Constructor Detail

      • RenewalNotificationJob

        public RenewalNotificationJob()
        class constructor
    • Method Detail

      • getExtendedPluginInfo

        public java.lang.String[] getExtendedPluginInfo​(java.util.Locale locale)
        holds help text for this plugin
        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
        Parameters:
        id - String name of this instance
        implName - string name of this implementation
        config - configuration store for this instance
        Throws:
        EBaseException
      • run

        public void run()
        finds out which cert needs notification and notifies the responsible parties
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class AJobBase
      • getId

        public java.lang.String getId()
        get instance id.
        Specified by:
        getId in interface IJob
        Overrides:
        getId in class AJobBase
        Returns:
        a String identifier
      • setId

        public void setId​(java.lang.String id)
        set instance id.
        Specified by:
        setId in interface IJob
        Overrides:
        setId in class AJobBase
        Parameters:
        id - String id of the instance
      • getJobCron

        public IJobCron getJobCron()
        get cron string associated with this job
        Specified by:
        getJobCron in interface IJob
        Overrides:
        getJobCron in class AJobBase
        Returns:
        a JobCron object that represents the schedule of this job
      • getImplName

        public java.lang.String getImplName()
        gets the plugin name of this job.
        Specified by:
        getImplName in interface IJob
        Overrides:
        getImplName in class AJobBase
        Returns:
        a String that is the name of this implementation
      • 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.