Package org.apache.felix.bundlerepository

Examples of org.apache.felix.bundlerepository.RepositoryAdmin.addRepository()


        }
        else if ( "add".equals( action ) || "refresh".equals( action ) ) //$NON-NLS-1$ //$NON-NLS-2$
        {
            try
            {
                admin.addRepository( uri );
            }
            catch ( IOException e )
            {
                throw e;
            }
View Full Code Here


            {
                try
                {
                    if (action.equals(REPO_ADD))
                    {
                        ra.addRepository(args[i]);
                    }
                    else if (action.equals(REPO_REFRESH))
                    {
                        ra.removeRepository(args[i]);
                        ra.addRepository(args[i]);
View Full Code Here

        writeXMLToFile(tempXMLFile, xml);

        repoTracker = new ServiceTracker<RepositoryAdmin, RepositoryAdmin>(bundleContext, RepositoryAdmin.class, null);
        repoTracker.open();
        RepositoryAdmin repo = repoTracker.waitForService(30000);
        repo.addRepository(tempXMLFile.toURI().toURL());
        tempXMLFile.delete();

        Dictionary<String, Object> props = new Hashtable<String, Object>();
        props.put("repository-populated", reference.getProperty("repository-xml"));
        bundleContext.registerService(String.class, "", props);
View Full Code Here

                        ra.addRepository(args[i]);
                    }
                    else if (action.equals(REPO_REFRESH))
                    {
                        ra.removeRepository(args[i]);
                        ra.addRepository(args[i]);
                    }
                    else if (action.equals(REPO_REMOVE))
                    {
                        ra.removeRepository(args[i]);
                    }
View Full Code Here

        ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
        RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(ref);
        try {
            repositoryAdmin.removeRepository(obrFile.toURI().toURL().toExternalForm());
            repositoryAdmin.addRepository(obrFile.toURI().toURL());
        } finally {
            bundleContext.ungetService(ref);
        }
    }
View Full Code Here

    private void registerRepositories() throws Exception {
        ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
        RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(ref);
        try {
            repositoryAdmin.addRepository(obrFile.toURI().toURL());
            for (URL repository : repositories) {
                repositoryAdmin.addRepository(repository);
            }
        } finally {
            bundleContext.ungetService(ref);
View Full Code Here

        ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
        RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(ref);
        try {
            repositoryAdmin.addRepository(obrFile.toURI().toURL());
            for (URL repository : repositories) {
                repositoryAdmin.addRepository(repository);
            }
        } finally {
            bundleContext.ungetService(ref);
        }
    }
View Full Code Here

        ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
        RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(ref);
        try {
            repositoryAdmin.removeRepository(obrFile.toURI().toURL().toExternalForm());
            repositoryAdmin.addRepository(obrFile.toURI().toURL());
        } finally {
            bundleContext.ungetService(ref);
        }
    }
View Full Code Here

    private void registerRepositories() throws Exception {
        ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
        RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(ref);
        try {
            repositoryAdmin.addRepository(obrFile.toURI().toURL());
            for (URL repository : repositories) {
                repositoryAdmin.addRepository(repository);
            }
        } finally {
            bundleContext.ungetService(ref);
View Full Code Here

        ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
        RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(ref);
        try {
            repositoryAdmin.addRepository(obrFile.toURI().toURL());
            for (URL repository : repositories) {
                repositoryAdmin.addRepository(repository);
            }
        } finally {
            bundleContext.ungetService(ref);
        }
    }
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.