Refine search
/** * @see org.springframework.extensions.config.element.ConfigElementAdapter#getChildren() */ public List<ConfigElement> getChildren() { throw new ConfigException("Reading the Server config via the generic interfaces is not supported"); }
if (ServerConfigElement.CONFIG_ELEMENT_ID.equals(element.getName()) == false) throw new ConfigException("ServerElementReader can only parse config elements of type '" + ServerConfigElement.CONFIG_ELEMENT_ID + "'"); Element schemeElem = element.element(ELEMENT_SCHEME); if (schemeElem != null) configElement.setScheme(schemeElem.getTextTrim()); Element hostnameElem = element.element(ELEMENT_HOSTNAME); throw new ConfigException("Server port is not a number", e);
Iterator<Element> readers = readersElement.elementIterator(); while (readers.hasNext()) String readerElementName = readerElement.attributeValue(ATTR_ELEMENT_NAME); String readerElementClass = readerElement.attributeValue(ATTR_CLASS); throw new ConfigException("All element-reader elements must define an element-name attribute"); throw new ConfigException("Element-reader '" + readerElementName + "' must define a class attribute");
if (ServerConfigElement.CONFIG_ELEMENT_ID.equals(element.getName()) == false) throw new ConfigException("ServerElementReader can only parse config elements of type '" + ServerConfigElement.CONFIG_ELEMENT_ID + "'"); Element schemeElem = element.element(ELEMENT_SCHEME); if (schemeElem != null) configElement.setScheme(schemeElem.getTextTrim()); Element hostnameElem = element.element(ELEMENT_HOSTNAME); throw new ConfigException("Server port is not a number", e);
Iterator<Element> evaluators = evaluatorsElement.elementIterator(); while (evaluators.hasNext()) String evaluatorName = evaluatorElement.attributeValue(ATTR_ID); String evaluatorClass = evaluatorElement.attributeValue(ATTR_CLASS); throw new ConfigException("All evaluator elements must define an id attribute"); throw new ConfigException("Evaluator '" + evaluatorName + "' must define a class attribute");
if (ServerConfigElement.CONFIG_ELEMENT_ID.equals(element.getName()) == false) throw new ConfigException("ServerElementReader can only parse config elements of type '" + ServerConfigElement.CONFIG_ELEMENT_ID + "'"); Element schemeElem = element.element(ELEMENT_SCHEME); if (schemeElem != null) configElement.setScheme(schemeElem.getTextTrim()); Element hostnameElem = element.element(ELEMENT_HOSTNAME); throw new ConfigException("Server port is not a number", e);
Iterator<Element> evaluators = evaluatorsElement.elementIterator(); while (evaluators.hasNext()) String evaluatorName = evaluatorElement.attributeValue(ATTR_ID); String evaluatorClass = evaluatorElement.attributeValue(ATTR_CLASS); throw new ConfigException("All evaluator elements must define an id attribute"); throw new ConfigException("Evaluator '" + evaluatorName + "' must define a class attribute");
/** * @see org.springframework.extensions.config.element.ConfigElementAdapter#getChildren() */ public List<ConfigElement> getChildren() { throw new ConfigException("Reading the Server config via the generic interfaces is not supported"); }
Iterator<Element> evaluators = evaluatorsElement.elementIterator(); while (evaluators.hasNext()) String evaluatorName = evaluatorElement.attributeValue(ATTR_ID); String evaluatorClass = evaluatorElement.attributeValue(ATTR_CLASS); throw new ConfigException("All evaluator elements must define an id attribute"); throw new ConfigException("Evaluator '" + evaluatorName + "' must define a class attribute");
/** * @see org.springframework.extensions.config.element.ConfigElementAdapter#getChildren() */ public List<ConfigElement> getChildren() { throw new ConfigException("Reading the Server config via the generic interfaces is not supported"); }
Iterator<Element> readers = readersElement.elementIterator(); while (readers.hasNext()) String readerElementName = readerElement.attributeValue(ATTR_ELEMENT_NAME); String readerElementClass = readerElement.attributeValue(ATTR_CLASS); throw new ConfigException("All element-reader elements must define an element-name attribute"); throw new ConfigException("Element-reader '" + readerElementName + "' must define a class attribute");
/** * Conditionally adds the source to the set of source strings if its * trimmed length is greater than 0. */ protected void addSourceString(String sourceString) { if (sourceString == null || sourceString.trim().length() == 0) { throw new ConfigException("Invalid source value: " + sourceString); } this.sourceStrings.add(sourceString); }
Iterator<Element> readers = readersElement.elementIterator(); while (readers.hasNext()) String readerElementName = readerElement.attributeValue(ATTR_ELEMENT_NAME); String readerElementClass = readerElement.attributeValue(ATTR_CLASS); throw new ConfigException("All element-reader elements must define an element-name attribute"); throw new ConfigException("Element-reader '" + readerElementName + "' must define a class attribute");
/** * Conditionally adds the source to the set of source strings if its * trimmed length is greater than 0. */ protected void addSourceString(String sourceString) { if (sourceString == null || sourceString.trim().length() == 0) { throw new ConfigException("Invalid source value: " + sourceString); } this.sourceStrings.add(sourceString); }
/** * Conditionally adds the source to the set of source strings if its * trimmed length is greater than 0. */ protected void addSourceString(String sourceString) { if (sourceString == null || sourceString.trim().length() == 0) { throw new ConfigException("Invalid source value: " + sourceString); } this.sourceStrings.add(sourceString); }
public ConfigSectionImpl(String evaluator, String condition, boolean replace) { this.evaluator = evaluator; this.condition = condition; this.replace = replace; this.configElements = new ArrayList<ConfigElement>(); // don't allow empty strings if (this.evaluator != null && this.evaluator.length() == 0) { throw new ConfigException("The 'evaluator' attribute must have a value if it is present"); } if (this.condition != null && this.condition.length() == 0) { throw new ConfigException("The 'condition' attribute must have a value if it is present"); } }
public ConfigSectionImpl(String evaluator, String condition, boolean replace) { this.evaluator = evaluator; this.condition = condition; this.replace = replace; this.configElements = new ArrayList<ConfigElement>(); // don't allow empty strings if (this.evaluator != null && this.evaluator.length() == 0) { throw new ConfigException("The 'evaluator' attribute must have a value if it is present"); } if (this.condition != null && this.condition.length() == 0) { throw new ConfigException("The 'condition' attribute must have a value if it is present"); } }
public ConfigSectionImpl(String evaluator, String condition, boolean replace) { this.evaluator = evaluator; this.condition = condition; this.replace = replace; this.configElements = new ArrayList<ConfigElement>(); // don't allow empty strings if (this.evaluator != null && this.evaluator.length() == 0) { throw new ConfigException("The 'evaluator' attribute must have a value if it is present"); } if (this.condition != null && this.condition.length() == 0) { throw new ConfigException("The 'condition' attribute must have a value if it is present"); } }
/** * Registers this object with the injected ConfigService */ public void register() { if (configService == null) { throw new ConfigException("Config service must be provided"); } configService.addDeployer(this); }
/** * Instantiate the evaluator with the given name and class * * @param name * Name of the evaluator * @param className * Class name of the evaluator */ @SuppressWarnings("rawtypes") protected Evaluator createEvaluator(String name, String className) { Evaluator evaluator = null; try { Class clazz = Class.forName(className); evaluator = (Evaluator) clazz.newInstance(); } catch (Throwable e) { throw new ConfigException("Could not instantiate evaluator for '" + name + "' with class: " + className, e); } return evaluator; }