Examples of SimpleProblems


Examples of org.jboss.dna.common.collection.SimpleProblems

                              Problems problems ) {
        CheckArg.isNotNull(configurationSource, "configurationSource");
        CheckArg.isNotNull(context, "context");
        PathFactory pathFactory = context.getValueFactories().getPathFactory();
        if (pathToConfigurationRoot == null) pathToConfigurationRoot = pathFactory.create("/dna:system");
        if (problems == null) problems = new SimpleProblems();
        Path sourcesPath = pathFactory.create(pathToConfigurationRoot, DnaLexicon.SOURCES);

        this.sources = new RepositoryLibrary(configurationSource, configurationWorkspaceName, sourcesPath, context);
        this.sources.addSource(configurationSource);
        this.pathToConfigurationRoot = pathToConfigurationRoot;
View Full Code Here

Examples of org.jboss.dna.common.collection.SimpleProblems

*/
@Immutable
public class MockSequencerContext extends StreamSequencerContext {

    public MockSequencerContext() {
        super(new ExecutionContext(), null, null, null, new SimpleProblems());
        getNamespaceRegistry().register("dnadtd", "http://www.jboss.org/dna/dtd/1.0");
        getNamespaceRegistry().register("dnaxml", "http://www.jboss.org/dna/xml/1.0");
    }
View Full Code Here

Examples of org.jboss.dna.common.collection.SimpleProblems

        this(new ExecutionContext(), inputPath);
    }

    public MockSequencerContext( ExecutionContext context,
                                 String inputPath ) {
        super(context, context.getValueFactories().getPathFactory().create(inputPath), null, null, new SimpleProblems());
        getNamespaceRegistry().register("dnadtd", "http://www.jboss.org/dna/dtd/1.0");
        getNamespaceRegistry().register("dnaxml", "http://www.jboss.org/dna/xml/1.0");
    }
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

                                JcrRepository.ConfigurationChange change ) throws Exception {
            this.config = repositoryConfiguration();
            this.systemContentInitializer = new SystemContentInitializer();
            if (other == null) {
                logger.debug("Starting '{0}' repository with configuration: \n{1}", repositoryName(), this.config);
                this.problems = new SimpleProblems();
            } else {
                logger.debug("Updating '{0}' repository with configuration: \n{1}", repositoryName(), this.config);
                this.problems = other.problems;
            }
            ExecutionContext tempContext = new ExecutionContext();
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

     * @throws IOException if there is a problem with the specified Infinispan configuration file
     * @throws Exception if there is a problem with underlying resource setup
     */
    public Problems getStartupProblems() throws Exception {
        doStart();
        SimpleProblems result = new SimpleProblems();
        result.addAll(this.configurationProblems);
        result.addAll(runningState().problems());
        return result;
    }
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

            }
        }

        private boolean updateInternalNodeTypes( RunningState repository ) {
            CndImporter importer = new CndImporter(repository.context());
            SimpleProblems problems = new SimpleProblems();
            try {
                importer.importFrom(getClass().getClassLoader().getResourceAsStream(CndImporter.MODESHAPE_BUILT_INS),
                                    problems,
                                    null);
                if (!problems.isEmpty()) {
                    LOGGER.error(JcrI18n.upgrade3_6_0CannotUpdateNodeTypes, problems.toString());
                    return false;
                }
                List<NodeTypeDefinition> nodeTypeDefinitions = new ArrayList<NodeTypeDefinition>(
                                                                                                 importer.getNodeTypeDefinitions());
                for (Iterator<NodeTypeDefinition> nodeTypeDefinitionIterator = nodeTypeDefinitions.iterator(); nodeTypeDefinitionIterator.hasNext();) {
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

            // This is Jackrabbit XML format ...
            return registerNodeTypes(importFromXml(new InputSource(new FileInputStream(file))), allowUpdate);
        }
        // Assume this is CND format ...
        CndImporter importer = new CndImporter(context());
        Problems problems = new SimpleProblems();
        importer.importFrom(content, problems, file.getAbsolutePath());

        // Check for (and report) any problems ...
        if (problems.hasProblems()) {
            // There are errors and/or warnings, so report them ...
            String summary = messageFrom(problems);
            if (problems.hasErrors()) {
                String msg = JcrI18n.errorsParsingNodeTypeDefinitions.text(file.getAbsolutePath(), summary);
                throw new RepositoryException(msg);
            }
            // Otherwise, there are warnings, so log them ...
            I18n msg = JcrI18n.warningsParsingNodeTypeDefinitions;
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

            // This is Jackrabbit XML format ...
            return registerNodeTypes(importFromXml(new InputSource(new StringReader(content))), allowUpdate);
        }
        // Assume this is CND format ...
        CndImporter importer = new CndImporter(context());
        Problems problems = new SimpleProblems();
        importer.importFrom(content, problems, "stream");

        // Check for (and report) any problems ...
        if (problems.hasProblems()) {
            // There are errors and/or warnings, so report them ...
            String summary = messageFrom(problems);
            if (problems.hasErrors()) {
                String msg = JcrI18n.errorsParsingStreamOfNodeTypeDefinitions.text(summary);
                throw new RepositoryException(msg);
            }
            // Otherwise, there are warnings, so log them ...
            I18n msg = JcrI18n.warningsParsingStreamOfNodeTypeDefinitions;
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

            // This is Jackrabbit XML format ...
            return registerNodeTypes(importFromXml(new InputSource(new StringReader(content))), allowUpdate);
        }
        // Assume this is CND format ...
        CndImporter importer = new CndImporter(context());
        Problems problems = new SimpleProblems();
        importer.importFrom(content, problems, url.toExternalForm());

        // Check for (and report) any problems ...
        if (problems.hasProblems()) {
            // There are errors and/or warnings, so report them ...
            String summary = messageFrom(problems);
            if (problems.hasErrors()) {
                String msg = JcrI18n.errorsParsingNodeTypeDefinitions.text(url.toExternalForm(), summary);
                throw new RepositoryException(msg);
            }
            // Otherwise, there are warnings, so log them ...
            I18n msg = JcrI18n.warningsParsingNodeTypeDefinitions;
View Full Code Here

Examples of org.modeshape.common.collection.SimpleProblems

     * Get the ordered list of index providers defined in the configuration.
     *
     * @return the immutable list of provider components; never null but possibly empty
     */
    public List<Component> getIndexProviders() {
        Problems problems = new SimpleProblems();
        List<Component> components = readComponents(doc, FieldName.INDEX_PROVIDERS, FieldName.CLASSNAME, INDEX_PROVIDER_ALIASES,
                                                    problems);
        assert !problems.hasErrors();
        return components;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.