Class TextFileInputHelper

java.lang.Object
org.pentaho.di.trans.step.BaseStepHelper
org.pentaho.di.trans.steps.fileinput.text.TextFileInputHelper
All Implemented Interfaces:
StepHelperInterface, CsvInputAwareHelper

public class TextFileInputHelper extends BaseStepHelper implements CsvInputAwareHelper
  • Constructor Details

    • TextFileInputHelper

      public TextFileInputHelper(TextFileInputMeta textFileInputMeta)
  • Method Details

    • handleStepAction

      protected org.json.simple.JSONObject handleStepAction(String method, TransMeta transMeta, Map<String,String> queryParams)
      Description copied from class: BaseStepHelper
      Abstract method to be implemented by subclasses for handling step-specific actions.
      Specified by:
      handleStepAction in class BaseStepHelper
      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

      public org.json.simple.JSONObject showFilesAction(TransMeta transMeta, Map<String,String> queryParams)
    • 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.KettleException
      com.fasterxml.jackson.core.JsonProcessingException
    • logChannel

      public org.pentaho.di.core.logging.LogChannelInterface logChannel()
      Specified by:
      logChannel in interface CsvInputAwareHelper
    • 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.KettleException
      com.fasterxml.jackson.core.JsonProcessingException
    • getFieldNamesAction

      public org.json.simple.JSONObject getFieldNamesAction(TransMeta transMeta, Map<String,String> queryParams)
    • validateShowContentAction

      public org.json.simple.JSONObject validateShowContentAction(TransMeta transMeta, Map<String,String> queryParams)
    • 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

      public TextFileInputFieldDTO[] getUpdatedTextFields(TextFileInputMeta tfii)
    • getInputStream

      public InputStream getInputStream(TransMeta transMeta, CsvInputAwareMeta meta)
      Description copied from interface: CsvInputAwareHelper
      Returns the InputStream corresponding to the csv file, or null if the file cannot be read.
      Specified by:
      getInputStream in interface CsvInputAwareHelper
      Returns:
      the InputStream corresponding 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

      public String massageFieldName(String fieldName)
      Description copied from interface: CsvInputAwareHelper
      Custom handling of each field can be implemented here.
      Specified by:
      massageFieldName in interface CsvInputAwareHelper