Package org.apache.ivy.osgi.core

Examples of org.apache.ivy.osgi.core.BundleCapability


            ExportPackage exportPackage = getExportPackage(bundleInfo, capability);
            bundleInfo.addCapability(exportPackage);
        } else if (BundleInfo.BUNDLE_TYPE.equals(name)) {
            // nothing to do, already handled at the resource tag level
        } else if (BundleInfo.SERVICE_TYPE.equals(name)) {
            BundleCapability service = getOSGiService(bundleInfo, capability);
            bundleInfo.addCapability(service);
        } else {
            Message.warn("Unsupported capability '" + name + "' on the bundle '"
                    + bundleInfo.getSymbolicName() + "'");
        }
View Full Code Here


        }

        if (name == null) {
            throw new ParseException("No service name for the capability", 0);
        }
        BundleCapability service = new BundleCapability(BundleInfo.SERVICE_TYPE, name, version);
        return service;
    }
View Full Code Here

                                Message.debug("Unsupported provided capability " + child.namespace
                                        + " " + child.name + " " + child.version);
                            }
                            return;
                        }
                        BundleCapability capability;
                        if (type == BundleInfo.PACKAGE_TYPE) {
                            capability = new ExportPackage(child.name, child.version);
                        } else {
                            capability = new BundleCapability(type, child.name, child.version);
                        }
                        capabilities.add(capability);
                    }
                }
            });
View Full Code Here

                    Version version = ((ProvidedHandler) child).version;
                    String type = namespace2Type(((ProvidedHandler) child).namespace);
                    if (type == null) {
                        return;
                    }
                    BundleCapability capability;
                    if (type == BundleInfo.PACKAGE_TYPE) {
                        capability = new ExportPackage(name, version);
                    } else {
                        capability = new BundleCapability(type, name, version);
                    }
                    capabilities.add(capability);
                }
            });
        }
View Full Code Here

            addAttr(atts, ResourceHandler.URI, bundleInfo.getUri().toString());
        }
        handler.startElement("", ResourceHandler.RESOURCE, ResourceHandler.RESOURCE, atts);
        Iterator itCapabilities = bundleInfo.getCapabilities().iterator();
        while (itCapabilities.hasNext()) {
            BundleCapability capability = (BundleCapability) itCapabilities.next();
            saxCapability(capability, handler);
        }
        Iterator itRequirement = bundleInfo.getRequirements().iterator();
        while (itRequirement.hasNext()) {
            BundleRequirement requirement = (BundleRequirement) itRequirement.next();
View Full Code Here

            ExportPackage exportPackage = getExportPackage(bundleInfo, capability);
            bundleInfo.addCapability(exportPackage);
        } else if (BundleInfo.BUNDLE_TYPE.equals(name)) {
            // nothing to do, already handled at the resource tag level
        } else if (BundleInfo.SERVICE_TYPE.equals(name)) {
            BundleCapability service = getOSGiService(bundleInfo, capability);
            bundleInfo.addCapability(service);
        } else {
            Message.warn("Unsupported capability '" + name + "' on the bundle '"
                    + bundleInfo.getSymbolicName() + "'");
        }
View Full Code Here

        }

        if (name == null) {
            throw new ParseException("No service name for the capability", 0);
        }
        BundleCapability service = new BundleCapability(BundleInfo.SERVICE_TYPE, name, version);
        return service;
    }
View Full Code Here

        DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
            OSGiManifestParser.getInstance(), baseUri, bundleInfo, profileProvider);
        add(BundleInfo.BUNDLE_TYPE, bundleInfo.getSymbolicName(), md);
        Iterator itCapability = bundleInfo.getCapabilities().iterator();
        while (itCapability.hasNext()) {
            BundleCapability capability = (BundleCapability) itCapability.next();
            add(capability.getType(), capability.getName(), md);
        }
    }
View Full Code Here

                    if (type == null) {
                        Message.debug("Unsupported provided capability "
                                + ((ProvidedHandler) child).namespace + " " + name + " " + version);
                        return;
                    }
                    BundleCapability capability;
                    if (type == BundleInfo.PACKAGE_TYPE) {
                        capability = new ExportPackage(name, version);
                    } else {
                        capability = new BundleCapability(type, name, version);
                    }
                    capabilities.add(capability);
                }
            });
        }
View Full Code Here

TOP

Related Classes of org.apache.ivy.osgi.core.BundleCapability

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.