Package org.waveprotocol.wave.model.document.util

Examples of org.waveprotocol.wave.model.document.util.DomOperationUtilTest$Bundle


    public List<Bundle> toBundleList() {
        ArrayList<Bundle> bundleList = new ArrayList<Bundle>();

        if (bundles == null) {
            Bundle bnd = new Bundle();
            bnd.setArtifactId(artifactId);
            bnd.setGroupId(groupId);
            bnd.setVersion(version);
            if (type != null) {
                bnd.setType(type);
            }
            bnd.setClassifier(classifier);
            bnd.setStartLevel(startLevel);
            bundleList.add(bnd);
        } else {
            for (ArtifactDefinition bundle : bundles) {
                bundleList.addAll(bundle.toBundleList());
            }
View Full Code Here


    public abstract List<StartLevel> getStartLevels();

    public Bundle get(Bundle bundle, boolean compareVersions) {
        for (StartLevel sl : getStartLevels()) {
            Bundle foundBundle = sl.getBundle(bundle, compareVersions);
            if (foundBundle != null) {
                return foundBundle;
            }
        }
        return null;
View Full Code Here

     * Merge bundle into a start level using the supplied level if present.
     * @param mergeStartLevel
     * @param newBnd
     */
    private void add(StartLevel mergeStartLevel, Bundle newBnd) {
        Bundle current = get(newBnd, false);
        if (current != null) {
            final Maven2OsgiConverter converter = new DefaultMaven2OsgiConverter();

            // compare versions, the highest will be used
            final Version newVersion = new Version(converter.getVersion(newBnd.getVersion()));
            final Version oldVersion = new Version(converter.getVersion(current.getVersion()));
            if ( newVersion.compareTo(oldVersion) > 0 ) {
                current.setVersion(newBnd.getVersion());
            }
        } else {
            StartLevel startLevel = null;
            if ( mergeStartLevel == null || newBnd.getStartLevel() != 0) {
                startLevel = getOrCreateStartLevel(newBnd.getStartLevel());
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.document.util.DomOperationUtilTest$Bundle

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.