Examples of IBundleResolver


Examples of org.apache.felix.sigil.common.repository.IBundleResolver

    {
        public URI[] resolve(URI base) throws URISyntaxException
        {
            ArrayList<URI> uris = new ArrayList<URI>(1);

            IBundleResolver resolver = manager.getBundleResolver();
            IRequiredBundle element = ModelElementFactory.getInstance().newModelElement(
                IRequiredBundle.class);
            String[] parts = base.getSchemeSpecificPart().split(":");
            switch (parts.length)
            {
                case 2:
                    Version v = Version.parseVersion(parts[1]);
                    element.setVersions(new VersionRange(false, v, v, false));
                    // fall through on purpose
                case 1:
                    element.setSymbolicName(parts[0]);
                    break;
                default:
                    throw new URISyntaxException(base.toString(),
                        "Unexpected number of parts: " + parts.length);
            }
            try
            {
                ResolutionConfig config = new ResolutionConfig(
                    ResolutionConfig.IGNORE_ERRORS);
                IResolution resolution = resolver.resolve(element, config, null);
                if (resolution.getBundles().isEmpty())
                {
                    SigilCore.error("Failed to resolve bundle for " + base);
                }
                for (ISigilBundle b : resolution.getBundles())
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.