Class AJobBase

    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • PROP_EMAIL_SUBJECT

        protected static final java.lang.String PROP_EMAIL_SUBJECT
        See Also:
        Constant Field Values
      • PROP_EMAIL_TEMPLATE

        protected static final java.lang.String PROP_EMAIL_TEMPLATE
        See Also:
        Constant Field Values
      • PROP_ITEM_TEMPLATE

        protected static final java.lang.String PROP_ITEM_TEMPLATE
        See Also:
        Constant Field Values
      • PROP_SENDER_EMAIL

        protected static final java.lang.String PROP_SENDER_EMAIL
        See Also:
        Constant Field Values
      • PROP_RECEIVER_EMAIL

        protected static final java.lang.String PROP_RECEIVER_EMAIL
        See Also:
        Constant Field Values
      • mImplName

        protected java.lang.String mImplName
      • mId

        protected java.lang.String mId
      • mCron

        protected java.lang.String mCron
      • mConfigParams

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

        protected java.lang.String mSummaryMailSubject
      • mMailHTML

        protected boolean mMailHTML
      • mMailForm

        protected java.lang.String mMailForm
      • mItemForm

        protected java.lang.String mItemForm
      • mSummarySenderEmail

        protected java.lang.String mSummarySenderEmail
      • mSummaryReceiverEmail

        protected java.lang.String mSummaryReceiverEmail
      • mContentParams

        protected java.util.Hashtable<java.lang.String,​java.lang.Object> mContentParams
      • mItemParams

        protected java.util.Hashtable<java.lang.String,​java.lang.Object> mItemParams
    • Constructor Detail

      • AJobBase

        public AJobBase()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        tells if the job is enabled
        Specified by:
        isEnabled in interface IJob
        Returns:
        a boolean value indicating whether the job is enabled or not
      • init

        public abstract void init​(ISubsystem owner,
                                  java.lang.String id,
                                  java.lang.String implName,
                                  IConfigStore config)
                           throws EBaseException
        abstract methods
        Specified by:
        init in interface IJob
        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 abstract void run()
        Specified by:
        run in interface java.lang.Runnable
      • getId

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

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

        public IJobCron getJobCron()
        get cron string associated with this job
        Specified by:
        getJobCron in interface IJob
        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
        Returns:
        a String that is the name of this implementation
      • getConfigStore

        public IConfigStore getConfigStore()
        Gets the configuration substore used by this job
        Specified by:
        getConfigStore in interface IJob
        Returns:
        configuration store
      • getTemplateContent

        protected java.lang.String getTemplateContent​(java.lang.String templatePath)
      • mailSummary

        protected void mailSummary​(java.lang.String content)
      • buildItemParams

        protected void buildItemParams​(org.mozilla.jss.netscape.security.x509.X509CertImpl cert)
      • buildItemParams

        protected void buildItemParams​(IRequest r)
      • buildItemParams

        protected void buildItemParams​(java.lang.String name,
                                       java.lang.String val)
      • buildContentParams

        protected void buildContentParams​(java.lang.String name,
                                          java.lang.String val)
      • stop

        public void stop()
        Description copied from interface: IJob
        Request the job to stop gracefully. The job may not stop immediately.
        Specified by:
        stop in interface IJob
      • isStopped

        public boolean isStopped()
        Description copied from interface: IJob
        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.
        Specified by:
        isStopped in interface IJob