private boolean isExceptionRelatedToSource(XmlFileModel sourceFile, SAXParseException e) { if (e.getSystemId() == null) return true; // Just assume that it is related, in the absence of other information if (e.getSystemId().startsWith("http://") || e.getSystemId().startsWith("https://") || e.getSystemId().startsWith("ftp://")) return false; return e.getSystemId().endsWith(sourceFile.getFileName()); }
private boolean isExceptionRelatedToSource(XmlFileModel sourceFile, SAXParseException e) { if (e.getSystemId() == null) return true; // Just assume that it is related, in the absence of other information if (e.getSystemId().startsWith("http://") || e.getSystemId().startsWith("https://") || e.getSystemId().startsWith("ftp://")) return false; return e.getSystemId().endsWith(sourceFile.getFileName()); }
@Override public boolean isValid(GraphRewrite event,EvaluationContext context, XmlFileModel model) { if (fileNamePattern != null) { final ParameterStore store = DefaultParameterStore.getInstance(context); Pattern compiledPattern = fileNamePattern.getCompiledPattern(store); String pattern = compiledPattern.pattern(); String fileName = model.getFileName(); if (!fileName.matches(pattern)) { return false; } return true; } return true; }
private void registerAndSubmitResultsFor(XmlFileModel xml, List<WindupVertexFrame> results, EvaluationStrategy evaluationStrategy, GraphRewrite event, EvaluationContext context) { final List<WindupVertexFrame> xpathResults = xpathValidator.getAndClearResultLocations(); if(xpathResults.isEmpty()) { evaluationStrategy.modelMatched(); if (fileNameValidator.getFileNamePattern() != null && !fileNameValidator.getFileNamePattern().parse(xml.getFileName()).submit(event, context)) { evaluationStrategy.modelSubmissionRejected(); return; } evaluationStrategy.modelSubmitted(xml); results.add(xml); } else { //these were already submitted by XpathValidator results.addAll(xpathResults); } }
evaluationStrategy.modelMatched(); if (fileNameValidator.getFileNamePattern() != null && !fileNameValidator.getFileNamePattern().parse(xml.getFileName()).submit(event, context))
graphContext, XsltTransformationModel.class); String fileName = payload.getFileName();
GraphService<XsltTransformationModel> transformationService = new GraphService<>( graphContext, XsltTransformationModel.class); String fileName = payload.getFileName();
Pattern compiledPattern = fileNamePattern.getCompiledPattern(store); String pattern = compiledPattern.pattern(); String fileName = xml.getFileName(); if (!fileName.matches(pattern))
processImage = StringUtils.removeEnd(processImage, payload.getFileName()); processImage += "processimage.jpg";
processImage = StringUtils.removeEnd(processImage, payload.getFileName()); processImage += "processimage.jpg";
LOG.warning("Expected enterprise-beans tag. Ignoring: " + payload.getFileName()); return;
LOG.warning("Expected enterprise-beans tag. Ignoring: " + payload.getFileName()); return;
LOG.warning("Expected enterprise-beans tag. Ignoring: " + payload.getFileName()); return;
LOG.warning("Expected enterprise-beans tag. Ignoring: " + payload.getFileName()); return;