Interface JobDefinition

    • Method Detail

      • isEquivalentObject

        boolean isEquivalentObject()
        Get the value for EquivalentObject. (Whether an equivalent object should be created in the database to call this job.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAverageLogFilesize

        Long getAverageLogFilesize()
        Get the value for AverageLogFilesize. (Statistic: The average total size of log job-files for the jobs of this JobDefinition, rounded to the nearest integer.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAverageOutputFilesize

        Long getAverageOutputFilesize()
        Get the value for AverageOutputFilesize. (Statistic: The average total size of output job-files for the jobs of this JobDefinition, rounded to the nearest integer.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAverageRunTime

        Long getAverageRunTime()
        Get the value for AverageRunTime. (Statistic: The average run-time for the jobs of this JobDefinition in milliseconds, rounded to the nearest integer.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMinimumRunTime

        Long getMinimumRunTime()
        Get the value for MinimumRunTime. (Statistic: The minimum run-time for the jobs of this JobDefinition in milliseconds, rounded to the nearest integer.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMaximumRunTime

        Long getMaximumRunTime()
        Get the value for MaximumRunTime. (Statistic: The maximum run-time for the jobs of this JobDefinition in milliseconds, rounded to the nearest integer.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getChangeOwnerTime

        DateTimeZone getChangeOwnerTime()
        Get the value for ChangeOwnerTime. (Timestamp that notes when the owner was changed.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isCriticalProcess

        boolean isCriticalProcess()
        Get the value for CriticalProcess. (Mark this JobDefinition as a critical process.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDeprecated2

        Long getDeprecated2()
        Get the value for Deprecated2. (This attribute is deprecated and no longer in use.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isDiscarded

        boolean isDiscarded()
        Get the value for Discarded. (If an object is flagged as discarded it should no longer be used anymore. There is no guarantee that it would still be working and will eventually be deleted by a system process. Normally discarded objects should also be flagged hidden.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getExecutionCompletedCount

        Long getExecutionCompletedCount()
        Get the value for ExecutionCompletedCount. (Statistic: the number of jobs executed successfully.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getExecutionErrorCount

        Long getExecutionErrorCount()
        Get the value for ExecutionErrorCount. (Statistic: the number of jobs executed with an error.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getValidity

        Validity getValidity()
        Get the value for Validity. (Is this definition valid? That is, can this definition currently be used?) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getJobDefinitionRelatedObject

        JobDefinitionRelatedObject getJobDefinitionRelatedObject()
        Get the value for JobDefinitionRelatedObject. (The object that is related to this JobDefinition via the JobDefinitionType.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isKeepForce

        boolean isKeepForce()
        Get the value for KeepForce. (Should the keepclause always be considered? When KeepForce is true, then the job always follows its own keepclause. When it is false, it follows the keepclause of its parent job. Note that when counting the number of jobs (to determine whether a keepclause count has been reached) only top level jobs and jobs with KeepForce set to true are taken into account. Jobs that follow the keepclause of its parent job are *not* included in the count. )
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getKeepAmount

        Long getKeepAmount()
        Get the value for KeepAmount. (The number of submitted Jobs to be kept for this job definition.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getKeepUnits

        JobDefinitionKeepUnit getKeepUnits()
        Get the value for KeepUnits. (The unit of measure for KeepAmount. If set to "Jobs", the KeepType must also be specified.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getKeepType

        JobDefinitionKeepType getKeepType()
        Get the value for KeepType. (Indicates the type of the keep clauses: (S)ystem, (U)ser or (K)ey. Note that KeepUnits must be set to "Jobs".)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getKeepJobsInStatus

        String getKeepJobsInStatus()
        Get the value for KeepJobsInStatus. (A possible overwrite for the more global keep_status)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getKeepInStatusAmount

        Long getKeepInStatusAmount()
        Get the value for KeepInStatusAmount. (The amount for KeepInStatusUnit; if both set, jobs in one of the statuses KeepJobsInStatus are kept for this period (amount + units).)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getKeepInStatusUnit

        JobDefinitionKeepUnit getKeepInStatusUnit()
        Get the value for KeepInStatusUnit. (The time unit for KeepInStatusAmount; if both set, jobs in one of the statuses KeepJobsInStatus are kept for this period (amount + units).)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMinimumOpenDurationExpression

        String getMinimumOpenDurationExpression()
        Get the value for MinimumOpenDurationExpression. (Default expression for the minimum number of milliseconds that should be available in the TimeWindow of the Job, the Job's Queue or the intersection of both, before this job will be submitted. The value can be a REL expression or a number.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isMonitorSchedule

        boolean isMonitorSchedule()
        Get the value for MonitorSchedule. (Indicates whether the job definition should be monitored for active schedules. This is a calculated field, stored in an object tag, and may be deleted in the future.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isOverdue

        boolean isOverdue()
        Get the value for Overdue. (Set the scripts that are not run within their timewindow to status OVERDUE?)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getOverdueStatus

        JobStatus getOverdueStatus()
        Get the value for OverdueStatus. (The status the job will get when it is overdue.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getOverviewFormat

        String getOverviewFormat()
        Get the value for OverviewFormat. (This text is free form and can be entered by the user. ${parameters.XXX} will be expanded to show the parameter XXX value in the runtime Job Chain Viewer.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getPriority

        Long getPriority()
        Get the value for Priority. (Default value for the job's priority)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMaxPriority

        Long getMaxPriority()
        Get the value for MaxPriority. (The maximum priority that any instance of this job definition can run at)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRestartCount

        Long getRestartCount()
        Get the value for RestartCount. (Maximum number of automatic restarts)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getReturncodeMapToCompleted

        String getReturncodeMapToCompleted()
        Get the value for ReturncodeMapToCompleted. (Rangelist of return codes that map to completed)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStandardDeviationLogFilesize

        BigDecimal getStandardDeviationLogFilesize()
        Get the value for StandardDeviationLogFilesize. (Statistic: The standard deviation for the total size of log job-files for the jobs of this JobDefinition.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStandardDeviationOutputFilesize

        BigDecimal getStandardDeviationOutputFilesize()
        Get the value for StandardDeviationOutputFilesize. (Statistic: The standard deviation for the total size of output job-files for the jobs of this JobDefinition.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStandardDeviationRunTime

        BigDecimal getStandardDeviationRunTime()
        Get the value for StandardDeviationRunTime. (Statistic: The standard deviation of the run-time for the jobs of this JobDefinition.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isHoldOnSubmit

        boolean isHoldOnSubmit()
        Get the value for HoldOnSubmit. (Should any submitted Job be held by default.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isTopLevel

        boolean isTopLevel()
        Get the value for TopLevel. (Is this a top level JobDefinition? If this attribute's value is true, the job definition will be listed in in fields throughout the user interface listing submittable job definitions.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isTemplate

        boolean isTemplate()
        Get the value for Template. (Is this a template for a job definition)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isMaintenance

        boolean isMaintenance()
        Get the value for Maintenance. (Is this JobDefinition for maintenance purposes? Marking maintenance for a JobDefinition, will affect the visibility of its Jobs, default filters may exclude them from their result. This option offers a way to define constant or often running Jobs as low-profile.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getReactionJobType

        ReactionJobType getReactionJobType()
        Get the value for ReactionJobType. (The Reaction Job Style of this Job Definition. Null is this Job Definition is not a reaction job.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getEvaluationOwnerType

        OwnerType getEvaluationOwnerType()
        Get the value for EvaluationOwnerType. (Which owner will be used as the user for the session that will evaluate constraints and runtime parameter defaults: (S)ystem Default, (J)ob owner or Job (D)efinition owner.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getCompletionStrategy

        CompletionStrategyType getCompletionStrategy()
        Get the value for CompletionStrategy. (Which completion strategy should be used by default for jobs submitted from this definition?

        Note: If the set of CompletionStrategyType returned by getSupportedCompletionStrategies() for the related job definition type does not include some CompletionStrategyType, then setting it will throw an exception. Default is always supported. ) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.

        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setEquivalentObject

        void setEquivalentObject​(boolean newEquivalentObject)
        Set the value for EquivalentObject. (Whether an equivalent object should be created in the database to call this job.)
        Parameters:
        newEquivalentObject - the new value for EquivalentObject.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setCriticalProcess

        void setCriticalProcess​(boolean newCriticalProcess)
        Set the value for CriticalProcess. (Mark this JobDefinition as a critical process.)
        Parameters:
        newCriticalProcess - the new value for CriticalProcess.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setDiscarded

        void setDiscarded​(boolean newDiscarded)
        Set the value for Discarded. (If an object is flagged as discarded it should no longer be used anymore. There is no guarantee that it would still be working and will eventually be deleted by a system process. Normally discarded objects should also be flagged hidden.)
        Parameters:
        newDiscarded - the new value for Discarded.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepForce

        void setKeepForce​(boolean newKeepForce)
        Set the value for KeepForce. (Should the keepclause always be considered? When KeepForce is true, then the job always follows its own keepclause. When it is false, it follows the keepclause of its parent job. Note that when counting the number of jobs (to determine whether a keepclause count has been reached) only top level jobs and jobs with KeepForce set to true are taken into account. Jobs that follow the keepclause of its parent job are *not* included in the count. )
        Parameters:
        newKeepForce - the new value for KeepForce.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepAmount

        void setKeepAmount​(Long newKeepAmount)
        Set the value for KeepAmount. (The number of submitted Jobs to be kept for this job definition.) This value is optional.
        Parameters:
        newKeepAmount - the new value for KeepAmount.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepUnits

        void setKeepUnits​(JobDefinitionKeepUnit newKeepUnits)
        Set the value for KeepUnits. (The unit of measure for KeepAmount. If set to "Jobs", the KeepType must also be specified.) This value is optional.
        Parameters:
        newKeepUnits - the new value for KeepUnits.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepType

        void setKeepType​(JobDefinitionKeepType newKeepType)
        Set the value for KeepType. (Indicates the type of the keep clauses: (S)ystem, (U)ser or (K)ey. Note that KeepUnits must be set to "Jobs".) This value is optional.
        Parameters:
        newKeepType - the new value for KeepType.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepJobsInStatus

        void setKeepJobsInStatus​(String newKeepJobsInStatus)
        Set the value for KeepJobsInStatus. (A possible overwrite for the more global keep_status) This value is optional.
        Parameters:
        newKeepJobsInStatus - the new value for KeepJobsInStatus.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepInStatusAmount

        void setKeepInStatusAmount​(Long newKeepInStatusAmount)
        Set the value for KeepInStatusAmount. (The amount for KeepInStatusUnit; if both set, jobs in one of the statuses KeepJobsInStatus are kept for this period (amount + units).) This value is optional.
        Parameters:
        newKeepInStatusAmount - the new value for KeepInStatusAmount.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setKeepInStatusUnit

        void setKeepInStatusUnit​(JobDefinitionKeepUnit newKeepInStatusUnit)
        Set the value for KeepInStatusUnit. (The time unit for KeepInStatusAmount; if both set, jobs in one of the statuses KeepJobsInStatus are kept for this period (amount + units).) This value is optional.
        Parameters:
        newKeepInStatusUnit - the new value for KeepInStatusUnit.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setMinimumOpenDurationExpression

        void setMinimumOpenDurationExpression​(String newMinimumOpenDurationExpression)
        Set the value for MinimumOpenDurationExpression. (Default expression for the minimum number of milliseconds that should be available in the TimeWindow of the Job, the Job's Queue or the intersection of both, before this job will be submitted. The value can be a REL expression or a number.) This value is optional.
        Parameters:
        newMinimumOpenDurationExpression - the new value for MinimumOpenDurationExpression.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setMonitorSchedule

        void setMonitorSchedule​(boolean newMonitorSchedule)
        Set the value for MonitorSchedule. (Indicates whether the job definition should be monitored for active schedules. This is a calculated field, stored in an object tag, and may be deleted in the future.)
        Parameters:
        newMonitorSchedule - the new value for MonitorSchedule.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setOverdue

        void setOverdue​(boolean newOverdue)
        Set the value for Overdue. (Set the scripts that are not run within their timewindow to status OVERDUE?)
        Parameters:
        newOverdue - the new value for Overdue.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setOverdueStatus

        void setOverdueStatus​(JobStatus newOverdueStatus)
        Set the value for OverdueStatus. (The status the job will get when it is overdue.) This value is optional.
        Parameters:
        newOverdueStatus - the new value for OverdueStatus.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setOverviewFormat

        void setOverviewFormat​(String newOverviewFormat)
        Set the value for OverviewFormat. (This text is free form and can be entered by the user. ${parameters.XXX} will be expanded to show the parameter XXX value in the runtime Job Chain Viewer.) This value is optional.
        Parameters:
        newOverviewFormat - the new value for OverviewFormat.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setPriority

        void setPriority​(Long newPriority)
        Set the value for Priority. (Default value for the job's priority) This value is optional.
        Parameters:
        newPriority - the new value for Priority.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setMaxPriority

        void setMaxPriority​(Long newMaxPriority)
        Set the value for MaxPriority. (The maximum priority that any instance of this job definition can run at) This value is optional.
        Parameters:
        newMaxPriority - the new value for MaxPriority.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setRestartCount

        void setRestartCount​(Long newRestartCount)
        Set the value for RestartCount. (Maximum number of automatic restarts) This value is optional.
        Parameters:
        newRestartCount - the new value for RestartCount.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setReturncodeMapToCompleted

        void setReturncodeMapToCompleted​(String newReturncodeMapToCompleted)
        Set the value for ReturncodeMapToCompleted. (Rangelist of return codes that map to completed) This value is optional.
        Parameters:
        newReturncodeMapToCompleted - the new value for ReturncodeMapToCompleted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setHoldOnSubmit

        void setHoldOnSubmit​(boolean newHoldOnSubmit)
        Set the value for HoldOnSubmit. (Should any submitted Job be held by default.)
        Parameters:
        newHoldOnSubmit - the new value for HoldOnSubmit.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setTopLevel

        void setTopLevel​(boolean newTopLevel)
        Set the value for TopLevel. (Is this a top level JobDefinition? If this attribute's value is true, the job definition will be listed in in fields throughout the user interface listing submittable job definitions.)
        Parameters:
        newTopLevel - the new value for TopLevel.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setTemplate

        void setTemplate​(boolean newTemplate)
        Set the value for Template. (Is this a template for a job definition)
        Parameters:
        newTemplate - the new value for Template.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setMaintenance

        void setMaintenance​(boolean newMaintenance)
        Set the value for Maintenance. (Is this JobDefinition for maintenance purposes? Marking maintenance for a JobDefinition, will affect the visibility of its Jobs, default filters may exclude them from their result. This option offers a way to define constant or often running Jobs as low-profile.)
        Parameters:
        newMaintenance - the new value for Maintenance.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setReactionJobType

        void setReactionJobType​(ReactionJobType newReactionJobType)
        Set the value for ReactionJobType. (The Reaction Job Style of this Job Definition. Null is this Job Definition is not a reaction job.) This value is optional.
        Parameters:
        newReactionJobType - the new value for ReactionJobType.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setEvaluationOwnerType

        void setEvaluationOwnerType​(OwnerType newEvaluationOwnerType)
        Set the value for EvaluationOwnerType. (Which owner will be used as the user for the session that will evaluate constraints and runtime parameter defaults: (S)ystem Default, (J)ob owner or Job (D)efinition owner.) This value is mandatory.
        Parameters:
        newEvaluationOwnerType - the new value for EvaluationOwnerType. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setCompletionStrategy

        void setCompletionStrategy​(CompletionStrategyType newCompletionStrategy)
        Set the value for CompletionStrategy. (Which completion strategy should be used by default for jobs submitted from this definition?

        Note: If the set of CompletionStrategyType returned by getSupportedCompletionStrategies() for the related job definition type does not include some CompletionStrategyType, then setting it will throw an exception. Default is always supported. ) This value is mandatory.

        Parameters:
        newCompletionStrategy - the new value for CompletionStrategy. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setOwner

        void setOwner​(Subject newOwner)
        Change the owner of the JobDefinition. Requires 'changeOwner' global privilege.
        Specified by:
        setOwner in interface ChangeOwner
        Parameters:
        newOwner - New owner for the Job Definition. The SubjectType must be User.
      • duplicate

        JobDefinition duplicate()
        Duplicate the JobDefinition. All external attributes are copied into the new object. Internal attributes (including behavior) are not explicitly copied.
        Returns:
        The duplicated JobDefinition.
      • createEquivalentObject

        void createEquivalentObject​(boolean quotePartition,
                                    boolean quoteJobDefinition)
        Create an equivalent object in the database for calling this job definition.
        Parameters:
        quotePartition - Whether the partition name should be quoted when creating the object.
        quoteJobDefinition - Whether the job definition name should be quoted when creating the object.
      • isInternalChain

        boolean isInternalChain()
        The JobDefinition is considered internal and should be excluded in some cases
        Returns:
        True if internal
      • prepare

        Job prepare()
             throws com.redwood.scheduler.api.exception.ParameterDefaultValueUnavailableException,
                    com.redwood.scheduler.api.exception.ModifiedJobDefinitionCannotBePreparedException
        Prepare a job based on this job definition for submission. By default the requested start time is set to "Now", which is a marker time (see DateTimeZone.NOW_DATE). This marker is translated into the current time just before the JobDefinition is persisted. This method must not be used by any internal code with an internal session; the reason is that the session will be used for security during preparation of the job.
        Returns:
        Prepared job that should be customized and then submitted.
        Throws:
        com.redwood.scheduler.api.exception.ParameterDefaultValueUnavailableException - An error was encountered while evaluating a default parameter value.
        com.redwood.scheduler.api.exception.ModifiedJobDefinitionCannotBePreparedException - Only clean JobDefinitions can be prepared. This exception will be thrown when prepare has been called on a JobDefinition that has been modified since being retrieved from the database, or that has not yet been persisted to the database.
      • cancelNonFinalJobs

        void cancelNonFinalJobs()
        Cancel all jobs of this JobDefinition that have a non final status. This is a grouped action: it will affect all jobs for job definitions that have the same master as this job definition. It will also stop all recurrences and submit frames for this job definition.
      • deleteFinalJobs

        void deleteFinalJobs()
        Delete all jobs of this JobDefinition that have a final status. This is a grouped action: it will affect all jobs for job definitions that have the same master as this job definition.
      • createConstraintContext

        ConstraintContext createConstraintContext()
        Create a ConstraintContext so that the constraints can be verified.
        Returns:
        The ConstraintContext
      • getStatisticsByKeyParameters

        Statistics getStatisticsByKeyParameters​(Map<String,​String> keyParameters)
        Get a statistics object associated to this JobDefinition.
        Parameters:
        keyParameters - KeyParameters as a map of String names -> String values
        Returns:
        Statistics
      • resetStatistics

        void resetStatistics()
        Reset the counters and statistics for this job-definition.
      • getOverdueEventDefinition

        EventDefinition getOverdueEventDefinition()
        Get the OverdueEventDefinition.
        Returns:
        OverdueEventDefinition
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getDefaultOutputFormat

        Format getDefaultOutputFormat()
        Get the DefaultOutputFormat.
        Returns:
        DefaultOutputFormat
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getOwnerSubject

        Subject getOwnerSubject()
        Get the OwnerSubject.
        Specified by:
        getOwnerSubject in interface HasOwner
        Returns:
        OwnerSubject
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getCreatedBySubject

        Subject getCreatedBySubject()
        Get the CreatedBySubject.
        Specified by:
        getCreatedBySubject in interface ChangeOwner
        Returns:
        CreatedBySubject
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getJobDefinitionType

        JobDefinitionType getJobDefinitionType()
        Get the JobDefinitionType.
        Returns:
        JobDefinitionType
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getDefaultLogFormat

        Format getDefaultLogFormat()
        Get the DefaultLogFormat.
        Returns:
        DefaultLogFormat
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getMasterJobDefinition

        JobDefinition getMasterJobDefinition()
        Get the MasterJobDefinition.
        Returns:
        MasterJobDefinition
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getDefaultQueue

        Queue getDefaultQueue()
        Get the DefaultQueue.
        Returns:
        DefaultQueue
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getResource

        Resource getResource()
        Get the Resource.
        Returns:
        Resource
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getTimeWindow

        TimeWindow getTimeWindow()
        Get the TimeWindow.
        Returns:
        TimeWindow
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getTimeWindowTimeZone

        TimeZone getTimeWindowTimeZone()
        Get the TimeWindowTimeZone.
        Returns:
        TimeWindowTimeZone
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getJobTimeZone

        TimeZone getJobTimeZone()
        Get the JobTimeZone.
        Returns:
        JobTimeZone
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getRELRelatedLibrary

        Library getRELRelatedLibrary()
        Get the RELRelatedLibrary.
        Returns:
        RELRelatedLibrary
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getActionSubject

        Subject getActionSubject()
        Get the ActionSubject.
        Specified by:
        getActionSubject in interface ActionSubjectObject
        Returns:
        ActionSubject
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setOverdueEventDefinition

        void setOverdueEventDefinition​(EventDefinition newOverdueEventDefinition)
        Set the value for OverdueEventDefinition. This value is optional.
        Parameters:
        newOverdueEventDefinition - is the object to set OverdueEventDefinition to. The event to raise when a job becomes overdue.
      • setDefaultOutputFormat

        void setDefaultOutputFormat​(Format newDefaultOutputFormat)
        Set the value for DefaultOutputFormat. This value is optional.
        Parameters:
        newDefaultOutputFormat - is the object to set DefaultOutputFormat to. The default format to give to output files from this job.
      • setJobDefinitionType

        void setJobDefinitionType​(JobDefinitionType newJobDefinitionType)
        Set the value for JobDefinitionType. This value is mandatory.
        Parameters:
        newJobDefinitionType - is the object to set JobDefinitionType to. The type of a job definition. If this is null, then the object cannot be persisted.
      • setDefaultLogFormat

        void setDefaultLogFormat​(Format newDefaultLogFormat)
        Set the value for DefaultLogFormat. This value is optional.
        Parameters:
        newDefaultLogFormat - is the object to set DefaultLogFormat to. The default format to give to output files from this job.
      • setMasterJobDefinition

        void setMasterJobDefinition​(JobDefinition newMasterJobDefinition)
        Set the value for MasterJobDefinition. This value is optional.
        Parameters:
        newMasterJobDefinition - is the object to set MasterJobDefinition to. The master job definition for this job definition.
      • setDefaultQueue

        void setDefaultQueue​(Queue newDefaultQueue)
        Set the value for DefaultQueue. This value is optional.
        Parameters:
        newDefaultQueue - is the object to set DefaultQueue to. The default queue of a job definition.
      • setResource

        void setResource​(Resource newResource)
        Set the value for Resource. This value is optional.
        Parameters:
        newResource - is the object to set Resource to. The resource required by a job definition.
      • setTimeWindow

        void setTimeWindow​(TimeWindow newTimeWindow)
        Set the value for TimeWindow. This value is optional.
        Parameters:
        newTimeWindow - is the object to set TimeWindow to. The time window in which a job definition must run.
      • setTimeWindowTimeZone

        void setTimeWindowTimeZone​(TimeZone newTimeWindowTimeZone)
        Set the value for TimeWindowTimeZone. This value is optional.
        Parameters:
        newTimeWindowTimeZone - is the object to set TimeWindowTimeZone to. The time zone for the time window in which a job definition must run.
      • setJobTimeZone

        void setJobTimeZone​(TimeZone newJobTimeZone)
        Set the value for JobTimeZone. This value is optional.
        Parameters:
        newJobTimeZone - is the object to set JobTimeZone to. The time zone of this job.
      • setRELRelatedLibrary

        void setRELRelatedLibrary​(Library newRELRelatedLibrary)
        Set the value for RELRelatedLibrary. This value is optional.
        Parameters:
        newRELRelatedLibrary - is the object to set RELRelatedLibrary to. The library that is used for local REL expressions (without library name in REL expression), for backward compatibility reasons there is a fallback to the old behaviour: If no REL related library is given (=null) the Library of the Script entity is used
      • setActionSubject

        void setActionSubject​(Subject newActionSubject)
        Set the value for ActionSubject. This value is optional.
        Parameters:
        newActionSubject - is the object to set ActionSubject to. Who do jobs for this job-definition execute as?
      • getFinalStatusHandlerByStatus

        FinalStatusHandler getFinalStatusHandlerByStatus​(JobStatus status)
        Get the FinalStatusHandler by JobDefinitionStatus.
        Parameters:
        status -
        Returns:
        the FinalStatusHandler, or null if it could not be found
      • getJobDefinitionActionByType

        JobDefinitionAction getJobDefinitionActionByType​(JobDefinitionActionType type)
        Get the JobDefinitionAction by JobDefinitionActionType.
        Parameters:
        type -
        Returns:
        the JobDefinitionAction, or null if it could not be found
      • getJobDefinitionConstraintByName

        JobDefinitionConstraint getJobDefinitionConstraintByName​(String name)
        Get the JobDefinitionConstraint by JobDefinitionJobDefinitionConstraintName.
        Parameters:
        name -
        Returns:
        the JobDefinitionConstraint, or null if it could not be found
      • getJobDefinitionFormByName

        JobDefinitionForm getJobDefinitionFormByName​(String name)
        Get the JobDefinitionForm by JobDefinitionName.
        Parameters:
        name -
        Returns:
        the JobDefinitionForm, or null if it could not be found
      • getJobDefinitionParameterByName

        JobDefinitionParameter getJobDefinitionParameterByName​(String name)
        Get the JobDefinitionParameter by JobDefinitionName.
        Parameters:
        name -
        Returns:
        the JobDefinitionParameter, or null if it could not be found
      • getJobDefinitionJobLockByJobLock

        JobDefinitionJobLock getJobDefinitionJobLockByJobLock​(JobLock jobLock)
        Get the JobDefinitionJobLock by JobDefinitionJobLock.
        Parameters:
        jobLock -
        Returns:
        the JobDefinitionJobLock, or null if it could not be found
      • getJobDefinitionRuntimeLimitByName

        JobDefinitionRuntimeLimit getJobDefinitionRuntimeLimitByName​(String name)
        Get the JobDefinitionRuntimeLimit by JobDefinitionName.
        Parameters:
        name -
        Returns:
        the JobDefinitionRuntimeLimit, or null if it could not be found
      • getJobFileSearchByProcessingOrder

        JobFileSearch getJobFileSearchByProcessingOrder​(Long processingOrder)
        Get the JobFileSearch by JobDefinitionProcessingOrder.
        Parameters:
        processingOrder -
        Returns:
        the JobFileSearch, or null if it could not be found
      • checkCreatePrivilege

        RequiredPermission checkCreatePrivilege()
        Check whether or not the create action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewJobsPrivilege

        RequiredPermission checkViewJobsPrivilege()
        Check whether or not the viewJobs action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkSubmitPrivilege

        RequiredPermission checkSubmitPrivilege()
        Check whether or not the submit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditJobsPrivilege

        RequiredPermission checkEditJobsPrivilege()
        Check whether or not the editJobs action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditPrivilege

        RequiredPermission checkEditPrivilege()
        Check whether or not the edit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkDeletePrivilege

        RequiredPermission checkDeletePrivilege()
        Check whether or not the delete action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.