/** * Gets the path used for the results of XSLT Transforms. */ public Path getTransformedXSLTPath(FileModel payload) { ReportService reportService = new ReportService(getGraphContext()); Path outputPath = reportService.getReportDirectory(); outputPath = outputPath.resolve(this.getRelativeTransformedXSLTPath(payload)); if (!Files.isDirectory(outputPath)) { try { Files.createDirectories(outputPath); } catch (IOException e) { throw new WindupException("Failed to create output directory at: " + outputPath + " due to: " + e.getMessage(), e); } } return outputPath; }
fileName = fileName + extension; XsltTransformationService xsltTransformationService = new XsltTransformationService(graphContext); Path resultPath = xsltTransformationService.getTransformedXSLTPath(payload).resolve(fileName); LinkModel linkModel = linkService.create(); linkModel.setDescription(description); linkModel.setLink(xsltTransformationService.getRelativeTransformedXSLTPath(payload).resolve(fileName).toString()); payload.addLinkToTransformedFile(linkModel);
fileName = fileName + extension; XsltTransformationService xsltTransformationService = new XsltTransformationService(graphContext); Path outputPath = xsltTransformationService.getTransformedXSLTPath();
/** * Gets the path used for the results of XSLT Transforms. */ public Path getTransformedXSLTPath() { ReportService reportService = new ReportService(getGraphContext()); Path outputPath = Paths.get(reportService.getReportDirectory()).resolve(TRANSFORMEDXML_DIR_NAME); if (!Files.isDirectory(outputPath)) { try { Files.createDirectories(outputPath); } catch (IOException e) { throw new WindupException("Failed to create output directory at: " + outputPath + " due to: " + e.getMessage(), e); } } return outputPath; } }