Package org.papoose.core

Examples of org.papoose.core.VersionRange


                if (requireDescription.getSymbolName().equals(bundleGeneration.getSymbolicName()))
                {
                    if (prameters.containsKey(Constants.BUNDLE_VERSION_ATTRIBUTE))
                    {
                        VersionRange range = (VersionRange) prameters.get(Constants.BUNDLE_VERSION_ATTRIBUTE);

                        if (range.includes(bundleGeneration.getVersion()))
                        {
                            result.add(candidate);
                        }
                    }
                    else
                    {
                        result.add(candidate);
                    }
                }
            }
            else if (candidate instanceof UnBound)
            {
                assert false;
            }
            else
            {
                BoundHost bound = (BoundHost) candidate;
                BundleGeneration bundleGeneration = bound.getBundleGeneration();

                if (requireDescription.getSymbolName().equals(bundleGeneration.getSymbolicName()))
                {
                    if (prameters.containsKey(Constants.BUNDLE_VERSION_ATTRIBUTE))
                    {
                        VersionRange range = (VersionRange) prameters.get(Constants.BUNDLE_VERSION_ATTRIBUTE);

                        if (range.includes(bundleGeneration.getVersion()))
                        {
                            result.add(candidate);
                        }
                    }
                    else
View Full Code Here


                if (requireDescription.getSymbolName().equals(bundleGeneration.getSymbolicName()))
                {
                    if (prameters.containsKey(Constants.BUNDLE_VERSION_ATTRIBUTE))
                    {
                        VersionRange range = (VersionRange) prameters.get(Constants.BUNDLE_VERSION_ATTRIBUTE);

                        if (range.includes(bundleGeneration.getVersion()))
                        {
                            result.add(candidate);
                        }
                    }
                    else
                    {
                        result.add(candidate);
                    }
                }
            }
            else if (candidate instanceof UnBound)
            {
                UnBound unBound = (UnBound) candidate;
                Generation bundleGeneration = unBound.getToBeResolved();

                if (requireDescription.getSymbolName().equals(bundleGeneration.getSymbolicName()))
                {
                    if (prameters.containsKey(Constants.BUNDLE_VERSION_ATTRIBUTE))
                    {
                        VersionRange range = (VersionRange) prameters.get(Constants.BUNDLE_VERSION_ATTRIBUTE);

                        if (range.includes(bundleGeneration.getVersion()))
                        {
                            result.add(candidate);
                        }
                    }
                    else
View Full Code Here

        {
            if (importPackage.equals(exportPackage))
            {
                if (importParameters.containsKey(Constants.VERSION_ATTRIBUTE))
                {
                    VersionRange range = (VersionRange) importParameters.get(Constants.VERSION_ATTRIBUTE);
                    if (!range.includes((Version) exportParameters.get(Constants.VERSION_ATTRIBUTE))) return false;
                }
                if (importParameters.containsKey(Constants.PACKAGE_SPECIFICATION_VERSION))
                {
                    VersionRange range = (VersionRange) importParameters.get(Constants.PACKAGE_SPECIFICATION_VERSION);
                    if (!range.includes((Version) exportParameters.get(Constants.VERSION_ATTRIBUTE))) return false;
                }
                if (importParameters.containsKey(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE))
                {
                    String symbolicName = (String) importParameters.get(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE);
                    if (!symbolicName.equals(candidateExport.getCandidate().getGeneration().getSymbolicName())) return false;
                }
                if (importParameters.containsKey(Constants.BUNDLE_VERSION_ATTRIBUTE))
                {
                    VersionRange range = (VersionRange) importParameters.get(Constants.BUNDLE_VERSION_ATTRIBUTE);
                    if (!range.includes(candidateExport.getCandidate().getGeneration().getVersion())) return false;
                }

                Set<String> importKeys = new HashSet<String>(importParameters.keySet());
                importKeys.removeAll(Arrays.asList(Constants.VERSION_ATTRIBUTE, Constants.PACKAGE_SPECIFICATION_VERSION, Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, Constants.BUNDLE_VERSION_ATTRIBUTE, Constants.MANDATORY_DIRECTIVE));
                importKeys.removeAll(exportDescription.getMandatory());
View Full Code Here

TOP

Related Classes of org.papoose.core.VersionRange

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.