Package org.pentaho.di.job.entry
Class BaseJobEntryHelper
java.lang.Object
org.pentaho.di.job.entry.BaseJobEntryHelper
- All Implemented Interfaces:
JobEntryHelperInterface
- Direct Known Subclasses:
JobEntryJobHelper,JobEntryTransHelper,JobEntryZipFileHelper
Base implementation of
JobEntryHelperInterface providing shared infrastructure for executing
UI-triggered "job entry actions".
Job entry actions are job entry-specific, non-runtime operations initiated from a job entry dialog (e.g. fetching external metadata, validating configuration, testing connections). They do not participate in job execution.
Subclasses implement only the job entry-specific logic inhandleJobEntryAction(String, JobMeta, java.util.Map).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected org.pentaho.di.core.logging.LogChannelInterfacestatic final Stringstatic final StringFields inherited from interface org.pentaho.di.job.entry.JobEntryHelperInterface
ACTION_STATUS, FAILURE_METHOD_NOT_FOUND_RESPONSE, FAILURE_RESPONSE, FAILURE_STATUS, NOT_EXECUTED_STATUS, STATUS, SUCCESS_RESPONSE, SUCCESS_STATUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetReferencePath(JobMeta jobMeta, String directoryPath, String objectName, org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod, String fileName) Constructs the reference path for a job or transformation based on the provided directory path and name.protected abstract org.json.simple.JSONObjectAbstract method for handling a specific job entry action.booleanisFailedResponse(org.json.simple.JSONObject response) Utility method to check if a response indicates a failure.org.json.simple.JSONObjectDefault implementation for performing a job entry action.
-
Field Details
-
IS_TRANS_REFERENCE
- See Also:
-
IS_VALID_REFERENCE
- See Also:
-
REFERENCE_PATH
- See Also:
-
SEPARATOR
- See Also:
-
log
protected org.pentaho.di.core.logging.LogChannelInterface log
-
-
Constructor Details
-
BaseJobEntryHelper
protected BaseJobEntryHelper()
-
-
Method Details
-
jobEntryAction
public org.json.simple.JSONObject jobEntryAction(String method, JobMeta jobMeta, Map<String, String> queryParams) Default implementation for performing a job entry action.This method provides shared infrastructure for executing job entry-specific, non-runtime operations initiated from a job entry dialog (e.g. fetching external metadata, validating configuration, testing connections). Subclasses implement only the job entry-specific logic in
handleJobEntryAction(String, JobMeta, java.util.Map).- Specified by:
jobEntryActionin interfaceJobEntryHelperInterface- Parameters:
method- The name of the method to execute.jobMeta- The job metadata associated with the job entry.queryParams- A map of query parameters for the action.- Returns:
- A JSON object containing the action status and any additional response data.
-
handleJobEntryAction
protected abstract org.json.simple.JSONObject handleJobEntryAction(String method, JobMeta jobMeta, Map<String, String> queryParams) Abstract method for handling a specific job entry action. Subclasses must implement this method to provide job entry-specific logic.- Parameters:
method- The name of the method to execute.jobMeta- The job metadata associated with the job entry.queryParams- A map of query parameters for the action.- Returns:
- A JSON object containing the action status and any additional response data.
-
isFailedResponse
public boolean isFailedResponse(org.json.simple.JSONObject response) Utility method to check if a response indicates a failure.- Parameters:
response- The JSON object containing the response data.- Returns:
- True if the response indicates a failure, false otherwise.
-
getReferencePath
protected String getReferencePath(JobMeta jobMeta, String directoryPath, String objectName, org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod, String fileName) Constructs the reference path for a job or transformation based on the provided directory path and name.- Parameters:
jobMeta- The job metadata containing the job entry.directoryPath- The directory path where the job or transformation is located.objectName- The name of the job or transformation.specificationMethod- The specification method used (e.g. REPOSITORY_BY_NAME, FILENAME).fileName- The filename of the job or transformation (used if the specification method is FILENAME).- Returns:
- The constructed reference path, or an empty string if neither directoryPath nor objectName is provided.
-