View Javadoc
1   /*
2    * Copyright 2006-2007 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.gl.businessobject;
17  
18  /**
19   * A class that holds an error message that would have been encountered during a GL batch job
20   */
21  public class ScrubberMessage {
22      /**
23       * To mark Fatal errors, ones that should abend a batch process
24       */
25      public static int TYPE_FATAL = 1;
26      /**
27       * To mark warning errors, ones that should simply be logged but not abend the process
28       */
29      public static int TYPE_WARNING = 0;
30  
31      private String message;
32      private int type;
33  
34      /**
35       * Constructs a ScrubberMessage instance
36       * @param m the message
37       * @param t the type of message
38       */
39      public ScrubberMessage(String m, int t) {
40          message = m;
41          type = t;
42      }
43  
44      /**
45       * Returns the message
46       * @see java.lang.Object#toString()
47       */
48      public String toString() {
49          return message;
50      }
51  
52      /**
53       * Returns the error message of this object
54       * 
55       * @return the error message held by this object
56       */
57      public String getMessage() {
58          return message;
59      }
60  
61      /**
62       * Sets the error message for this object
63       * @param message the message to set
64       */
65      public void setMessage(String message) {
66          this.message = message;
67      }
68  
69      /**
70       * Returns the error type for this object 
71       * 
72       * @return the error type of this object
73       */
74      public int getType() {
75          return type;
76      }
77  
78      /**
79       * Sets the error type for this object
80       * 
81       * @param type an error type to set
82       */
83      public void setType(int type) {
84          this.type = type;
85      }
86  
87  
88  }