public Context createVelocityContext() throws DataSourceException { return fTrack.createVelocityContext(); } }
private boolean assumptionHolds(final String assumption) { if (assumption == null) { return true; } Context context; try { context = this.createVelocityContext(); XPath xpath = XPathFactory.newInstance().newXPath(); xpath.setNamespaceContext(fNamespaceContext); xpath.setXPathVariableResolver(new ContextXPathVariableResolver( context)); return (Boolean) xpath.evaluate(assumption, createEmptyDocument(), XPathConstants.BOOLEAN); } catch (Exception e) { fStatus = ArtefactStatus.createErrorStatus( "Failed to evaluate the assumption " + fAssumption, e); return false; } }
conditionContext = partnerTrack.createVelocityContext(); } catch (Exception e) { setStatus(ArtefactStatus.createFailedStatus(String.format(