Subversion Repositories DevTools

Rev

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

Rev 6914 Rev 7032
Line 42... Line 42...
42
 
42
 
43
  /**Indicates that the item has been processed
43
  /**Indicates that the item has been processed
44
   * @attribute
44
   * @attribute
45
   */
45
   */
46
  private boolean mProcessed = false;
46
  private boolean mProcessed = false;
-
 
47
  
-
 
48
  /** Indicates that the entry was imported from the database
-
 
49
   *  Used to determine entries that are no-longer needed and can be removed from the database
-
 
50
   *  Really only applied to indirect exclusions where the reason for the exclusion no longer exists
-
 
51
   *  
-
 
52
   */
-
 
53
  private boolean mImported = false;
47
 
54
 
48
  /**constructor
55
  /**constructor
-
 
56
   *    @param  identifier - pvid of the package being excluded
-
 
57
   *    @param  rootIdentifier  - pvid of the root package causing the exclusion. May be null
-
 
58
   *    @param  rootCause - Short (< 50 Char) string explaining the cause
-
 
59
   *    @param  testBuildInstruction - Indicates a text build instruction
49
   */
60
   */
50
  public BuildExclusion(int identifier, int rootIdentifier, String rootCause, int testBuildInstruction )
61
  public BuildExclusion(int identifier, int rootIdentifier, String rootCause, int testBuildInstruction )
51
  {
62
  {
52
    mLogger.debug("BuildExclusion");
63
    mLogger.debug("BuildExclusion");
53
    mId = identifier;
64
    mId = identifier;
Line 56... Line 67...
56
    mTestBuildInstruction = testBuildInstruction;
67
    mTestBuildInstruction = testBuildInstruction;
57
  }
68
  }
58
 
69
 
59
  /**sets mProcessed true
70
  /**sets mProcessed true
60
   */
71
   */
61
  void process()
72
  void setProcessed()
62
  {
73
  {
63
    mLogger.debug("process " + mId);
74
    mLogger.debug("process " + mId);
64
    mProcessed = true;
75
    mProcessed = true;
65
  }
76
  }
66
 
77
 
67
  /** @returns true if the item has been marked as processed. 
78
  /** @returns true if the item has been marked as processed. 
68
   * Appears to be an indication that the entry has been superceeded.
79
   * Appears to be an indication that the entry has been superseded.
69
   */
80
   */
70
  boolean isProcessed()
81
  boolean isProcessed()
71
  {
82
  {
72
    mLogger.debug("isProcessed " + mId);
83
    mLogger.debug("isProcessed " + mId);
73
    mLogger.info("isProcessed returned " + mProcessed);
84
    mLogger.info("isProcessed returned " + mProcessed);
74
    return mProcessed;
85
    return mProcessed;
75
  }
86
  }
-
 
87
  
-
 
88
  /** Flag as an imported entry
-
 
89
   *  Used to detect indirect exclusions that are no longer valid
-
 
90
   */
-
 
91
  void setImported()
-
 
92
  {
-
 
93
      mImported = true;
-
 
94
  }
76
 
95
 
-
 
96
  /** Test the state of the imported flag
-
 
97
   * 
-
 
98
   */
-
 
99
  boolean isImported()
-
 
100
  {
-
 
101
      return mImported;
-
 
102
  }
-
 
103
  
77
  /**
104
  /**
78
   * Compare this item with parameters
105
   * Compare this item with parameters
79
   * @param identifier          - Related Package identifier
106
   * @param identifier          - Related Package identifier
80
   * @param rootIdentifier      - Package identifier of root cause
107
   * @param rootIdentifier      - Package identifier of root cause
81
   * @param  rootCause          - Root cause string. May be null
108
   * @param  rootCause          - Root cause string. May be null
Line 200... Line 227...
200
        // Excluded due to Ripple Stop
227
        // Excluded due to Ripple Stop
201
        // Will be recalculated so its not relevant
228
        // Will be recalculated so its not relevant
202
        retVal = false;
229
        retVal = false;
203
        
230
        
204
    } else {
231
    } else {
-
 
232
        
-
 
233
      retVal = false;
205
      for (Iterator<BuildExclusion> it = buildExclusionCollection.iterator(); it.hasNext(); )
234
      for (Iterator<BuildExclusion> it = buildExclusionCollection.iterator(); it.hasNext(); )
206
      {
235
      {
207
        BuildExclusion buildExclusion = it.next();
236
        BuildExclusion buildExclusion = it.next();
208
        
237
        
209
        if ( buildExclusion.isRelevant( mRootId ) )
238
        if ( buildExclusion.isRelevant( mRootId ) )
Line 278... Line 307...
278
            "RmRef: "   + CreateUrls.generateRmUrl(rippleEngine.getRtagId(), pkg.mId) +"<p>";
307
            "RmRef: "   + CreateUrls.generateRmUrl(rippleEngine.getRtagId(), pkg.mId) +"<p>";
279
            
308
            
280
            try
309
            try
281
            {
310
            {
282
              Smtpsend.send(
311
              Smtpsend.send(
283
              rippleEngine.getMailServer(),                 // mailServer
312
              rippleEngine.getMailServer(),             // mailServer
284
              rippleEngine.getMailSender(),                 // source
313
              rippleEngine.getMailSender(),             // source
285
              owners,                                   // target
314
              owners,                                   // target
286
              null,                                     // cc
315
              null,                                     // cc
287
              null,                                     // bcc
316
              null,                                     // bcc
288
              "BUILD FAILURE on package " + pkg.mName,  // subject
317
              "BUILD FAILURE on package " + pkg.mName,  // subject
289
              body,                                     // body
318
              body,                                     // body
Line 334... Line 363...
334
     */
363
     */
335
    public String info()
364
    public String info()
336
    {
365
    {
337
        String rv = "";
366
        String rv = "";
338
        rv += "pvid=" + mId + ",RootId=" + mRootId + ",Processed=" + mProcessed + ",TestBuild=" + mTestBuildInstruction + ",RootCause=" + mRootCause;
367
        rv += "pvid=" + mId + ",RootId=" + mRootId + ",Processed=" + mProcessed + ",TestBuild=" + mTestBuildInstruction + ",RootCause=" + mRootCause;
-
 
368
        if ( mImported ) {
-
 
369
            rv += ",Imported=" + mImported;
-
 
370
        }
339
        return rv;
371
        return rv;
340
    }
372
    }
341
}
373
}