Package org.jboss.gravia.repository

Examples of org.jboss.gravia.repository.RepositoryReader.nextResource()


    public RuntimeEnvironment initDefaultContent(InputStream content) {
        IllegalArgumentAssertion.assertNotNull(content, "content");
        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
View Full Code Here


        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
            IOUtils.safeClose(content);
        }
        return this;
View Full Code Here

        if (resurl != null) {
            InputStream input = resurl.openStream();
            RepositoryMBean repository = MBeanProxy.get(context.getMBeanServer(), RepositoryMBean.OBJECT_NAME, RepositoryMBean.class);
            try {
                RepositoryReader reader = new DefaultRepositoryXMLReader(input);
                Resource auxres = reader.nextResource();
                while (auxres != null) {
                    ResourceIdentity identity = auxres.getIdentity();
                    if (repository.getResource(identity.getCanonicalForm()) == null) {
                        repository.addResource(auxres.adapt(CompositeData.class));
                        result.add(identity);
View Full Code Here

                    ResourceIdentity identity = auxres.getIdentity();
                    if (repository.getResource(identity.getCanonicalForm()) == null) {
                        repository.addResource(auxres.adapt(CompositeData.class));
                        result.add(identity);
                    }
                    auxres = reader.nextResource();
                }
            } finally {
                IOUtils.safeClose(input);
            }
        }
View Full Code Here

    public RuntimeEnvironment initDefaultContent(InputStream content) {
        IllegalArgumentAssertion.assertNotNull(content, "content");
        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
View Full Code Here

        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(content);
            Resource xmlres = reader.nextResource();
            while (xmlres != null) {
                systemStore.addResource(xmlres);
                xmlres = reader.nextResource();
            }
        } finally {
            IOUtils.safeClose(content);
        }
        return this;
View Full Code Here

        for (String name : getInitialFeatureNames()) {
            String resname = "META-INF/repository-content/" + name + ".feature.xml";
            URL resurl = getClass().getClassLoader().getResource(resname);
            InputStream input = resurl.openStream();
            RepositoryReader reader = new DefaultRepositoryXMLReader(input);
            Resource auxres = reader.nextResource();
            while (auxres != null) {
                String identity = auxres.getIdentity().toString();
                if (repository.getResource(identity) == null) {
                    repository.addResource(auxres.adapt(CompositeData.class));
                }
View Full Code Here

            while (auxres != null) {
                String identity = auxres.getIdentity().toString();
                if (repository.getResource(identity) == null) {
                    repository.addResource(auxres.adapt(CompositeData.class));
                }
                auxres = reader.nextResource();
            }
        }
    }

    protected void removeRepositoryContent(MBeanServerConnection server, RepositoryMBean repository, Map<String, String> props) throws IOException {
View Full Code Here

        for (String name : getInitialFeatureNames()) {
            String resname = "META-INF/repository-content/" + name + ".feature.xml";
            URL resurl = getClass().getClassLoader().getResource(resname);
            InputStream input = resurl.openStream();
            RepositoryReader reader = new DefaultRepositoryXMLReader(input);
            Resource auxres = reader.nextResource();
            while (auxres != null) {
                String identity = auxres.getIdentity().toString();
                repository.removeResource(identity);
                auxres = reader.nextResource();
            }
View Full Code Here

            RepositoryReader reader = new DefaultRepositoryXMLReader(input);
            Resource auxres = reader.nextResource();
            while (auxres != null) {
                String identity = auxres.getIdentity().toString();
                repository.removeResource(identity);
                auxres = reader.nextResource();
            }
        }
    }
}
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.