Package org.osgi.service.obr

Examples of org.osgi.service.obr.RepositoryAdmin.discoverResources()


                        .put( "lastModified", repositories[i].getLastModified() ) //$NON-NLS-1$
                        .put( "name", repositories[i].getName() ) //$NON-NLS-1$
                        .put( "url", repositories[i].getURL() ) ); //$NON-NLS-1$
                }

                Resource[] resources = admin.discoverResources( filter );
                for ( int i = 0; resources != null && i < resources.length; i++ )
                {
                    json.append( "resources", toJSON( resources[i], bundles, details ) ); //$NON-NLS-1$
                }
            }
View Full Code Here


            {
                continue;
            }

            String filter = "(id=" + bundle + ")";
            Resource[] resources = repoAdmin.discoverResources( filter );
            if ( resources != null && resources.length > 0 )
            {
                resolver.add( resources[0] );
            }
        }
View Full Code Here

                version = "0.0.0";
            }
            final String filter = "(&(symbolicname=" + bundle.getSymbolicName() + ")(!(version=" + version
                + "))(version>=" + version + "))";

            final Resource[] resources = ra.discoverResources( filter );
            final Resource resource = selectHighestVersion( resources );
            if ( resource != null )
            {
                resolver.add( resource );
View Full Code Here

            sb.append('\n').append(repo.getName()).append(' ').append(repo.getURL().toString());
        }
        logger.info(I18N.translate("info.loading_plugin_list"), sb.toString());
        String filter = "(symbolicname=*)"; // get all bundles
        logger.info("Resolving {}", filter);
        Resource[] res = adm.discoverResources(filter);
        Collection<Resource> resources = filterByVersion(res);
        for (Iterator<Resource> iterator = resources.iterator(); iterator.hasNext();) {
            Resource resource = iterator.next();
            Capability[] caps = resource.getCapabilities();
            Capability capability = getCapability(caps, "jmp3renamer");
View Full Code Here

                Bundle bundle = (Bundle) object;
                String symbolicName = bundle.getSymbolicName();
                // String version = (String) bundle.getHeaders().get(Constants.BUNDLE_VERSION);
                String filter = "(symbolicname=" + symbolicName + ")";
                logger.info("Resolving " + filter);
                Collection<Resource> resources = filterByVersion(adm.discoverResources(filter));
                logger.info("Found {} resources", resources.size());
                if (resources.size() > 0) {
                    try {
                        bundle.uninstall();
                        for (Resource resource : resources) {
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.