Subversion Repositories DevTools

Rev

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

Rev 7051 Rev 7070
Line 362... Line 362...
362
	 *     User sets to 's'
362
	 *     User sets to 's'
363
	 *     This buildtool will set to 'w' when a ripple has been detected
363
	 *     This buildtool will set to 'w' when a ripple has been detected
364
	 *     User resets to NULL when the ripple can be resumed. This is stored as an 'n'
364
	 *     User resets to NULL when the ripple can be resumed. This is stored as an 'n'
365
	 * 
365
	 * 
366
	 */
366
	 */
367
	
-
 
368
    public char mRippleStop;
367
    public char mRippleStop;
369
    
368
    
370
    /**
369
    /**
371
     *  The calculated ripple build plan for this package
370
     *  The calculated ripple build plan for this package
372
     *  Will not be calculated for all packages, just those of interest
371
     *  Will not be calculated for all packages, just those of interest
Line 386... Line 385...
386
    /** Calculated time ( seconds) that is may take to build this package and then ripple packages that depend on it
385
    /** Calculated time ( seconds) that is may take to build this package and then ripple packages that depend on it
387
     *  both directly and indirectly. Based on mRipplePlan. 
386
     *  both directly and indirectly. Based on mRipplePlan. 
388
     */
387
     */
389
    public int mRippleTime = 0;
388
    public int mRippleTime = 0;
390
    
389
    
-
 
390
    /** Used in the calculation of a ripple plan
-
 
391
     * 
-
 
392
     */
-
 
393
    public int mRippleOrder = 0;
-
 
394
    
391
    /** Set to indicate that the package is NOT a part of the full release set
395
    /** Set to indicate that the package is NOT a part of the full release set
392
     *  The package is a WIP, TestBuild or a ForcedRipple
396
     *  The package is a WIP, TestBuild or a ForcedRipple
393
     *  
397
     *  
394
     *   Used to simplify detection of such packages and to limit processing of these packages
398
     *   Used to simplify detection of such packages and to limit processing of these packages
395
     *   May be cleared if the package is added to the full set
399
     *   May be cleared if the package is added to the full set
396
     */
400
     */
397
    public boolean mIsNotReleased = false;
401
    public boolean mIsNotReleased = false;
-
 
402
    
-
 
403
    /** Used by some algorithms for various indications
-
 
404
     * 
-
 
405
     */
-
 
406
    public boolean mIsProcessed = false;
398
 
407
 
399
    /**
408
    /**
400
     * Constructor
409
     * Constructor
401
     * Used to create planned packages. In these packages the change_type is significant
410
     * Used to create planned packages. In these packages the change_type is significant
402
     * 
411
     * 
Line 540... Line 549...
540
     * Constructor for unit test purposes
549
     * Constructor for unit test purposes
541
     * Performs a partial copy of a package - sufficient for test purposes
550
     * Performs a partial copy of a package - sufficient for test purposes
542
     * @param base      - Base package  
551
     * @param base      - Base package  
543
     * @param newPvId   - New pvid of the package
552
     * @param newPvId   - New pvid of the package
544
     */
553
     */
-
 
554
    @SuppressWarnings("unchecked")
545
    public Package(int newPvId, Package base) {
555
    public Package(int newPvId, Package base) {
546
        
556
        
547
        mId = newPvId;
557
        mId = newPvId;
548
        mPid = base.mPid;
558
        mPid = base.mPid;
549
        mName = base.mName;
559
        mName = base.mName;
Line 1549... Line 1559...
1549
            Package p = it.next();
1559
            Package p = it.next();
1550
            p.mSeqId = seq++;
1560
            p.mSeqId = seq++;
1551
        }
1561
        }
1552
    }
1562
    }
1553
 
1563
 
-
 
1564
    /** Reset the processed flag on a collection of packages
-
 
1565
     * 
-
 
1566
     */
-
 
1567
    public static void resetProcessed (ArrayList<Package> al)
-
 
1568
    {
-
 
1569
        for (Iterator<Package> it = al.iterator(); it.hasNext(); )
-
 
1570
        {
-
 
1571
            Package p = it.next();
-
 
1572
            p.mIsProcessed = false;
-
 
1573
        }
-
 
1574
    }
-
 
1575
    
-
 
1576
    /** Reset the rippleOrder flag on a collection of packages
-
 
1577
     * 
-
 
1578
     */
-
 
1579
    public static void resetRippleOrder (ArrayList<Package> al)
-
 
1580
    {
-
 
1581
        for (Iterator<Package> it = al.iterator(); it.hasNext(); )
-
 
1582
        {
-
 
1583
            Package p = it.next();
-
 
1584
            p.mRippleOrder = 0;
-
 
1585
        }
-
 
1586
    }   
1554
    
1587
    
1555
    /** Comparator for sorting package collections by mSeqId
1588
    /** Comparator for sorting package collections by mSeqId
1556
     *  Used to preserve order for unit testing
1589
     *  Used to preserve order for unit testing
1557
     */
1590
     */
1558
    public static final Comparator<Package> SeqComparator = new Comparator<Package>() {
1591
    public static final Comparator<Package> SeqComparator = new Comparator<Package>() {
Line 1563... Line 1596...
1563
         *         +ve: p1 > p2
1596
         *         +ve: p1 > p2
1564
         */
1597
         */
1565
        public int compare (Package p1, Package p2) {
1598
        public int compare (Package p1, Package p2) {
1566
                return p1.mSeqId - p2.mSeqId;
1599
                return p1.mSeqId - p2.mSeqId;
1567
        }
1600
        }
-
 
1601
    };
-
 
1602
    
-
 
1603
    /** Comparator for sorting package collections by mRippleTimme and mRippleOrder
-
 
1604
     *  Preserve rippleOrder
-
 
1605
     *  
-
 
1606
     */
-
 
1607
    public static final Comparator<Package> PlanComparator = new Comparator<Package>() {
1568
    };    
1608
        
-
 
1609
        /**
-
 
1610
         * Returns -ve: p1 is less than p2
-
 
1611
         *           0: p1 = p2
-
 
1612
         *         +ve: p1 > p2
-
 
1613
         */
-
 
1614
        public int compare (Package p1, Package p2) {
-
 
1615
            if (p1.mRippleOrder == p2.mRippleOrder)
-
 
1616
            {
-
 
1617
                return p1.mRippleTime - p2.mRippleTime;
-
 
1618
            }
-
 
1619
            
-
 
1620
            return p1.mRippleOrder - p2.mRippleOrder;
-
 
1621
            
-
 
1622
        }
-
 
1623
    };
-
 
1624
    
-
 
1625
    /** Comparator for sorting package collections by mRippleTimme (only)
-
 
1626
     *  
-
 
1627
     */
-
 
1628
    public static final Comparator<Package> RippleTimeComparator = new Comparator<Package>() {
-
 
1629
        
-
 
1630
        /**
-
 
1631
         * Returns -ve: p1 is less than p2
-
 
1632
         *           0: p1 = p2
-
 
1633
         *         +ve: p1 > p2
-
 
1634
         */
-
 
1635
        public int compare (Package p1, Package p2) {
-
 
1636
            return p1.mRippleTime - p2.mRippleTime;
-
 
1637
        }
-
 
1638
    };
-
 
1639
    
1569
 
1640
 
1570
    /**
1641
    /**
1571
     * entity class supporting the ERG version numbering standard:
1642
     * entity class supporting the ERG version numbering standard:
1572
     * <major>.<minor>.<patch/build> patch/build is at least a 4 digit number
1643
     * <major>.<minor>.<patch/build> patch/build is at least a 4 digit number
1573
     * whose last 3 digits represent the build
1644
     * whose last 3 digits represent the build
Line 1777... Line 1848...
1777
            mUnknown = true;
1848
            mUnknown = true;
1778
        }
1849
        }
1779
 
1850
 
1780
    }
1851
    }
1781
 
1852
 
-
 
1853
    /**
-
 
1854
     *  Add a package dependency
-
 
1855
     *  UTF Use
-
 
1856
     *  @param p - The package to add as a dependent
-
 
1857
     *  @return - The current package to allow chaining of calls
-
 
1858
     */
-
 
1859
    public Package addDependency(Package p) {
-
 
1860
        mDependencyCollection.add(p.mAlias);
-
 
1861
        mDependencyIDCollection.add(p.mId);
-
 
1862
        return this;
-
 
1863
    }
-
 
1864
 
1782
}
1865
}