Interface JobContext

All Superinterfaces:
CallbackFunctionContext, FunctionContext

public interface JobContext extends CallbackFunctionContext
A JobContext is the context in which a Job is executed.
Author:
seed-master
  • Method Details

    • hasJobParameter

      boolean hasJobParameter(String name)
      Checks if there is a job parameter with the given name
      Parameters:
      name - the name of the job parameter
      Returns:
      true if there is a parameter with the given name
    • getJobParameter

      String getJobParameter(String name)
      Returns the job parameter with the given name
      Parameters:
      name - the name of the job parameter
      Returns:
      the value of the parameter or null if the parameter doesn't exist
    • getJobParameterAsInt

      Integer getJobParameterAsInt(String name)
      Returns the job parameter with the given name as Integer
      Parameters:
      name - the name of the job parameter
      Returns:
      the value of the parameter as Integer or null if the parameter doesn't exist
      Throws:
      IllegalStateException - if the parameter is not an integer value
    • getJobParameter

      String getJobParameter(String name, String defaultValue)
      Returns the job parameter with the given name or a default value if the parameter doesn't exist
      Parameters:
      name - the name of the job parameter
      defaultValue - the default value that is used if the parameter doesn't exist
      Returns:
      the value of the parameter or the default value if the parameter doesn't exist
    • getJobParameterAsInt

      Integer getJobParameterAsInt(String name, Integer defaultValue)
      Returns the job parameter with the given name as Integer or a default value if the parameter doesn't exist
      Parameters:
      name - the name of the job parameter
      defaultValue - the default value that is used if the parameter doesn't exist
      Returns:
      the value of the parameter as Integer or the default value if the parameter doesn't exist
      Throws:
      IllegalStateException - if the parameter is not an integer value
    • log

      void log(String message)
      Writes a message (info) to the job run log
      Parameters:
      message - the message to write to the job run log
    • logInfo

      void logInfo(String message)
      Writes an info message to the job run log
      Parameters:
      message - the message to write to the job run log
    • logWarn

      void logWarn(String message)
      Writes an warning message to the job run log
      Parameters:
      message - the message to write to the job run log
    • logError

      void logError(String message)
      Writes an error message to the job run log
      Parameters:
      message - the message to write to the job run log