Package org.apache.ivy.osgi.core

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


public class CapabilityAdapter {

    public static void adapt(BundleInfo bundleInfo, Capability capability) throws ParseException {
        String name = capability.getName();
        if (BundleInfo.PACKAGE_TYPE.equals(name)) {
            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);
View Full Code Here


            }
        }
        if (pkgName == null) {
            throw new ParseException("No package name for the capability", 0);
        }
        ExportPackage exportPackage = new ExportPackage(pkgName, version);
        if (uses != null) {
            String[] split = uses.trim().split(",");
            for (int i = 0; i < split.length; i++) {
                String u = split[i];
                exportPackage.addUse(u.trim());
            }
        }
        return exportPackage;
    }
View Full Code Here

                            }
                            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

        }
        IAccessRule[] rules = new IAccessRule[bundleInfo.getExports().size() + 1];
        int i = 0;
        Iterator itExports = bundleInfo.getExports().iterator();
        while (itExports.hasNext()) {
            ExportPackage exportPackage = (ExportPackage) itExports.next();
            rules[i++] = JavaCore.newAccessRule(
                new Path(exportPackage.getName().replace('.', IPath.SEPARATOR) + "/*"),
                IAccessRule.K_ACCESSIBLE);
        }
        rules[i++] = JavaCore.newAccessRule(new Path("**/*"), IAccessRule.K_NON_ACCESSIBLE
                | IAccessRule.IGNORE_IF_BETTER);
        return rules;
View Full Code Here

                    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

public class CapabilityAdapter {

    public static void adapt(BundleInfo bundleInfo, Capability capability) throws ParseException {
        String name = capability.getName();
        if (BundleInfo.PACKAGE_TYPE.equals(name)) {
            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);
View Full Code Here

            }
        }
        if (pkgName == null) {
            throw new ParseException("No package name for the capability", 0);
        }
        ExportPackage exportPackage = new ExportPackage(pkgName, version);
        if (uses != null) {
            String[] split = uses.trim().split(",");
            for (int i = 0; i < split.length; i++) {
                String u = split[i];
                exportPackage.addUse(u.trim());
            }
        }
        return exportPackage;
    }
View Full Code Here

                                + ((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.ExportPackage

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.