Package org.jboss.gravia.repository

Examples of org.jboss.gravia.repository.Repository$ConfigurationPropertyProvider


        ModelController modelController = injectedController.getValue();
        modelControllerClient = modelController.createClient(Executors.newCachedThreadPool());
        serverDeploymentManager = ServerDeploymentManager.Factory.create(modelControllerClient);

        Resolver resolver = injectedResolver.getValue();
        Repository repository = injectedRepository.getValue();
        provisioner = new DefaultProvisioner(resolver, repository) {

            @Override
            protected Environment createEnvironment() {
                return injectedEnvironment.getValue();
View Full Code Here


        return module;
    }

    public static Set<ResourceIdentity> addRepositoryContent(URL resurl) throws IOException {
        IllegalArgumentAssertion.assertNotNull(resurl, "resurl");
        Repository repository = ServiceLocator.getRequiredService(Repository.class);

        Set<ResourceIdentity> result = new HashSet<>();
        InputStream input = resurl.openStream();
        try {
            RepositoryReader reader = new DefaultRepositoryXMLReader(input);
            Resource auxres = reader.nextResource();
            while (auxres != null) {
                ResourceIdentity identity = auxres.getIdentity();
                if (repository.getResource(identity) == null) {
                    repository.addResource(auxres);
                    result.add(identity);
                }
                auxres = reader.nextResource();
            }
        } finally {
View Full Code Here

        return Collections.unmodifiableSet(result);
    }

    public static void removeRepositoryContent(Set<ResourceIdentity> identities) throws IOException {
        if (identities != null) {
            Repository repository = ServiceLocator.getRequiredService(Repository.class);
            for (ResourceIdentity resid : identities) {
                repository.removeResource(resid);
            }
        }
    }
View Full Code Here

    }

    @Test
    public void testRepositoryContent() throws Exception {
        Requirement freq = new IdentityRequirementBuilder("camel.core.feature", (String) null).getRequirement();
        Repository repository = ServiceLocator.getRequiredService(Repository.class);
        Collection<Capability> providers = repository.findProviders(freq);
        Assert.assertEquals("One provider", 1, providers.size());
    }
View Full Code Here

        }
    }

    private Resource getMavenResource(MavenCoordinates mavenid) {
        MavenDelegateRepository mvnrepo = null;
        Repository repository = getRepository();
        Repository delegate = repository.getFallbackRepository();
        if (delegate instanceof MavenDelegateRepository) {
            mvnrepo = (MavenDelegateRepository) delegate;
        } else if (delegate instanceof RepositoryAggregator) {
            RepositoryAggregator aggregator = (RepositoryAggregator) delegate;
            for (Repository repo : aggregator.getDelegates()) {
View Full Code Here

        }
    }

    private Resource getMavenResource(MavenCoordinates mavenid) {
        MavenDelegateRepository mvnrepo = null;
        Repository repository = getRepository();
        Repository delegate = repository.getFallbackRepository();
        if (delegate instanceof MavenDelegateRepository) {
            mvnrepo = (MavenDelegateRepository) delegate;
        } else if (delegate instanceof RepositoryAggregator) {
            RepositoryAggregator aggregator = (RepositoryAggregator) delegate;
            for (Repository repo : aggregator.getDelegates()) {
View Full Code Here

        }
    }

    private Resource getMavenResource(MavenCoordinates mavenid) {
        MavenDelegateRepository mvnrepo = null;
        Repository repository = getRepository();
        Repository delegate = repository.getFallbackRepository();
        if (delegate instanceof MavenDelegateRepository) {
            mvnrepo = (MavenDelegateRepository) delegate;
        } else if (delegate instanceof RepositoryAggregator) {
            RepositoryAggregator aggregator = (RepositoryAggregator) delegate;
            for (Repository repo : aggregator.getDelegates()) {
View Full Code Here

        ModuleContext moduleContext = runtime.getModuleContext();
        BundleContext bundleContext = new BundleContextAdaptor(moduleContext);
        servletContext.setAttribute(BundleContext.class.getName(), bundleContext);

        // Register the {@link Repository}, {@link Resolver}, {@link Provisioner} services
        Repository repository = registerRepositoryService(runtime);
        Resolver resolver = registerResolverService(runtime);
        registerProvisionerService(servletContext, runtime, repository, resolver);
    }
View Full Code Here

        return resolver;
    }

    private Repository registerRepositoryService(final Runtime runtime) {
        PropertiesProvider propertyProvider = new RuntimePropertiesProvider(runtime);
        Repository repository = new DefaultRepository(propertyProvider);
        ModuleContext syscontext = runtime.getModuleContext();
        repositoryRegistration =  RepositoryRuntimeRegistration.registerRepository(syscontext, repository);
        return repository;
    }
View Full Code Here

TOP

Related Classes of org.jboss.gravia.repository.Repository$ConfigurationPropertyProvider

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.