Examples of OutputFile


Examples of org.jitterbit.plugin.sdk.OutputFile

        token.build(requestDoc, header);
    }
   
    private void writeOutput(InputFile inputFile, PipelinePluginOutput output) throws Exception {
        writeNewRequest(inputFile.getFile());
        OutputFile outFile = OutputFileFactory.newOutputFile(inputFile);
        output.getOutputFiles().add(outFile);
    }
View Full Code Here

Examples of org.jitterbit.plugin.sdk.OutputFile

                getDefaultLogger(context).fine("The file did not change.");
                outputFiles.add(file.getFile(), file);
            }
            else {
                getDefaultLogger(context).fine("A new file was generated.");
                OutputFile outputFile = createOutputFile(file, newContent, writer);
                outputFiles.add(outputFile);
            }
        }
        getDefaultLogger(context).fine("These are the output files:");
        StringBuilder sb = new StringBuilder();
View Full Code Here

Examples of org.jitterbit.plugin.sdk.OutputFile

    }

    private void mergeInputFiles(PipelinePluginInput input, PipelinePluginOutput output) throws IOException {
        output.getOutputFiles().clear();
        File targetFile = null;
        OutputFile outputFile = null;
        BufferedWriter outputWriter = null;
        try {
            List<InputFile> inputFiles = getInputFilesInAlphabeticalOrder(input);
            for (InputFile inputFile : inputFiles) {
                if (targetFile == null) {
                    targetFile = createTargetFile(inputFile);
                    outputFile = OutputFileFactory.newOutputFile(targetFile);
                    outputWriter = new BufferedWriter(new FileWriter(targetFile));
                }
                copyFile(inputFile, outputWriter);
                assert outputFile != null;
                outputFile.addOriginFile(inputFile);
            }
            if (outputFile != null) {
                output.getOutputFiles().add(outputFile);
            }
        } finally {
View Full Code Here

Examples of org.jitterbit.plugin.sdk.OutputFile

                                  PipelinePluginOutput output,
                                  PipelinePluginContext context) throws Exception {
        InputFiles inputFiles = input.getInputFiles();
        OutputFiles outputFiles = output.getOutputFiles();
        for (InputFile inputFile : inputFiles.getFiles()) {
            OutputFile outputFile = handle(inputFile);
            outputFiles.add(outputFile);
        }
        return PluginResult.SUCCESS;
    }
View Full Code Here

Examples of org.xmlvm.proc.out.OutputFile

        case DELETE:
          return true;
      }
    }

    OutputFile file= new OutputFile();
    file.setFileName(dest);
    file.setLocation(path);
    Log.debug("Adding template file " + source + " to destination " + outpath);

    //        if (!file.setDataFromStream(JarUtil.getStream(getTemplateLocation() + source),
    //                System.currentTimeMillis())) {
    //            Log.error("Unable to find input file " + source);
View Full Code Here

Examples of org.xmlvm.proc.out.OutputFile

      constructSources();
      constructResources();

      for (UniversalFile file : data.listFilesRecursively())
      {
        OutputFile outputFile= null;
        if (containsPlaceholder(file))
        {
          String content= file.getFileAsString();
          content= content.replace(TEMPL_APPNAME, name);
          content= content.replace(TEMPL_SRCLIST, source_list);
          content= content.replace(TEMPL_RESOURCES, resource_list);

          outputFile= new OutputFile(content.getBytes());
        }
        else
        {
          outputFile= new OutputFile(file);
        }

        //Path
        String path= file.getRelativePath(data.getAbsolutePath());
        if (path.indexOf(File.separatorChar) >= 0)
        {
          path= path.substring(0, path.lastIndexOf(File.separator));
          path= path.replaceAll("__project__", name);
        }
        else
        {
          path= "";
        }
        outputFile.setLocation(arguments.option_out() + File.separator + path);

        //Name
        if (file.getName().contains("__project__"))
        {
          String newName= file.getName().replaceAll("__project__", name);
          outputFile.setFileName(newName);
        }
        else
        {
          outputFile.setFileName(file.getName());
        }

        bundle.addOutputFile(outputFile);
      }
    }
View Full Code Here

Examples of org.xmlvm.proc.out.OutputFile

    {
      Log.error("Could not initialize Makefile");
      return null;
    }
    makefile_data= makefile_data.replace(TEMPL_PROJNAME, arguments.option_app_name());
    OutputFile makefile= new OutputFile(makefile_data);
    makefile.setFileName("Makefile");
    makefile.setLocation(arguments.option_out() + BUILDFILE_LOCATION);
    return makefile;
  }
View Full Code Here

Examples of org.xmlvm.proc.out.OutputFile

    }

    // Generate output files for all data to be explicitly copied
    for (UniversalFile inputFile : inputFiles)
    {
      OutputFile outputFile= new OutputFile(inputFile);
      outputFile.setLocation(arguments.option_out() + DATAFILE_LOCATION);
      outputFile.setFileName(inputFile.getName());
      outputFiles.add(outputFile);
    }

    return outputFiles;
  }
View Full Code Here

Examples of org.xmlvm.proc.out.OutputFile

    {
      Log.warn("InputProcess.getOutputFiles(): Input File " + input.getFile() + "does not exist or is not a file.");
      return false;
    }

    OutputFile outputFile= new OutputFile(input.getFile());
    outputFile.setOrigin(input.getFile().getAbsolutePath());
    outputFile.setLocation(arguments.option_out());
    outputFile.setFileName(input.getFile().getName());
    bundle.addOutputFile(outputFile);
    return true;
  }
View Full Code Here

Examples of org.xmlvm.proc.out.OutputFile

      }
      DocumentWrapper docw= new DocumentWrapper(doc, "", ((Controller) transformer).getConfiguration());
      Result result= new StreamResult(writer);
      transformer.transform(docw, result);

      return new OutputFile(writer.toString());
    }
    catch (TransformerException e)
    {
      Log.error(TAG, e.getMessage());
    }
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.