Class TextFileInputHelper
java.lang.Object
org.pentaho.di.trans.step.BaseStepHelper
org.pentaho.di.trans.steps.fileinput.text.TextFileInputHelper
- All Implemented Interfaces:
StepHelperInterface,CsvInputAwareHelper
-
Field Summary
Fields inherited from class org.pentaho.di.trans.step.BaseStepHelper
IS_TRANS_REFERENCE, IS_VALID_REFERENCE, log, REFERENCE_PATH, SEPARATORFields inherited from interface org.pentaho.di.trans.step.StepHelperInterface
ACTION_STATUS, FAILURE_METHOD_NOT_FOUND_RESPONSE, FAILURE_RESPONSE, STATUS, SUCCESS_RESPONSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.json.simple.JSONObjectgetFieldNamesAction(TransMeta transMeta, Map<String, String> queryParams) Vector<org.pentaho.di.core.gui.TextFileInputFieldInterface> getFields(TextFileInputMeta info, List<String> rows) org.json.simple.JSONObjectgetFieldsAction(TransMeta transMeta, Map<String, String> queryParams) getFirst(TextFileInputMeta meta, TransMeta transMeta, int nrlines, boolean skipHeaders) getInputStream(TransMeta transMeta, CsvInputAwareMeta meta) Returns theInputStreamcorresponding to the csv file, or null if the file cannot be read.protected org.json.simple.JSONObjectAbstract method to be implemented by subclasses for handling step-specific actions.org.pentaho.di.core.logging.LogChannelInterfacemassageFieldName(String fieldName) Custom handling of each field can be implemented here.org.json.simple.JSONObjectpopulateMeta(TransMeta transMeta, TextFileInputMeta meta, Map<String, String> queryParams) org.json.simple.JSONObjectsetMinimalWidthAction(TransMeta transMeta, Map<String, String> queryParams) org.json.simple.JSONObjectshowContentAction(TransMeta transMeta, Map<String, String> queryParams) org.json.simple.JSONObjectshowFilesAction(TransMeta transMeta, Map<String, String> queryParams) org.json.simple.JSONObjectvalidateShowContentAction(TransMeta transMeta, Map<String, String> queryParams) Methods inherited from class org.pentaho.di.trans.step.BaseStepHelper
getReferencePath, isFailedResponse, stepAction, validateAndPutReferenceStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.pentaho.di.trans.steps.common.CsvInputAwareHelper
convertFieldsToJsonArray, getBufferedReader, getFieldNames, getFieldNamesImpl, getReader, getStringFromRow, logError, logError
-
Constructor Details
-
TextFileInputHelper
-
-
Method Details
-
handleStepAction
protected org.json.simple.JSONObject handleStepAction(String method, TransMeta transMeta, Map<String, String> queryParams) Description copied from class:BaseStepHelperAbstract method to be implemented by subclasses for handling step-specific actions.- Specified by:
handleStepActionin classBaseStepHelper- Parameters:
method- The name of the method to execute.transMeta- The transformation metadata associated with the step.queryParams- A map of query parameters for the action.- Returns:
- A JSON object containing the action status and any additional response data.
-
showFilesAction
-
getFieldsAction
public org.json.simple.JSONObject getFieldsAction(TransMeta transMeta, Map<String, String> queryParams) throws org.pentaho.di.core.exception.KettleException, com.fasterxml.jackson.core.JsonProcessingException- Throws:
org.pentaho.di.core.exception.KettleExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
logChannel
public org.pentaho.di.core.logging.LogChannelInterface logChannel()- Specified by:
logChannelin interfaceCsvInputAwareHelper
-
populateMeta
public org.json.simple.JSONObject populateMeta(TransMeta transMeta, TextFileInputMeta meta, Map<String, String> queryParams) throws org.pentaho.di.core.exception.KettleException, com.fasterxml.jackson.core.JsonProcessingException- Throws:
org.pentaho.di.core.exception.KettleExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
getFieldNamesAction
-
validateShowContentAction
-
showContentAction
public org.json.simple.JSONObject showContentAction(TransMeta transMeta, Map<String, String> queryParams) throws org.pentaho.di.core.exception.KettleException- Throws:
org.pentaho.di.core.exception.KettleException
-
setMinimalWidthAction
public org.json.simple.JSONObject setMinimalWidthAction(TransMeta transMeta, Map<String, String> queryParams) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getUpdatedTextFields
-
getInputStream
Description copied from interface:CsvInputAwareHelperReturns theInputStreamcorresponding to the csv file, or null if the file cannot be read.- Specified by:
getInputStreamin interfaceCsvInputAwareHelper- Returns:
- the
InputStreamcorresponding to the csv file, or null if the file cannot be read
-
getFirst
public List<String> getFirst(TextFileInputMeta meta, TransMeta transMeta, int nrlines, boolean skipHeaders) throws org.pentaho.di.core.exception.KettleException - Throws:
org.pentaho.di.core.exception.KettleException
-
getFields
public Vector<org.pentaho.di.core.gui.TextFileInputFieldInterface> getFields(TextFileInputMeta info, List<String> rows) -
massageFieldName
Description copied from interface:CsvInputAwareHelperCustom handling of each field can be implemented here.- Specified by:
massageFieldNamein interfaceCsvInputAwareHelper
-