Class CronJob

    • Field Detail

      • CFG_FILTERED_CTX_ATTRIBUTES

        public static final java.lang.String CFG_FILTERED_CTX_ATTRIBUTES
        See Also:
        Constant Field Values
    • Constructor Detail

      • CronJob

        public CronJob()
    • Method Detail

      • setCurrentlyExecutingCronJob

        protected static final void setCurrentlyExecutingCronJob​(CronJob cronjob)
      • unsetCurrentlyExecutingCronJob

        protected static final void unsetCurrentlyExecutingCronJob()
      • getCurrentlyExecutingCronJob

        protected static final CronJob getCurrentlyExecutingCronJob()
      • getCurrentlyExecutingCronJobFailSave

        protected static final CronJob getCurrentlyExecutingCronJobFailSave()
      • hasCurrentlyExecutingCronJob

        protected static boolean hasCurrentlyExecutingCronJob()
        Since:
        2.20
      • createItem

        protected Item createItem​(SessionContext ctx,
                                  ComposedType type,
                                  Item.ItemAttributeMap allAttributes)
                           throws JaloBusinessException
        Description copied from class: Item
        Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) during ComposedType.newInstance(Map).

        In case this method uses any of the attribute values during creation it is required to override Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
        Sn example:

        
         public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
         ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
         man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
         // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
         SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
         super.getNonInitialAttributes( ctx, allAttributes );
         // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
        
         
        Overrides:
        createItem in class GeneratedCronJob
        Parameters:
        ctx - the current session context which this item is created within
        type - the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )
        Returns:
        the new item instance
        Throws:
        JaloBusinessException - indicates an error during creation - any changes will be rollbacked
      • setJob

        protected void setJob​(SessionContext ctx,
                              Job job)
        Description copied from class: GeneratedCronJob
        Generated method - Setter of the CronJob.job attribute.
        Overrides:
        setJob in class GeneratedCronJob
        job - the job - References to the Job assigned to the CronJob
      • remove

        public void remove​(SessionContext ctx)
                    throws ConsistencyCheckException
        Description copied from class: Item
        Removes this item.

        This method is using the following attributes of the given SessionContext:

        CacheUsage   Language   StagingMethod
        n/a (this is a setter method)   no, language doesn't matter for removal   yes if called on a StageableItem, no otherwise


        Overrides:
        remove in class Item
        Parameters:
        ctx - A SessionContext object
        Throws:
        ConsistencyCheckException - if this item could not be removed for some reason
      • addToCounter

        public int addToCounter​(int add)
        Increases the current counter of this cronjob.
        Parameters:
        add - the amount to add
        Returns:
        the new counter value
        See Also:
        getCounter(), resetCounter()
      • addLog

        public JobLog addLog​(java.lang.String message)
        Adds a loggin message to this CronJob.
        Parameters:
        message - The logging message
        Returns:
        The JobLog object.
      • addLog

        @Deprecated
        public JobLog addLog​(java.lang.String message,
                             Step forStep)
        Deprecated.
        since 4.3
        Adds a loggin message for the given Step to this CronJob.
        Parameters:
        message - The logging message
        forStep - The Step this message belongs to
        Returns:
        The JobLog object.
      • addLog

        public JobLog addLog​(java.lang.String message,
                             EnumerationValue level)
        Adds a loggin message with a given error level to this CronJob.
        Parameters:
        message - The logging message
        level - The error level
        Returns:
        The JobLog object.
      • addLog

        @Deprecated
        public JobLog addLog​(java.lang.String message,
                             Step forStep,
                             EnumerationValue level)
        Deprecated.
        since 4.3
        Adds a loggin message and error level for the given Step to this CronJob.
        Parameters:
        message - The logging message
        forStep - The Step this message belongs to
        level - The error level
        Returns:
        The JobLog object.
      • convertLogLevelToEnum

        public EnumerationValue convertLogLevelToEnum​(org.apache.log4j.Level level)
      • convertEnumToLogLevel

        public org.apache.log4j.Level convertEnumToLogLevel​(EnumerationValue enumvalue)
      • addLog

        protected JobLog addLog​(java.lang.String message,
                                Step forStep,
                                EnumerationValue level,
                                boolean appendToLogFile)
      • checkLogLevel

        public boolean checkLogLevel​(EnumerationValue configuredLevel,
                                     java.lang.String configProperty,
                                     java.lang.String defaultLevel)
      • setIsEnabledForCheckDifference

        public void setIsEnabledForCheckDifference​(long diff)
        Sets the difference between the point of times where the cache of the isEnabledFor(Level) will be reseted.
        Parameters:
        diff - the time difference in ms
      • isEnabledFor

        public final boolean isEnabledFor​(org.apache.log4j.Level level)
        Checks if the CronJob is enabled for logging with given log level. Will check log to database and to file configuration. The call of this method will be cached for a specific time, adjustable by setIsEnabledForCheckDifference(long).
        Parameters:
        level - log level to check
        Returns:
        cronjob is enabled for given level
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(java.lang.String changeType)
        Deprecated.
        since ages - not supported in future
        Returns a Collection of all ChangeDescriptors with the specified changeType and which are assigned to the CronJob. If the number of ChangeDescriptors is very high, consider using getChanges(String, int, int).
        Parameters:
        changeType - the changeType
        Returns:
        a Collection of all ChangeDescriptors with the specified changeType and which are assigned to the CronJob. If the number of ChangeDescriptors is very high, consider using getChanges(String, int, int)
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 java.lang.String changeType)
        Deprecated.
        since ages - not supported in future
        Returns a Collection of all ChangeDescriptors with the specified changeType and which are assigned to the CronJob. If the number of ChangeDescriptors is very high, consider using getChanges(String, int, int).
        Parameters:
        ctx - the SessionContext, which will be used
        changeType - the changeType
        Returns:
        a Collection of all ChangeDescriptors with the specified changeType and which are assigned to the CronJob. If the number of ChangeDescriptors is very high, consider using getChanges(String, int, int)
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(Step step,
                                                                 java.lang.String changeType)
        Deprecated.
        since ages - not supported in future
        Returns a Collection of all ChangeDescriptors with the specified changeType and which are assigned to the CronJob and the specified Step.
        Parameters:
        step - the Step, whose ChangeDescriptors should be returned
        changeType - the changeType
        Returns:
        a Collection of all ChangeDescriptors which are assigned to the CronJob and the specified Step
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 Step step,
                                                                 java.lang.String changeType)
        Deprecated.
        since ages - not supported in future
        Returns a Collection of all ChangeDescriptors with the specified changeType and which are assigned to the CronJob and the specified Step.
        Parameters:
        ctx - the SessionContext, which will be used
        step - the Step, whose ChangeDescriptors should be returned
        changeType - the changeType
        Returns:
        a Collection of all ChangeDescriptors which are assigned to the CronJob and the specified Step
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        ctx - the SessionContext, which will be used
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(Step step,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which are assigned to the specified Step. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        step - the Step, whose ChangeDescriptors should be returned
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 Step step,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which are assigned to the specified Step. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        ctx - the SessionContext, which will be used
        step - the Step, whose ChangeDescriptors should be returned
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(java.lang.String changeType,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which have the specified changeType. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        changeType - the changeType
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 java.lang.String changeType,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which have the specified changeType. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        ctx - the SessionContext, which will be used
        changeType - the changeType
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(Step step,
                                                                 java.lang.String changeType,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which have the specified changeType and are assigned to the specified Step. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        step - the Step, whose ChangeDescriptors should be returned
        changeType - the changeType
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 Step step,
                                                                 java.lang.String changeType,
                                                                 int start,
                                                                 int count)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which have the specified changeType and are assigned to the specified Step. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        ctx - the SessionContext, which will be used
        step - the Step, whose ChangeDescriptors should be returned
        changeType - the changeType
        start - start index of the range
        count - number of elements in the range
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(Step step,
                                                                 java.lang.String changeType,
                                                                 int start,
                                                                 int count,
                                                                 boolean ascending)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which have the specified changeType and are assigned to the specified Step. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        step - the Step, whose ChangeDescriptors should be returned
        changeType - the changeType
        start - start index of the range
        count - number of elements in the range
        ascending - order of elements by sequencenumber
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getChanges

        @Deprecated
        public java.util.Collection<ChangeDescriptor> getChanges​(SessionContext ctx,
                                                                 Step step,
                                                                 java.lang.String changeType,
                                                                 int start,
                                                                 int count,
                                                                 boolean ascending)
        Deprecated.
        since ages - not supported in future
        Returns the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection which have the specified changeType and are assigned to the specified Step. The ChangeDescriptors are ordered by their creation time.
        Parameters:
        ctx - the SessionContext, which will be used
        step - the Step, whose ChangeDescriptors should be returned
        changeType - the changeType
        start - start index of the range
        count - number of elements in the range
        ascending - order of elements by sequencenumber
        Returns:
        the specified range (from start -> (start + count)) of ChangeDescriptors as a Collection
      • getMostRecentChange

        @Deprecated
        public ChangeDescriptor getMostRecentChange​(Step step,
                                                    java.lang.String changeType)
        Deprecated.
        since ages - not supported in future
        Returns the most recent ChangeDescriptor of the CronJob which is assigned to the specified Step and has the specified changeType.
        Parameters:
        step - the Step, whose ChangeDescriptors should be returned
        changeType - The change type
        Returns:
        the most recent ChangeDescriptor of the CronJob which is assigned to the specified Step and has the specified changeType
      • addChangeDescriptor

        @Deprecated
        protected ChangeDescriptor addChangeDescriptor​(Step forStep,
                                                       java.lang.String changeType,
                                                       Item item,
                                                       java.lang.String description)
        Deprecated.
        since ages - not supported in future
        Creates a new ChangeDescriptor with the specified Step, changeType, Item and description.
        Parameters:
        forStep - the Step of the new ChangeDescriptor
        changeType - the changeType of the new ChangeDescriptor
        item - the Item of the new ChangeDescriptor
        description - the description of the new ChangeDescriptor
        Returns:
        the new ChangeDescriptor
      • getNextChangeNumber

        @Deprecated
        protected java.lang.Integer getNextChangeNumber​(ComposedType changeDescriptorType)
        Deprecated.
        since ages - not supported in future
        Returns the next sequence number for the specified changeDescriptorType.
        Parameters:
        changeDescriptorType - the changeDescriptorType
        Returns:
        the next sequence number for the specified changeDescriptorType
      • addChangeDescriptor

        @Deprecated
        public ChangeDescriptor addChangeDescriptor​(ComposedType changeDescriptorType,
                                                    Step forStep,
                                                    java.lang.String changeType,
                                                    Item item,
                                                    java.lang.String description)
        Deprecated.
        since ages - not supported in future
        Creates a new ChangeDescriptor with the specified Step, changeType, Item and description.
        Parameters:
        changeDescriptorType - the changeDescriptorType
        forStep - the Step of the new ChangeDescriptor
        changeType - the changeType of the new ChangeDescriptor
        item - the Item of the new ChangeDescriptor
        description - the description of the new ChangeDescriptor
        Returns:
        the new ChangeDescriptor
      • addChangeDescriptor

        @Deprecated
        public ChangeDescriptor addChangeDescriptor​(ComposedType changeDescriptorType,
                                                    Step forStep,
                                                    java.lang.String changeType,
                                                    Item item,
                                                    java.lang.String description,
                                                    java.util.Map additionalAttributes)
        Deprecated.
        since ages - not supported in future
        Creates a new ChangeDescriptor with the specified Step, changeType, Item and description.
        Parameters:
        changeDescriptorType - the changeDescriptorType
        forStep - the Step of the new ChangeDescriptor
        changeType - the changeType of the new ChangeDescriptor
        item - the Item of the new ChangeDescriptor
        description - the description of the new ChangeDescriptor
        additionalAttributes - the additional attribute values for the specified changeDescriptorType
        Returns:
        the new ChangeDescriptor
      • addChangeDescriptor

        @Deprecated
        public ChangeDescriptor addChangeDescriptor​(ComposedType changeDescriptorType,
                                                    Step forStep,
                                                    java.lang.String changeType,
                                                    PK item,
                                                    java.lang.String description,
                                                    java.util.Map additionalAttributes)
        Deprecated.
        since ages - not supported in future
        Creates a new ChangeDescriptor with the specified Step, changeType, Item and description.
        Parameters:
        changeDescriptorType - the changeDescriptorType
        forStep - the Step of the new ChangeDescriptor
        changeType - the changeType of the new ChangeDescriptor
        item - the Item PK of the new ChangeDescriptor
        description - the description of the new ChangeDescriptor
        additionalAttributes - the additional attribute values for the specified changeDescriptorType
        Returns:
        the new ChangeDescriptor
      • setStatus

        public void setStatus​(EnumerationValue status)
        Sets the status.

        This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.

        Overrides:
        setStatus in class GeneratedCronJob
        Parameters:
        status - the new status
      • setResult

        public void setResult​(EnumerationValue result)
        Sets the result.

        This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.

        Overrides:
        setResult in class GeneratedCronJob
        Parameters:
        result - the new result
      • setStartTime

        public void setStartTime​(java.util.Date start)
        Sets the end time.

        This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.

        Overrides:
        setStartTime in class GeneratedCronJob
        Parameters:
        start - the new start time
      • setEndTime

        public void setEndTime​(java.util.Date end)
        Sets the end time.

        This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.

        Overrides:
        setEndTime in class GeneratedCronJob
        Parameters:
        end - the new end time
      • setCurrentStep

        protected void setCurrentStep​(Step step,
                                      boolean undo)
        Sets the current
        Parameters:
        step -
        undo -
      • currentStepDone

        protected void currentStepDone​(boolean undo)
        If undo is false the current Step is added to the list of processed Steps and the current step of the CronJob is set to null. If undo is true, the current Step is added to the begining of the list of pending Steps and the current step of the CronJob is set to null.
        Parameters:
        undo - true if in undo mode, false if in normal mode.
      • toString

        public java.lang.String toString()
        Description copied from class: Item
        Returns the String representation of this item. This is by default the representation of the primary key of this item.
        Overrides:
        toString in class Item
        Returns:
        the String representation of this item.
      • getFatalLogLevel

        @Deprecated
        public EnumerationValue getFatalLogLevel()
        Deprecated.
        since ages - useJobLogLevel.FATAL instead
        Returns the EnumerationValue for log level FATAL.
        Returns:
        the EnumerationValue for log level FATAL
      • getErrorLogLevel

        @Deprecated
        public EnumerationValue getErrorLogLevel()
        Deprecated.
        since ages - useJobLogLevel.ERROR instead
        Returns the EnumerationValue for log level ERROR.
        Returns:
        the EnumerationValue for log level ERROR
      • getWarnLogLevel

        @Deprecated
        public EnumerationValue getWarnLogLevel()
        Deprecated.
        since ages - useJobLogLevel.WARNING instead
        Returns the EnumerationValue for log level WARNING.
        Returns:
        the EnumerationValue for log level WARNING
      • getInfoLogLevel

        @Deprecated
        public EnumerationValue getInfoLogLevel()
        Deprecated.
        since ages - useJobLogLevel.INFO instead
        Returns the EnumerationValue for log level INFO.
        Returns:
        the EnumerationValue for log level INFO
      • getDebugLogLevel

        @Deprecated
        public EnumerationValue getDebugLogLevel()
        Deprecated.
        since ages - useJobLogLevel.DEBUG instead
        Returns the EnumerationValue for log level DEBUG.
        Returns:
        the EnumerationValue for log level DEBUG
      • getUnknownLogLevel

        @Deprecated
        public EnumerationValue getUnknownLogLevel()
        Deprecated.
        since ages - useJobLogLevel.UNKNOWN instead
        Returns the EnumerationValue for log level UNKNOWN.
        Returns:
        the EnumerationValue for log level UNKNOWN
      • getFinishedStatus

        @Deprecated
        public EnumerationValue getFinishedStatus()
        Deprecated.
        since ages - useCronJobStatus.FINISHED instead
        Returns the EnumerationValue for CronJob status FINISHED.
        Returns:
        the EnumerationValue for CronJob status FINISHED
      • getRunningStatus

        @Deprecated
        public EnumerationValue getRunningStatus()
        Deprecated.
        since ages - useCronJobStatus.RUNNING instead
        Returns the EnumerationValue for CronJob status RUNNING.
        Returns:
        the EnumerationValue for CronJob status RUNNING
      • getRunningRestartStatus

        @Deprecated
        public EnumerationValue getRunningRestartStatus()
        Deprecated.
        since ages - useCronJobStatus.RUNNINGRESTART instead
        Returns the EnumerationValue for CronJob status RUNNINGRESTART.
        Returns:
        the EnumerationValue for CronJob status RUNNINGRESTART
      • getPausedStatus

        @Deprecated
        public EnumerationValue getPausedStatus()
        Deprecated.
        since ages - useCronJobStatus.PAUSED instead
        Returns the EnumerationValue for CronJob status PAUSED.
        Returns:
        the EnumerationValue for CronJob status PAUSED
      • getAbortedStatus

        @Deprecated
        public EnumerationValue getAbortedStatus()
        Deprecated.
        since ages - useCronJobStatus.ABORTED instead
        Returns the EnumerationValue for CronJob status ABORTED.
        Returns:
        the EnumerationValue for CronJob status ABORTED
      • getUnknownStatus

        @Deprecated
        public EnumerationValue getUnknownStatus()
        Deprecated.
        since ages - useCronJobStatus.UNKNOWN instead
        Returns the EnumerationValue for CronJob status UNKNOWN.
        Returns:
        the EnumerationValue for CronJob status UNKNOWN
      • getErrorResult

        @Deprecated
        public EnumerationValue getErrorResult()
        Deprecated.
        since ages - useCronJobResult.ERROR instead
        Returns the EnumerationValue for CronJob result ERROR.
        Returns:
        the EnumerationValue for CronJob result ERROR
      • getFailureResult

        @Deprecated
        public EnumerationValue getFailureResult()
        Deprecated.
        since ages - useCronJobResult.FAILURE instead
        Returns the EnumerationValue for CronJob result FAILURE.
        Returns:
        the EnumerationValue for CronJob result FAILURE
      • getSuccessResult

        @Deprecated
        public EnumerationValue getSuccessResult()
        Deprecated.
        since ages - useCronJobResult.SUCCESS instead
        Returns the EnumerationValue for CronJob result SUCCESS.
        Returns:
        the EnumerationValue for CronJob result SUCCESS
      • getUnknownResult

        @Deprecated
        public EnumerationValue getUnknownResult()
        Deprecated.
        since ages - useCronJobResult.UNKNOWN instead
        Returns the EnumerationValue for CronJob result UNKNOWN.
        Returns:
        the EnumerationValue for CronJob result UNKNOWN
      • setRunning

        @Deprecated
        protected void setRunning()
                           throws java.lang.IllegalStateException
        Deprecated.
        since ages - there is no strict counterpart in servicelayer however you can use CronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel, boolean) instead to set status for given cronJob to RUNNING
        Sets the status of the CronJob to RUNNING.
        Throws:
        java.lang.IllegalStateException - if the status of the CronJob is already RUNNING
      • setRunningRestart

        @Deprecated
        protected void setRunningRestart()
                                  throws java.lang.IllegalStateException
        Deprecated.
        since ages - there is no counterpart in service layer
        Sets the status of the CronJob to RUNNINGRESTART.
        Throws:
        java.lang.IllegalStateException - if the status of the CronJob is already RUNNING or RUNNINGRESTART
      • setPaused

        @Deprecated
        public void setPaused()
                       throws java.lang.IllegalStateException
        Deprecated.
        since ages - there is no counterpart in service layer
        Sets the status of the CronJob to PAUSED.
        Throws:
        java.lang.IllegalStateException - if the status of the CronJob is not RUNNING or RUNNINGRESTART
      • getFinishedResult

        @Deprecated
        public CronJob.CronJobResult getFinishedResult​(boolean success)
        Deprecated.
        since ages - useCronJobResult instead
        Returns a new CronJobResult instance. Depending on the parameter success either a failure result or a success result is returned.
        Parameters:
        success - if true a success result will be returned
        Returns:
        a new CronJobResult instance
      • getUndoFinishedResult

        @Deprecated
        public CronJob.CronJobResult getUndoFinishedResult​(boolean success)
        Deprecated.
        no counterpart since 4.3
        Returns a new CronJobResult instance. Depending on the parameter success either a failure result or a success result is returned.
        Parameters:
        success - if true a success result will be returned
        Returns:
        a new CronJobResult instance
      • setCronJobResult

        @Deprecated
        public void setCronJobResult​(CronJob.CronJobResult res)
        Deprecated.
        no counterpart since 4.3
      • filterSessionContextValuesFromCronJob

        protected java.util.Map<java.lang.String,​java.lang.Object> filterSessionContextValuesFromCronJob​(java.util.Map<java.lang.String,​java.lang.Object> sessionContextValues)
        Session context values stored inside this cronjob are filtered for potentially harmful ones, since we cannot rule out that they're manually changed!
      • resetFinishedCronJob

        protected void resetFinishedCronJob()
                                     throws java.lang.IllegalStateException
        Reset the CronJob. This includes:
        • Setting the current Step to .
        • Adding all processed Steps to the list of pending steps and clearing the list of processed steps.
        • Setting the status to UNKNOWN.
        • Setting start- and endtime to null.
        Throws:
        java.lang.IllegalStateException - if the CronJob has not the status FINISHED
      • sendEmail

        public void sendEmail​(CronJob.CronJobResult cronJobResult)
                       throws org.apache.commons.mail.EmailException
        Sends a CronJobResult per email. The following properties of your project|local.properties are used:
        • mail.from: Sender address of the email
        • mail.replyto: Replyto address of the email
        The email will be send to the email address specified in GeneratedCronJob.getEmailAddress().
        Parameters:
        cronJobResult - the CronJobResult, which will be send per email
        Throws:
        org.apache.commons.mail.EmailException - if the sending of the email was not successful.
      • getRendererNotificationContext

        protected CronJobNotificationTemplateContext getRendererNotificationContext()
        Gets filled context object used by velocity to access CronJob's significant data. If in any sub types any other fields are needed simple overwrite getRendererNotificationContext returning any others getters
        Returns:
        interface used by velocity to access CronJob's significant data
        Since:
        3.1-u7
      • getFinishedEmailBody

        protected java.lang.String getFinishedEmailBody​(CronJob.CronJobResult cronJobResult)
        Since:
        2.10
      • addChangeListener

        public void addChangeListener​(java.lang.String topic,
                                      ChangeListener listener)
        Registers the specified ChangeListener for the specified topic.
        Parameters:
        topic - the topic the ChangeListener will be regiersted for
        listener - the ChangeListener which should be registered
      • removeChangeListener

        public void removeChangeListener​(java.lang.String topic,
                                         ChangeListener listener)
        Removes the registration of specified ChangeListener for the specified topic.
        Parameters:
        topic - the topic the ChangeListener should be deregiersted form
        listener - the ChangeListener which should be deregistered
      • removeAllChangeListener

        public void removeAllChangeListener()
        Removes all registered ChangeListeners.
      • notifyChangeListeners

        protected final void notifyChangeListeners​(ChangeEvent event)
        Notifies all ChangeListeners, which are registered for the topic of the specified event.
        Parameters:
        event - the ChangeEvent all registered ChangeListeners should be notfied from
      • getTimeTable

        @Deprecated
        public java.lang.String getTimeTable​(SessionContext ctx)
        Deprecated.
        since ages - useCronJobModel.getTimeTable() instead.
        Returns a localized text, representing the timetable(s) of the CronJobs trigger(s).
        Parameters:
        ctx - the SessionContext, which will be used
        Returns:
        the localized timeTable text
      • addToPendingSteps

        @Deprecated
        public void addToPendingSteps​(SessionContext ctx,
                                      Step step)
        Deprecated.
        since 4.3
        Appends the specified Step to the list of pending steps. This method is only used, if the assigned Job (GeneratedCronJob.getJob()) is a BatchJob.
        Overrides:
        addToPendingSteps in class GeneratedCronJob
        Parameters:
        ctx - the SessionContext, which will be used
        step - the Step, which will be appended
      • addToPendingSteps

        @Deprecated
        public void addToPendingSteps​(Step step)
        Deprecated.
        since 4.3
        Appends the specified Step to the list of pending steps. This method is only used, if the assigned Job (GeneratedCronJob.getJob()) is a BatchJob.
        Overrides:
        addToPendingSteps in class GeneratedCronJob
        Parameters:
        step - the Step, which will be appended
      • addToProcessedSteps

        @Deprecated
        public void addToProcessedSteps​(SessionContext ctx,
                                        Step step)
        Deprecated.
        since 4.3
        Appends the specified Step to the list of processed steps. This method is only used, if the assigned Job (GeneratedCronJob.getJob()) is a BatchJob.
        Overrides:
        addToProcessedSteps in class GeneratedCronJob
        Parameters:
        ctx - the SessionContext, which will be used
        step - the Step, which will be appended
      • addToProcessedSteps

        @Deprecated
        public void addToProcessedSteps​(Step step)
        Deprecated.
        since 4.3
        Appends the specified Step to the list of processed steps. This method is only used, if the assigned Job (GeneratedCronJob.getJob()) is a BatchJob.
        Overrides:
        addToProcessedSteps in class GeneratedCronJob
        Parameters:
        step - the Step, which will be appended
      • mustRunOnOtherNode

        public boolean mustRunOnOtherNode()
        Tells whether or not this cronjob must be run on another node. This may be the case when clustering is enabled and the current server instance is different from the one specified within the conjob (see { GeneratedCronJob.getNodeID()).
      • getTimeTable

        @Deprecated
        public java.lang.String getTimeTable()
        Deprecated.
        since ages
        Returns a localized text, representing the timetable(s) of the CronJobs trigger(s).
        Returns:
        the localized timeTable text
      • setRequestAbort

        public void setRequestAbort​(SessionContext ctx,
                                    java.lang.Boolean abortRequested)
        Sets the abort flag to the specified value.
        Overrides:
        setRequestAbort in class GeneratedCronJob
        Parameters:
        ctx - the SessionContext, which will be used
        abortRequested -
      • createNewLogFile

        @Deprecated
        public LogFile createNewLogFile​(java.lang.String fileName)
        Deprecated.
        since ages - use plainLogFileModel creation, refer to wiki documentation
      • getLogFiles

        public java.util.Collection<LogFile> getLogFiles​(SessionContext ctx)
        Description copied from class: GeneratedCronJob
        Generated method - Getter of the CronJob.logFiles attribute.
        Specified by:
        getLogFiles in class GeneratedCronJob
        Returns:
        the logFiles - A list of log files related to the current CronJob
      • setLogFiles

        public void setLogFiles​(SessionContext ctx,
                                java.util.Collection<LogFile> param)
        Description copied from class: GeneratedCronJob
        Generated method - Setter of the CronJob.logFiles attribute.
        Specified by:
        setLogFiles in class GeneratedCronJob
        param - the logFiles - A list of log files related to the current CronJob
      • setNodeID

        public void setNodeID​(SessionContext ctx,
                              java.lang.Integer value)
        Description copied from class: GeneratedCronJob
        Generated method - Setter of the CronJob.nodeID attribute.
        Overrides:
        setNodeID in class GeneratedCronJob
        value - the nodeID - The number of the cluster node on which the CronJob is to be run. This setting is relevant for clustered hybris Suite installations only.
      • finalizeCronJobHistory

        protected void finalizeCronJobHistory()