@SuppressWarnings("unused") public File getTempOutDir() { if(tempOutDir == null) { throw new SmooksConfigurationException("Temp OutDir not set."); } return tempOutDir; }
@SuppressWarnings("unused") public File getTempOutDir() { if(tempOutDir == null) { throw new SmooksConfigurationException("Temp OutDir not set."); } return tempOutDir; }
public ExpressionEvaluator getConditionEvaluator(String idRef) { SmooksConfig smooksConfig = configStack.peek(); while(smooksConfig != null) { ExpressionEvaluator evaluator = smooksConfig.conditionEvaluators.get(idRef); if(evaluator != null) { return evaluator; } smooksConfig = smooksConfig.parent; } throw new SmooksConfigurationException("Unknown condition idRef '" + idRef + "'."); }
private void assertUniqueConditionId(String id) { if(configStack.peek().conditionEvaluators.containsKey(id)) { throw new SmooksConfigurationException("Duplicate condition ID '" + id + "'."); } }
public void setSourceObjects(List<Object> sourceObjects) throws SmooksConfigurationException { try { xstreamReader.setProperty(SaxWriter.SOURCE_OBJECT_LIST_PROPERTY, sourceObjects); } catch (SAXNotRecognizedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } catch (SAXNotSupportedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } }
public void setSourceObjects(List<Object> sourceObjects) throws SmooksConfigurationException { try { xstreamReader.setProperty(SaxWriter.SOURCE_OBJECT_LIST_PROPERTY, sourceObjects); } catch (SAXNotRecognizedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } catch (SAXNotSupportedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } }
public ExpressionEvaluator getConditionEvaluator(String idRef) { SmooksConfig smooksConfig = configStack.peek(); while(smooksConfig != null) { ExpressionEvaluator evaluator = smooksConfig.conditionEvaluators.get(idRef); if(evaluator != null) { return evaluator; } smooksConfig = smooksConfig.parent; } throw new SmooksConfigurationException("Unknown condition idRef '" + idRef + "'."); }
public void setSourceObjects(List<Object> sourceObjects) throws SmooksConfigurationException { try { xstreamReader.setProperty(SaxWriter.SOURCE_OBJECT_LIST_PROPERTY, sourceObjects); } catch (SAXNotRecognizedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } catch (SAXNotSupportedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } }
public ExpressionEvaluator getConditionEvaluator(String idRef) { SmooksConfig smooksConfig = configStack.peek(); while(smooksConfig != null) { ExpressionEvaluator evaluator = smooksConfig.conditionEvaluators.get(idRef); if(evaluator != null) { return evaluator; } smooksConfig = smooksConfig.parent; } throw new SmooksConfigurationException("Unknown condition idRef '" + idRef + "'."); }
public void setSourceObjects(List<Object> sourceObjects) throws SmooksConfigurationException { try { xstreamReader.setProperty(SaxWriter.SOURCE_OBJECT_LIST_PROPERTY, sourceObjects); } catch (SAXNotRecognizedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } catch (SAXNotSupportedException e) { throw new SmooksConfigurationException("Unable to set source Java Objects on the underlying XStream SaxWriter.", e); } }
private void assertUniqueConditionId(String id) { if(configStack.peek().conditionEvaluators.containsKey(id)) { throw new SmooksConfigurationException("Duplicate condition ID '" + id + "'."); } }
public void visitBefore(Element element, ExecutionContext execContext) throws SmooksException { boolean isBeanIdRefSpecified = element.hasAttribute("beanIdRef"); boolean isBeanTypeSpecified = element.hasAttribute("beanType"); boolean isBeanAnnotationSpecified = element.hasAttribute("beanAnnotation"); if(!isBeanIdRefSpecified && !isBeanTypeSpecified && !isBeanAnnotationSpecified) { throw new SmooksConfigurationException("One or more of attributes 'beanIdRef', 'beanType' and 'beanAnnotation' must be specified on a bean wiring configuration."); } } }
public void visitBefore(Element element, ExecutionContext execContext) throws SmooksException { boolean isBeanIdRefSpecified = element.hasAttribute("beanIdRef"); boolean isBeanTypeSpecified = element.hasAttribute("beanType"); boolean isBeanAnnotationSpecified = element.hasAttribute("beanAnnotation"); if(!isBeanIdRefSpecified && !isBeanTypeSpecified && !isBeanAnnotationSpecified) { throw new SmooksConfigurationException("One or more of attributes 'beanIdRef', 'beanType' and 'beanAnnotation' must be specified on a bean wiring configuration."); } } }
@Initialize public void initialize() throws SmooksConfigurationException { if(parentRelIndex >= 0) { throw new SmooksConfigurationException("param 'parentRelIndex' value must be negative. Value is '" + parentRelIndex + "'."); } }
@Initialize public void initialize() throws SmooksConfigurationException { if(parentRelIndex >= 0) { throw new SmooksConfigurationException("param 'parentRelIndex' value must be negative. Value is '" + parentRelIndex + "'."); } }
public SAXElement getParent() { if(!maintainElementStack) { throw new SmooksConfigurationException("Invalid Smooks configuration. Call to 'SAXElement.getParent()' when the '" + Filter.MAINTAIN_ELEMENT_STACK + "' is set to 'false'. You need to change this configuration, or modify the calling code."); } return super.getParent(); }
private void assertSelectorOK(SmooksResourceConfiguration config) { String selector = config.getSelector(); if(selector != null) { if(selector.contains(SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR) || selector.contains(SmooksResourceConfiguration.LEGACY_DOCUMENT_FRAGMENT_SELECTOR)) { throw new SmooksConfigurationException("Cannot use the document selector with the XMLBinding class. Must use an absolute path. Selector value '" + selector + "'."); } if(!selector.startsWith("/") && !selector.startsWith("${") && !selector.startsWith("#")) { throw new SmooksConfigurationException("Invalid selector value '" + selector + "'. Selector paths must be absolute."); } rootElementNames.add(config.getSelectorSteps()[0].getTargetElement()); } }
private void assertSelectorOK(SmooksResourceConfiguration config) { String selector = config.getSelector(); if(selector != null) { if(selector.contains(SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR) || selector.contains(SmooksResourceConfiguration.LEGACY_DOCUMENT_FRAGMENT_SELECTOR)) { throw new SmooksConfigurationException("Cannot use the document selector with the XMLBinding class. Must use an absolute path. Selector value '" + selector + "'."); } if(!selector.startsWith("/") && !selector.startsWith("${") && !selector.startsWith("#")) { throw new SmooksConfigurationException("Invalid selector value '" + selector + "'. Selector paths must be absolute."); } rootElementNames.add(config.getSelectorSteps()[0].getTargetElement()); } }
private void pushConfig(String file, URI fileURI) { for (SmooksConfig smooksConfig : configStack) { if(fileURI.equals(smooksConfig.fileURI)) { throw new SmooksConfigurationException("Invalid circular reference to config file '" + fileURI + "' from inside config file '" + getCurrentPath() + "'."); } } SmooksConfig config = new SmooksConfig(file); config.parent = configStack.peek(); config.fileURI = fileURI; configStack.push(config); }
private void pushConfig(String file, URI fileURI) { for (SmooksConfig smooksConfig : configStack) { if(fileURI.equals(smooksConfig.fileURI)) { throw new SmooksConfigurationException("Invalid circular reference to config file '" + fileURI + "' from inside config file '" + getCurrentPath() + "'."); } } SmooksConfig config = new SmooksConfig(file); config.parent = configStack.peek(); config.fileURI = fileURI; configStack.push(config); }