Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
814 mhunt 1
package com.erggroup.buildtool.ripple;
2
 
3
import java.io.File;
4
 
5
import java.util.Iterator;
6
import java.util.Vector;
7
 
8
import org.apache.log4j.Logger;
9
 
10
public class Package
11
{
12
  /**name of package, must not contain spaces
13
   * @attribute
14
   */
15
  String mName = new String();
16
 
17
  /**package scope
18
   * @attribute
19
   */
20
  String mExtension = new String();
21
 
22
  /**instance identifier
23
   * @attribute
24
   */
25
  String mVersion = new String();
26
 
27
  /**unique identifier
28
   * for daemon builds = mName + mExtension
29
   * for escrow builds = mName + mVersion + mExtension
30
   * @attribute
31
   */
32
  String mAlias = new String();
33
 
34
  /**clearcase vob location, must not contain spaces
35
   * @attribute
36
   */
37
  String mLocation = new String();
38
 
39
  /**clearcase source file instance identifier
40
   * @attribute
41
   */
42
  String mLabel = new String();
43
 
44
  /**build standards
45
   * @attribute
46
   */
864 mhunt 47
  Vector<BuildStandard> mBuildStandardCollection = new Vector<BuildStandard>();
814 mhunt 48
 
49
  /**GBE_MACHTYPE used to build generic packages for this baseline
50
   * only has meaning in the daemon build, not the escrow build
51
   * accessed by BuildStandard::getPlatform, getBuildStandard
52
   * @attribute
53
   */
54
  public static final String mGenericMachtype = System.getenv("GBE_MACHTYPE");
55
 
56
  /**build dependencies by package alias
57
   * @attribute
58
   */
864 mhunt 59
  Vector<String> mDependencyCollection = new Vector<String>();
814 mhunt 60
 
61
  /**primary package version key pv_id in database
62
   * @attribute
63
   */
64
  int mId;
65
 
66
  /**indication of the nature of change
67
   * @attribute
68
   */
69
  Package.VersionNumberingStandard mChangeType = new VersionNumberingStandard();
70
 
71
  /**determines what field is rippled on a package version whose dependencies have changed
72
   * @attribute
73
   */
74
  Package.VersionNumberingStandard mRippleField = new VersionNumberingStandard();
75
 
76
  /**interested owners
77
   * @attribute
78
   */
864 mhunt 79
  private Vector<String> mBuildFailureEmailCollection = new Vector<String>();
814 mhunt 80
 
81
  /**when true will trigger unit tests as part of the package build phase in daemon mode
82
   * @attribute
83
   */
84
  boolean mHasAutomatedUnitTests = false;
85
 
86
  /**when true, do not ripple this package through packages which are dependent upon it in daemon mode
87
   * @attribute
88
   */
89
  boolean mAdvisoryRipple = false;
90
 
91
  /**determines the build file the package is built in, or not
92
   *  1 buildfile 1 etc
93
   *  0 not yet processed (initial value)
94
   * -1 not reproducible
95
   * -2 not reproducible on the build platforms configured for this release
96
   * -3 do not ripple
97
   * -4 directly dependent on package versions not in the baseline
98
   * -5 indirectly dependent on package versions which are not reproducible
99
   *    because of -1, -2 (escrow), -3 (daemon), -4
100
   * @attribute
101
   */
102
  int mBuildFile = 0;
103
 
104
  /**build dependencies by package
105
   * @attribute
106
   */
864 mhunt 107
  Vector<Package> mPackageDependencyCollection = new Vector<Package>();
814 mhunt 108
 
109
  /**used for escrow build purposes
110
   * set true when a package has been processed
111
   * @attribute
112
   */
113
  boolean mProcessed = false;
114
 
115
  /**set true for WIP package versions
116
   * only used in daemon mode
117
   * @attribute
118
   */
119
  boolean mDirectlyPlanned = false;
120
 
121
  /**set true when it is determined to be ripple built
122
   * @attribute
123
   */
124
  boolean mIndirectlyPlanned = false;
125
 
126
  /**build dependencies by pv_id (-1 or not used for planned dependencies)
127
   * @attribute
128
   */
864 mhunt 129
  Vector<Integer> mDependencyIDCollection = new Vector<Integer>();
814 mhunt 130
 
131
  /**unique pkg_id in the database
132
   * used for querying package version existence in the database in daemon mode
133
   * @attribute
134
   */
135
  int mPid;
136
 
874 mhunt 137
  /**maximum major number supported for determining ripple number
138
   * @attribute
139
   */
140
  int mMajorLimit;
141
 
142
  /**maximum minor number supported for determining ripple number
143
   * @attribute
144
   */
145
  int mMinorLimit;
146
 
147
  /**maximum patch number supported for determining ripple number
148
   * @attribute
149
   */
150
  int mPatchLimit;
151
 
152
  /**maximum build number number supported for determining ripple number
153
   * @attribute
154
   */
155
  int mBuildLimit;
156
 
814 mhunt 157
  /**Logger
158
   * @attribute
159
   */
160
  private static final Logger mLogger = Logger.getLogger(Package.class);
161
 
162
  /**dpkg archive location
163
   * @attribute
164
   */
165
  public static final String mGbeDpkg = System.getenv("GBE_DPKG");
166
 
167
  /**deploy archive location
168
   * @attribute
169
   */
170
  public static final String mGbeDply = System.getenv("GBE_DPLY");
171
 
172
  /**true if the package exists in the dpkg or deploy archive
173
   * @attribute
174
   */
175
  private boolean mArchivalExistence = true;
176
 
852 mhunt 177
  /**when true will trigger source control interaction eg labelling
178
   * @attribute
179
   */
180
  public boolean mRequiresSourceControlInteraction = true;
181
 
814 mhunt 182
  /**constructor
183
   */
184
  Package(int pv_id, String pkg_name, String v_ext, String alias, 
185
          String pkg_label, String src_path, char change_type)
186
  {
187
    mLogger.debug("Package 1: pv_id " + pv_id + " pkg_name " + pkg_name + " v_ext " + v_ext + " alias " + alias + " pkg_label " + pkg_label + " src_path " + src_path + " change_type " + change_type);
188
    mId = pv_id;
189
    mName = pkg_name;
190
    mVersion = "0.0.0000";
191
    mExtension = v_ext;
192
    mAlias = alias;
193
    mLabel = pkg_label;
194
    mLocation = src_path;
195
 
196
    if (change_type == 'M')
197
    {
198
      mChangeType.setMajor();
199
    }
200
    else if (change_type == 'N')
201
    {
202
      mChangeType.setMinor();
203
    }
204
    else
205
    {
206
      mChangeType.setPatch();
207
    }
208
  }
209
 
210
  /**constructor
211
   */
212
  Package(int pv_id, String pkg_name, String pkg_version, String v_ext, 
213
          String alias, String pkg_label, String src_path, 
214
          char ripple_field)
215
  {
216
    mLogger.debug("Package 2: pv_id " + pv_id + " pkg_name " + pkg_name + " pkg_version " + pkg_version + " v_ext " + v_ext + " alias " + alias + " pkg_label " + pkg_label + " src_path " + src_path + " ripple_field " + ripple_field);
217
    mId = pv_id;
218
    mName = pkg_name;
219
    mVersion = pkg_version;
220
    int endindex = mVersion.length() - v_ext.length();
221
 
222
    if ( endindex > 0 )
223
    {
224
      mVersion = mVersion.substring(0, endindex);
225
    }
226
 
227
    mExtension = v_ext;
228
    mAlias = alias;
229
    mLabel = pkg_label;
230
    mLocation = src_path;
231
 
874 mhunt 232
    // setBuild is the default
814 mhunt 233
    if (ripple_field == 'M')
234
    {
235
      mRippleField.setMajor();
236
    }
237
    else if (ripple_field == 'm')
238
    {
239
      mRippleField.setMinor();
240
    }
241
    else if (ripple_field == 'p')
242
    {
243
      mRippleField.setPatch();
244
    }
874 mhunt 245
    else if (ripple_field == 'L')
246
    {
247
      mRippleField.setLimit();
248
    }
814 mhunt 249
  }
250
 
251
  /**constructor
252
   */
253
  Package()
254
  {
255
    mLogger.debug("Package 3");
256
    mId = 0;
257
    mName = "null";
258
    mExtension = "null";
259
    mAlias = "null";
260
    mLabel = "null";
261
    mLocation = "null";
262
  }
263
 
874 mhunt 264
  /**constructor for unit test purposes
265
  */
266
  public Package(ReleaseManager rm, String version, int majorLimit, int minorLimit, int patchLimit, int buildNumberLimit)
267
  {
268
    mId = -1;
269
    mRippleField.setLimit();
270
    mVersion = version;
271
    mMajorLimit = majorLimit;
272
    mMinorLimit = minorLimit;
273
    mPatchLimit = patchLimit;
274
    mBuildLimit = buildNumberLimit;
275
    try
276
    {
277
      mId = applyPV( rm, 0 );
278
    }
279
    catch(Exception e)
280
    {
281
    }
282
  }
283
 
284
  /**accessor for unit test purposes
285
   */
286
  public int getId()
287
  {
288
    return mId;
289
  }
290
 
291
  /**accessor for unit test purposes
292
   */
293
  public String getVersion()
294
  {
295
    return mVersion;
296
  }
297
 
814 mhunt 298
  /**returns true if mBuildStandardCollection is not empty
299
   */
300
  boolean isReproducible()
301
  {
302
    mLogger.debug("isReproducible on Package " + mName);
303
    boolean retVal = false;
304
 
305
    if ( mBuildStandardCollection.size() > 0 )
306
    {
307
      retVal = true;
308
    }
309
 
310
    mLogger.info("isReproducible returned " + retVal);
311
    return retVal;
312
  }
313
 
314
  /**returns true if at least one of its BuildStandards has mWin32 or mGeneric true
315
   */
316
  boolean isWin32Built()
317
  {
318
    mLogger.debug("isWin32Built on Package " + mName);
319
    boolean retVal = false;
864 mhunt 320
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
814 mhunt 321
    {
864 mhunt 322
      BuildStandard buildStandard = it.next();
814 mhunt 323
 
324
      if (buildStandard.getWin32() || buildStandard.getGeneric())
325
      {
326
        retVal = true;
327
        break;
328
      }
329
    }
330
 
331
    mLogger.info("isWin32Built returned " + retVal);
332
    return retVal;
333
  }
334
 
335
  /**returns true if at least one of its BuildStandards has mSolaris or mGeneric true
336
   */
337
  boolean isSolarisBuilt()
338
  {
339
    mLogger.debug("isSolarisBuilt on Package " + mName);
340
    boolean retVal = false;
864 mhunt 341
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
814 mhunt 342
    {
864 mhunt 343
      BuildStandard buildStandard = it.next();
814 mhunt 344
 
345
      if (buildStandard.getSolaris() || buildStandard.getGeneric())
346
      {
347
        retVal = true;
348
        break;
349
      }
350
    }
351
 
352
    mLogger.info("isSolarisBuilt returned " + retVal);
353
    return retVal;
354
  }
355
 
356
  /**returns true if at least one of its BuildStandards has mLinux or mGeneric true
357
   */
358
  boolean isLinuxBuilt()
359
  {
360
    mLogger.debug("isLinuxBuilt on Package " + mName);
361
    boolean retVal = false;
864 mhunt 362
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
814 mhunt 363
    {
864 mhunt 364
      BuildStandard buildStandard = it.next();
814 mhunt 365
 
366
      if (buildStandard.getLinux() || buildStandard.getGeneric())
367
      {
368
        retVal = true;
369
        break;
370
      }
371
    }
372
 
373
    mLogger.info("isLinuxBuilt returned " + retVal);
374
    return retVal;
375
  }
376
 
377
  /**returns true if at least one of its BuildStandards has mGeneric true
378
   */
379
  boolean isGeneric()
380
  {
381
    mLogger.debug("isGeneric on Package " + mName);
382
    boolean retVal = false;
864 mhunt 383
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
814 mhunt 384
    {
864 mhunt 385
      BuildStandard buildStandard = it.next();
814 mhunt 386
 
387
      if (buildStandard.getGeneric())
388
      {
389
        retVal = true;
390
        break;
391
      }
392
    }
393
 
394
    mLogger.info("isGeneric returned " + retVal);
395
    return retVal;
396
  }
397
 
398
  /**applies the required version number change
874 mhunt 399
   * returns 0 on success
400
   *         1 on cannot work with non standard versioning
401
   *         2 on ripple field limitations prevent a ripple build
814 mhunt 402
   */
874 mhunt 403
  int applyPV(ReleaseManager releaseManager, int rtag_id) throws Exception
814 mhunt 404
  {
405
    mLogger.debug("applyPV on Package " + mName);
406
    // three scenarios, only applyPV for 2 of them
407
    // WIP exists:                      mDirectlyPlanned == true;   mIndirectlyPlanned == true; mArchivalExistence don't care - applyPV
408
    // Package version is out of date:  mDirectlyPlanned == false;  mIndirectlyPlanned == true; mArchivalExistence == true    - applyPV
409
    // Package version does not exist:  mDirectlyPlanned == false;  mIndirectlyPlanned == true; mArchivalExistence == false   - do not applyPV
410
    if ( !mDirectlyPlanned && mIndirectlyPlanned && !mArchivalExistence )
411
    {
412
      // the package has an mIndirectlyPlanned flag set true in daemon mode because the package does not exist in an archive
413
      // do not apply a different package version
414
      mLogger.info("applyPV !mDirectlyPlanned && mIndirectlyPlanned && !mArchivalExistence on Package " + mName);
836 mhunt 415
      releaseManager.claimVersion(mPid, mVersion + mExtension, rtag_id);
874 mhunt 416
      mLogger.info("applyPv returned 0");
417
      return 0;
814 mhunt 418
    }
419
 
420
    int major = 0;
421
    int minor = 0;
422
    int patch = 1000;
423
 
424
    String field[] = mVersion.split("\\D");
888 mhunt 425
    String nonStandardCotsVersion = "";
426
 
814 mhunt 427
    if ( field.length == 3 )
428
    {
429
      major = Integer.parseInt(field[0]);
430
      minor = Integer.parseInt(field[1]);
431
      patch = Integer.parseInt(field[2]);
432
    }
433
    else
434
    {
888 mhunt 435
      if ( !mChangeType.mMajor &&
436
           !mChangeType.mMinor &&
437
           !mChangeType.mPatch &&
438
           mRippleField.mBuild &&
439
           mExtension.compareTo(".cots") == 0 &&
440
           field.length > 0 )
441
      {
442
        // DEVI 52782
443
        // allow and work with (ripple build) versions a.b.c.d....xxxx
444
        // where xxxx.length > 3
445
        String patchStr = field[field.length - 1];
446
        int patchLen = patchStr.length();
447
 
448
        // check patchStr is the last (at least 4) digits
449
        if ( patchLen > 3 && mVersion.substring( mVersion.length() - patchLen, mVersion.length() ).compareTo(patchStr) == 0 )
450
        {
451
          patch = Integer.parseInt(patchStr);
452
          nonStandardCotsVersion = mVersion.substring(0, mVersion.length() - patchLen );
453
        }
454
      }
455
 
456
      if ( nonStandardCotsVersion.length() == 0 )
457
      {
458
        // cannot work with non standard versioning
459
        mLogger.error("applyPV cannot work with non standard versioning");
460
        mLogger.info("applyPv returned 1");
461
        return 1;
462
      }
814 mhunt 463
    }
464
 
888 mhunt 465
    if ( nonStandardCotsVersion.length() == 0 &&
466
         patch < 1000 && 
467
         field[2].substring(0, 1).compareTo("0") != 0 )
814 mhunt 468
    {
469
      mLogger.info("applyPV accomodate old style mVersion of the form 1.0.1");
470
      patch = patch * 1000;
471
    }
472
 
473
    // mChangeType overrides mRippleField
474
    do
475
    {
476
      if ( mChangeType.mMajor )
477
      {
478
        major++;
479
        mLogger.info("applyPV mChangeType.mMajor " + major);
480
        minor = 0;
481
        patch = 0;
482
      }
483
      else if ( mChangeType.mMinor )
484
      {
485
        minor++;
486
        mLogger.info("applyPV mChangeType.mMinor " + minor);
487
        patch = 0;
488
      }
489
      else if ( mChangeType.mPatch )
490
      {
491
        do
492
        {
493
          patch++;
494
        } while ( ( patch / 1000 ) * 1000 != patch );
495
        mLogger.info("applyPV mChangeType.mPatch " + patch);
496
      }
497
      else
498
      {
499
        if ( mRippleField.mMajor )
500
        {
501
          major++;
502
          mLogger.info("applyPV mRippleField.mMajor " + major);
503
          minor = 0;
504
          patch = 0;
505
        }
506
        else if ( mRippleField.mMinor )
507
        {
508
          minor++;
509
          mLogger.info("applyPV mRippleField.mMinor " + minor);
510
          patch = 0;
511
        }
512
        else if ( mRippleField.mPatch )
513
        {
514
          do
515
          {
516
            patch++;
517
          } while ( ( patch / 1000 ) * 1000 != patch );
518
          mLogger.info("applyPV mRippleField.mPatch " + patch);
519
        }
874 mhunt 520
        else if ( mRippleField.mBuild )
814 mhunt 521
        {
522
          patch++;
874 mhunt 523
          mLogger.info("applyPV mRippleField.mBuild " + patch);
814 mhunt 524
        }
874 mhunt 525
        else
526
        {
527
          // increment fields according to limits
528
          boolean changeOccurred = false;
529
          boolean incrementField = true;
530
 
531
          if ( mBuildLimit != 0 )
532
          {
533
            // increment or reset the patch build number
534
            if ( patch < mBuildLimit )
535
            {
536
              // can increment the patch build number
537
              patch++;
538
              mLogger.info("applyPv mRippleField.mLimit build number " + patch);
539
              changeOccurred = true;
540
              incrementField = false;
541
            }
542
            else
543
            {
544
              if ( mPatchLimit == 0 )
545
              {
546
                // reset the patch number and patch build number
547
                patch = 0;
548
              }
549
            }
550
          }
551
 
552
          if ( mPatchLimit != 0 && incrementField )
553
          {
554
            // increment or reset the patch number
555
            if ( ( patch / 1000 ) < mPatchLimit )
556
            {
557
              do
558
              {
559
                patch++;
560
              } while ( ( patch / 1000 ) * 1000 != patch );
561
 
562
              mLogger.info("applyPv mRippleField.mLimit patch " + patch);
563
              changeOccurred = true;
564
              incrementField = false;
565
            }
566
            else
567
            {
568
              // reset the patch number and patch build number
569
              patch = 0;
570
            }
571
          }
572
 
573
          if ( mMinorLimit != 0 && incrementField )
574
          {
575
            // increment or reset the minor number
576
            if ( minor < mMinorLimit )
577
            {
578
              minor++;
579
              mLogger.info("applyPv mRippleField.mLimit minor " + minor);
580
              changeOccurred = true;
581
              incrementField = false;
582
            }
583
            else
584
            {
585
              // reset the minor number
586
              minor = 0;
587
            }
588
          }
589
 
590
          if ( mMajorLimit != 0 && incrementField )
591
          {
592
            // increment or reset the major number
593
            if ( major < mMajorLimit )
594
            {
595
              // increment the major number
596
              changeOccurred = true;
597
              major++;
598
              mLogger.info("applyPv mRippleField.mLimit major " + major);
599
            }
600
          }
601
 
602
          if ( !changeOccurred )
603
          {
604
            // unable to increment a field due to field limitations
605
            mLogger.error("applyPV ripple field limitations prevent a ripple build");
606
            mLogger.info("applyPv returned 2");
607
            return 2;
608
          }
609
        }
814 mhunt 610
      }
888 mhunt 611
 
612
      if ( nonStandardCotsVersion.length() == 0 )
613
      {
614
        mVersion = String.valueOf(major) + "." + String.valueOf(minor) + ".";
615
      }
616
      else
617
      {
618
        mVersion = nonStandardCotsVersion;
619
      }
814 mhunt 620
 
621
      if ( patch < 10 )
622
      {
623
        mVersion += "000";
624
      }
625
      else if ( patch < 100 )
626
      {
627
        mVersion += "00";
628
      }
629
      else if ( patch < 1000 )
630
      {
631
        mVersion += "0";
632
      }
633
 
634
      mVersion += String.valueOf(patch);
635
    } while ( exists(releaseManager, rtag_id) );
636
 
637
    releaseManager.claimVersion(mPid, mVersion + mExtension, rtag_id);
874 mhunt 638
    mLogger.info("applyPv returned 0");
639
    return 0;
814 mhunt 640
  }
641
 
642
  /**returns true if the version exists in the dpkg_archive, deploy_archive or release manager database
643
   * claims the version in the release manager database
644
   */
645
  private boolean exists(ReleaseManager releaseManager, int rtag_id) throws Exception
646
  {
647
    mLogger.debug("exists 1 on Package " + mName + " version " + mVersion + " extension " + mExtension);
648
    boolean retVal = false;
649
 
864 mhunt 650
    if ( !ReleaseManager.mUseDatabase )
814 mhunt 651
    {
652
      mLogger.info("exists 1 !releaseManager.mUseDatabase");
653
    }
654
    else
655
    {
656
      retVal = exists();
657
 
658
      if ( !retVal )
659
      {
660
        String pkg_version = new String(mVersion);
661
 
662
        if ( mExtension.length() > 0 )
663
        {
664
          pkg_version += mExtension;
665
        }
666
 
667
        retVal = releaseManager.queryPackageVersions(mPid, pkg_version);
668
      }
669
    }
670
 
671
    mLogger.info("exists 1 returned " + retVal);
672
    return retVal;
673
  }
674
 
675
  /**returns true if the version exists in the dpkg_archive or deploy_archive
676
   */
677
  boolean exists()
678
    throws Exception
679
  {
680
    mLogger.debug("exists 2 on Package " + mName);
681
    boolean retVal = false;
682
 
683
    String Release = mGbeDpkg;
684
    String Deploy = mGbeDply;
685
 
686
    if (Release == null || Deploy == null)
687
    {
868 mhunt 688
      mLogger.fatal("exists 2 Release == null || Deploy == null");
689
      throw new Exception("exists 2 Release == null || Deploy == null");
814 mhunt 690
    }
691
 
692
    String fs = System.getProperty( "file.separator" );
693
    String name = new String(Release);
694
    name += fs + mName + fs + mVersion + mExtension;
695
    File release = new File(name);
696
 
697
    if (release.exists())
698
    {
699
      mLogger.info("exists 2 release.exists()");
700
      retVal = true;
701
    }
702
 
703
    if (!retVal && (Release != Deploy))
704
    {
705
      name = Deploy + fs + mName + fs + mVersion + mExtension;
706
 
707
      File deploy = new File(name);
708
 
709
      if (deploy.exists())
710
      {
711
        mLogger.info("exists 2 deploy.exists()");
712
        retVal = true;
713
      }
714
    }
715
 
716
    mArchivalExistence = retVal;
717
    mLogger.info("exists 2 returned " + retVal);
718
    return retVal;
719
  }
854 mhunt 720
 
721
  /**returns email information
722
   */
723
  String emailInfo( String lf )
724
  {
725
    String retVal = new String();
726
 
864 mhunt 727
    for (Iterator<String> it = mBuildFailureEmailCollection.iterator(); it.hasNext(); )
854 mhunt 728
    {
864 mhunt 729
      String email = it.next();
854 mhunt 730
      retVal +=
731
      "  <owner email=\"" + email +"\"/>" + lf;
732
    }
733
 
734
    return retVal;
735
  }
814 mhunt 736
 
866 mhunt 737
  /**returns email information
738
   */
739
  String emailInfoNonAntTask()
740
  {
741
    String retVal = null;
742
 
743
    for (Iterator<String> it = mBuildFailureEmailCollection.iterator(); it.hasNext(); )
744
    {
745
      String email = it.next();
746
 
747
      if ( retVal == null )
748
      {
749
        retVal = new String();
750
      }
751
      else
752
      {
753
        retVal += ",";
754
      }
755
      retVal += email;
756
    }
757
 
758
    return retVal;
759
  }
760
 
864 mhunt 761
  /**adds email to mBuildFailureEmailCollection if unique
762
   */
763
  void addEmail( String email )
764
  {
765
    boolean alreadyExists = false;
766
 
767
    for (Iterator<String> it = mBuildFailureEmailCollection.iterator(); it.hasNext(); )
768
    {
769
      String existingEmail = it.next();
770
 
771
      if ( existingEmail.compareTo(email) == 0 )
772
      {
773
        alreadyExists = true;
774
        break;
775
      }
776
    }
777
 
778
    if ( !alreadyExists )
779
    {
780
      mBuildFailureEmailCollection.add(email);
781
    }
782
  }
783
 
814 mhunt 784
  /**entity class supporting the ERG version numbering standard:
785
   * <major>.<minor>.<patch/build>
786
   * patch/build is at least a 4 digit number whose last 3 digits represent the build
787
   */
788
  public class VersionNumberingStandard
789
  {
790
    /**in terms of the mChangeType Package field,
791
     * when true indicates the contract of the package has changed in a non backwardly compatible manner
792
     * in terms of the mRippleField Package field,
793
     * when true indicates the major version number will be incremented
794
     * @attribute
795
     */
796
    private boolean mMajor = false;
797
 
798
    /**in terms of the mChangeType Package field,
799
     * when true indicates the contract of the package has changed in a backwardly compatible manner
800
     * in terms of the mRippleField Package field,
801
     * when true indicates the minor version number will be incremented
802
     * @attribute
803
     */
804
    private boolean mMinor = false;
805
 
806
    /**in terms of the mChangeType Package field,
807
     * when true indicates the contract of the package has not changed, but the package has changed internally
808
     * in terms of the mRippleField Package field,
809
     * when true indicates the minor version number will be incremented
810
     * @attribute
811
     */
812
    private boolean mPatch = false;
813
 
814
    /**in terms of the mChangeType Package field,
815
     * when true indicates the package has not changed, its dependencies potentially have
816
     * in terms of the mRippleField Package field,
817
     * when true indicates the build number will be incremented
818
     * @attribute
819
     */
820
    private boolean mBuild = true;
821
 
874 mhunt 822
    /**in terms of the mChangeType Package field,
823
     * always false, does not apply
824
     * in terms of the mRippleField Package field,
825
     * when true indicates the major, minor, patch and build number will be incremented according to field limits
826
     * @attribute
827
     */
828
    private boolean mLimit = false;
829
 
814 mhunt 830
    /**constructor
831
     */
832
    private VersionNumberingStandard()
833
    {
834
      mLogger.debug("VersionNumberingStandard");
835
    }
836
 
874 mhunt 837
    /**sets mBuild true, mMajor false, mMinor false, mPatch false, mLimit false
814 mhunt 838
     */
839
    void setBuild()
840
    {
841
      mLogger.debug("setBuild");
842
      mBuild = true;
843
      mMajor = false;
844
      mMinor = false;
845
      mPatch = false;
874 mhunt 846
      mLimit = false;
814 mhunt 847
    }
848
 
874 mhunt 849
    /**sets mBuild false, mMajor true, mMinor false, mPatch false, mLimit false
814 mhunt 850
     */
851
    void setMajor()
852
    {
853
      mLogger.debug("setMajor");
854
      mBuild = false;
855
      mMajor = true;
856
      mMinor = false;
857
      mPatch = false;
874 mhunt 858
      mLimit = false;
814 mhunt 859
    }
860
 
874 mhunt 861
    /**sets mBuild false, mMajor false, mMinor true, mPatch false, mLimit false
814 mhunt 862
     */
863
    void setMinor()
864
    {
865
      mLogger.debug("setMinor");
866
      mBuild = false;
867
      mMajor = false;
868
      mMinor = true;
869
      mPatch = false;
874 mhunt 870
      mLimit = false;
814 mhunt 871
    }
872
 
874 mhunt 873
    /**sets mBuild false, mMajor false, mMinor false, mPatch true, mLimit false
814 mhunt 874
     */
875
    void setPatch()
876
    {
877
      mLogger.debug("setPatch");
878
      mBuild = false;
879
      mMajor = false;
880
      mMinor = false;
881
      mPatch = true;
874 mhunt 882
      mLimit = false;
814 mhunt 883
    }
884
 
874 mhunt 885
    /**sets mBuild false, mMajor false, mMinor false, mPatch false, mLimit true
886
     */
887
    void setLimit()
888
    {
889
      mLogger.debug("setPatch");
890
      mBuild = false;
891
      mMajor = false;
892
      mMinor = false;
893
      mPatch = false;
894
      mLimit = true;
895
    }
896
 
814 mhunt 897
  }
898
 
899
}