Package org.osgi.service.obr

Examples of org.osgi.service.obr.Capability


        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");
            if (capability != null) {
                if (!"true".equals(capability.getProperties().get("Plugin"))) {
                    iterator.remove();
                }
            } else {
                iterator.remove();
            }
View Full Code Here


                if (availableList.getSelectedIndices().length > 0) {
                    Object selected = availableModel.getElementAt(availableList.getSelectedIndex());
                    if (selected instanceof Resource) {
                        Resource resource = (Resource) selected;
                        lName.setText(resource.getPresentationName());
                        Capability cap = getCapability(resource.getCapabilities(), "jmp3renamer");
                        String vendor = null;
                        if(cap != null) {
                            vendor = (String) cap.getProperties().get("Bundle-Vendor");
                        }
                        lAuthor.setText(vendor != null ? vendor : "N/A");
                        lVersion.setText(resource.getVersion().toString());
                        lStatus.setText(I18N.translate("not_installed"));
                        taDescription.setText((String) resource.getProperties().get(Resource.DESCRIPTION));
View Full Code Here

TOP

Related Classes of org.osgi.service.obr.Capability

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.