Examples of PipelinePluginException


Examples of org.jitterbit.plugin.sdk.pipeline.PipelinePluginException

        }
        if ( dataElements.contains(HEADER_DE_NAME, DataType.STRING) ) {
          header_segment = dataElements.get(HEADER_DE_NAME, DataType.STRING).getValue();
        }
        if ( header_segment.isEmpty() ) {
          throw new PipelinePluginException("No segment header was specified. Not enough information to perform splitting.");
        }
               
        // Loop over input files.
        for (InputFile plugin_input_file : files.getFiles()) {
          final File input_file = plugin_input_file.getFile();
View Full Code Here

Examples of org.jitterbit.plugin.sdk.pipeline.PipelinePluginException

      }
      else {
        --fileCount;
      }
    } catch (FileNotFoundException e) {
      throw new PipelinePluginException("File not found: " + e.getMessage(), e);
    } catch (IOException e) {
      throw new PipelinePluginException("I/O error while splitting \"" + file.getAbsolutePath()
          + "\". " + e.getMessage(), e);
    }
    finally {
      try {
        if ( bufReader != null )
View Full Code Here

Examples of org.jitterbit.plugin.sdk.pipeline.PipelinePluginException

        InputFiles inputFiles = input.getInputFiles();
        for (InputFile inputFile : inputFiles.getFiles()) {
            requestDoc = loadDocument(inputFile.getFile());
            return inputFile;
        }
        throw new PipelinePluginException("Invalid input. No input file was given.");
    }
View Full Code Here

Examples of org.jitterbit.plugin.sdk.pipeline.PipelinePluginException

   
    private <T> DataElement<T> getRequiredDataElement(DataElements des, String name, DataType<T> type)
                                                    throws PipelinePluginException {
        DataElement<T> de = des.get(name, type);
        if (de == null) {
            throw new PipelinePluginException("Invalid input. The required data element " + name + " is missing");
        }
        return de;
    }
View Full Code Here

Examples of org.jitterbit.plugin.sdk.pipeline.PipelinePluginException

        if ( dataElements.contains(RECORDS_PER_FILE_DE_NAME, DataType.INTEGER) ) {
          records_per_file = dataElements.get(RECORDS_PER_FILE_DE_NAME, DataType.INTEGER).getValue();
        }

        if ( header_record_identifier.isEmpty() ) {
          throw new PipelinePluginException("No segment header was specified. Not enough information to perform splitting.");
        }
        String header_segment = header_record_identifier+field_separator, key_segment = key_record_identifier+field_separator;
        char delimiter=':', separator=';';
        if(field_separator.length() == 1)delimiter = field_separator.charAt(0);
        if(array_element_separator.length() == 1)separator = array_element_separator.charAt(0);
View Full Code Here

Examples of org.jitterbit.plugin.sdk.pipeline.PipelinePluginException

        if ( dataElements.contains(SEPARATOR_DE_NAME, DataType.STRING) )
          separator = dataElements.get(SEPARATOR_DE_NAME, DataType.STRING).getValue();
        if ( dataElements.contains(SEGMENTS_DE_NAME, DataType.STRING) )
          segments = dataElements.get(SEGMENTS_DE_NAME, DataType.STRING).getValue();
        if ( segments.isEmpty() ) {
          throw new PipelinePluginException("No segment list was specified. Not enough information to perform line break cleanup");
        }
       
        String[] segment_arr = segments.split(separator);
        Set<String> segmentSet = new HashSet<String>(segment_arr.length);
        for( String s : segment_arr ) {
          if ( s == null || s.isEmpty() || s.equals(separator) ) {
            continue;
          }
          segmentSet.add(s);
        }
        if ( segmentSet.isEmpty() ) {
          throw new PipelinePluginException("No segments were defined. Segment variable was '" + segments + ",");
        }
       
        OutputFiles outputFiles = output.getOutputFiles();
       
        for (InputFile plugin_input_file : files.getFiles()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.