Package com.alibaba.citrus.springext

Examples of com.alibaba.citrus.springext.ConfigurationPointException


                            settings.resourceResolver));
                } else {
                    i.remove();
                }
            } else {
                throw new ConfigurationPointException("Invalid schema name: " + resource);
            }
        }

        if (!resources.isEmpty() && log.isDebugEnabled()) {
            ToStringBuilder buf = new ToStringBuilder();
View Full Code Here


        // output
        try {
            content = SchemaUtil.getDocumentText(doc, charset);
        } catch (Exception e) {
            throw new ConfigurationPointException("Failed to read text of schema file: " + name + ", source=" + super.toString(), e);
        }

        return content;
    }
View Full Code Here

    private InputStream getOriginalInputStream() {
        try {
            return originalSource.getInputStream();
        } catch (IOException e) {
            throw new ConfigurationPointException("Failed to read text of schema file: " + getName() + ", source=" + originalSource, e);
        }
    }
View Full Code Here

                            getContributionSchemaTransformer(getConfigurationPoint().getConfigurationPoints(), this)));
                } else {
                    i.remove();
                }
            } else {
                throw new ConfigurationPointException("Invalid schema name: " + resource);
            }
        }

        if (!resources.isEmpty() && log.isDebugEnabled()) {
            ToStringBuilder buf = new ToStringBuilder();
View Full Code Here

        // output
        try {
            content = SchemaUtil.getDocumentText(doc, charset);
        } catch (Exception e) {
            throw new ConfigurationPointException("Failed to read text of schema file: " + name + ", source=" + super.toString(), e);
        }

        return content;
    }
View Full Code Here

                Map<String, String> params = parseNamespaceUriAndParams(value);
                String namespaceUri = assertNotNull(params.get(NAMESPACE_URI_KEY), "namespaceUri");

                if (!namespaceUri.endsWith(name)) {
                    throw new ConfigurationPointException("Naming Convention Violation: namespace URI [" + namespaceUri
                                                          + "] of configuration point should end with its name [" + name
                                                          + "].  This configuration point is located at " + configurationPointsLocation + ".");
                }

                String defaultElementName = params.get(DEFAULT_ELEMENT_KEY);
View Full Code Here

                        new SourceInfoSupport<ConfigurationPointSourceInfo>(ConfigurationPointImpl.this).setSource(source, lineNumber));

                Contribution existContrib = contributions.get(contrib.getKey());

                if (existContrib != null) {
                    throw new ConfigurationPointException("Duplicated contributions from locations: " + contribLocation
                                                          + "\n" + "     " + existContrib + "\n and " + contrib);
                }

                register(contrib);
View Full Code Here

        try {
            uriToClasspathLocationMappings = PropertiesLoaderUtils.loadAllProperties(SCHEMA_MAPPINGS_LOCATION,
                                                                                     resourceLoader.getClassLoader());
        } catch (IOException e) {
            throw new ConfigurationPointException("Unable to load Spring schema mappings from "
                                                  + SCHEMA_MAPPINGS_LOCATION, e);
        }

        String desc = "SpringSchema[" + SCHEMA_MAPPINGS_LOCATION + "]";
View Full Code Here

        log.trace("Trying to load configuration points at {}", configurationPointsLocation);

        try {
            mappings = PropertiesLoaderUtils.loadAllProperties(configurationPointsLocation, settings.classLoader);
        } catch (IOException e) {
            throw new ConfigurationPointException("Unable to load Configuration Points from "
                                                  + configurationPointsLocation, e);
        }

        for (Entry<Object, Object> entry : mappings.entrySet()) {
            String name = normalizeConfigurationPointName((String) entry.getKey());
            Map<String, String> params = parseNamespaceUriAndParams((String) entry.getValue());
            String namespaceUri = assertNotNull(params.get(NAMESPACE_URI_KEY), "namespaceUri");

            if (!namespaceUri.endsWith(name)) {
                throw new ConfigurationPointException("Naming Convention Violation: namespace URI [" + namespaceUri
                                                      + "] of configuration point should end with its name [" + name
                                                      + "].  This configuration point is located at " + configurationPointsLocation + ".");
            }

            String defaultElementName = params.get(DEFAULT_ELEMENT_KEY);
View Full Code Here

    public static byte[] getConfigurationPointSchemaContent(ConfigurationPoint configurationPoint, String version) {
        try {
            return getDocumentContent(createConfigurationPointSchema(configurationPoint, version), null);
        } catch (Exception e) {
            throw new ConfigurationPointException("Could not generate XML Schema for configuration point "
                                                  + configurationPoint.getName(), e);
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.springext.ConfigurationPointException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.