Exemplo n.º 1
0
  public void saveCda(String sessionId, String path, String file)
      throws OperationNotSupportedException, IOException, TransformerFactoryConfigurationError,
          TransformerException {

    SaikuMasterModel model = sessionHolder.getModel(sessionId);

    if (!file.endsWith(".cda")) {
      file += ".cda";
    }

    String[] splits = ParamUtils.splitFirst(path.substring(1), "/");

    cdaManager.addDatasource(splits[0], splits[1], file, model.getCdaSettings().asXML());
    //		repository.writeFile(splits[0], splits[1], file, model.getCdaSettings().asXML());

  }
Exemplo n.º 2
0
  public void savePrpt(String sessionId, String path, String file)
      throws ReportException, BundleWriterException, ContentIOException, IOException,
          ReportProcessingException, SaikuAdhocException, ResourceException {

    SaikuMasterModel model = sessionHolder.getModel(sessionId);

    if (!file.endsWith(".prpt")) {
      file += ".prpt";
    }

    String[] splits = ParamUtils.splitFirst(path.substring(1), "/");

    ByteArrayOutputStream prptContent = null;
    ;
    MasterReport output = processReport(model);
    prptContent = generatePrptOutput(model, output);

    String solPath = splits.length > 1 ? splits[1] : "";

    repository.writeFile(splits[0], solPath, file, prptContent);
  }