Subversion Repositories DevTools

Rev

Rev 7078 | Rev 7093 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7078 Rev 7079
Line 370... Line 370...
370
     *  Used to estimate the cost of building the package
370
     *  Used to estimate the cost of building the package
371
     *  A WIP packages gets the buildTime of the package its based upon
371
     *  A WIP packages gets the buildTime of the package its based upon
372
     */
372
     */
373
    public int mBuildTime;
373
    public int mBuildTime;
374
 
374
 
375
    /** Used in the calculation of a ripple plan
-
 
376
     * 
-
 
377
     */
-
 
378
    public int mRippleOrder = 0;
-
 
379
    
-
 
380
    /** Set to indicate that the package is NOT a part of the full release set
375
    /** Set to indicate that the package is NOT a part of the full release set
381
     *  The package is a WIP, TestBuild or a ForcedRipple
376
     *  The package is a WIP, TestBuild or a ForcedRipple
382
     *  
377
     *  
383
     *   Used to simplify detection of such packages and to limit processing of these packages
378
     *   Used to simplify detection of such packages and to limit processing of these packages
384
     *   May be cleared if the package is added to the full set
379
     *   May be cleared if the package is added to the full set
Line 1589... Line 1584...
1589
            Package p = it.next();
1584
            Package p = it.next();
1590
            p.mIsProcessed = false;
1585
            p.mIsProcessed = false;
1591
            p.mProcessed = false;
1586
            p.mProcessed = false;
1592
            if (p.mBuildFile > 0)
1587
            if (p.mBuildFile > 0)
1593
                p.mBuildFile = 0;
1588
                p.mBuildFile = 0;
1594
            p.mRippleOrder = 0;
-
 
1595
        }
1589
        }
1596
    }
1590
    }
1597
    
1591
    
1598
    /** Reset the rippleOrder flag on a collection of packages
-
 
1599
     * 
-
 
1600
     */
-
 
1601
    public static void resetRippleOrder (ArrayList<Package> al)
-
 
1602
    {
-
 
1603
        for (Iterator<Package> it = al.iterator(); it.hasNext(); )
-
 
1604
        {
-
 
1605
            Package p = it.next();
-
 
1606
            p.mRippleOrder = 0;
-
 
1607
        }
-
 
1608
    }   
-
 
1609
    
-
 
1610
    /** Comparator for sorting package collections by mSeqId
1592
    /** Comparator for sorting package collections by mSeqId
1611
     *  Used to preserve order for unit testing
1593
     *  Used to preserve order for unit testing
1612
     */
1594
     */
1613
    public static final Comparator<Package> SeqComparator = new Comparator<Package>() {
1595
    public static final Comparator<Package> SeqComparator = new Comparator<Package>() {
1614
        
1596
        
Line 1620... Line 1602...
1620
        public int compare (Package p1, Package p2) {
1602
        public int compare (Package p1, Package p2) {
1621
                return p1.mSeqId - p2.mSeqId;
1603
                return p1.mSeqId - p2.mSeqId;
1622
        }
1604
        }
1623
    };
1605
    };
1624
    
1606
    
1625
    /** Comparator for sorting package collections by mBuildTime and mRippleOrder
-
 
1626
     *  Preserve rippleOrder
-
 
1627
     *  
-
 
1628
     */
-
 
1629
    public static final Comparator<Package> BuildOrderComparitor = new Comparator<Package>() {
-
 
1630
        
-
 
1631
        /**
-
 
1632
         * Returns -ve: p1 is less than p2
-
 
1633
         *           0: p1 = p2
-
 
1634
         *         +ve: p1 > p2
-
 
1635
         */
-
 
1636
        public int compare (Package p1, Package p2) {
-
 
1637
            if (p1.mRippleOrder == p2.mRippleOrder)
-
 
1638
            {
-
 
1639
                return p1.mBuildTime - p2.mBuildTime;
-
 
1640
            }
-
 
1641
            
-
 
1642
            return p1.mRippleOrder - p2.mRippleOrder;
-
 
1643
            
-
 
1644
        }
-
 
1645
    };
-
 
1646
    
-
 
1647
    /**
1607
    /**
1648
     * entity class supporting the ERG version numbering standard:
1608
     * entity class supporting the ERG version numbering standard:
1649
     * <major>.<minor>.<patch/build> patch/build is at least a 4 digit number
1609
     * <major>.<minor>.<patch/build> patch/build is at least a 4 digit number
1650
     * whose last 3 digits represent the build
1610
     * whose last 3 digits represent the build
1651
     */
1611
     */