Package org.seed.core.api
Interface JobContext
- All Superinterfaces:
CallbackFunctionContext,FunctionContext
A
JobContext is the context in which a Job is executed.- Author:
- seed-master
-
Method Summary
Modifier and TypeMethodDescriptiongetJobParameter(String name) Returns the job parameter with the given namegetJobParameter(String name, String defaultValue) Returns the job parameter with the given name or a default value if the parameter doesn't existgetJobParameterAsInt(String name) Returns the job parameter with the given name asIntegergetJobParameterAsInt(String name, Integer defaultValue) Returns the job parameter with the given name asIntegeror a default value if the parameter doesn't existbooleanhasJobParameter(String name) Checks if there is a job parameter with the given namevoidWrites a message (info) to the job run logvoidWrites an error message to the job run logvoidWrites an info message to the job run logvoidWrites an warning message to the job run logMethods inherited from interface org.seed.core.api.CallbackFunctionContext
getClientProvider, getDataSourceProvider, getEventType, getMailProvider, getObjectProvider, getParameterProvider, getRestProvider, getSourceStatus, getStoredProcedureProvider, getTargetStatusMethods inherited from interface org.seed.core.api.FunctionContext
getProperty, getSuccessMessage, hasProperty, setProperty, setSuccessMessage
-
Method Details
-
hasJobParameter
Checks if there is a job parameter with the given name- Parameters:
name- the name of the job parameter- Returns:
trueif there is a parameter with the given name
-
getJobParameter
Returns the job parameter with the given name- Parameters:
name- the name of the job parameter- Returns:
- the value of the parameter or
nullif the parameter doesn't exist
-
getJobParameterAsInt
Returns the job parameter with the given name asInteger- Parameters:
name- the name of the job parameter- Returns:
- the value of the parameter as
Integerornullif the parameter doesn't exist - Throws:
IllegalStateException- if the parameter is not an integer value
-
getJobParameter
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 parameterdefaultValue- 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
Returns the job parameter with the given name asIntegeror a default value if the parameter doesn't exist- Parameters:
name- the name of the job parameterdefaultValue- the default value that is used if the parameter doesn't exist- Returns:
- the value of the parameter as
Integeror the default value if the parameter doesn't exist - Throws:
IllegalStateException- if the parameter is not an integer value
-
log
Writes a message (info) to the job run log- Parameters:
message- the message to write to the job run log
-
logInfo
Writes an info message to the job run log- Parameters:
message- the message to write to the job run log
-
logWarn
Writes an warning message to the job run log- Parameters:
message- the message to write to the job run log
-
logError
Writes an error message to the job run log- Parameters:
message- the message to write to the job run log
-