1 /*
2 * Copyright 2007-2008 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.sys;
17
18
19 /**
20 * This class represents an error message (severity type and actual message).
21 */
22 public class Message {
23 public static final int TYPE_FATAL = 1;
24 public static final int TYPE_WARNING = 0;
25
26 private String message;
27 private int type;
28
29 public Message(String m, int t, Object... args) {
30 message = String.format(m, args);
31 type = t;
32 }
33
34 public Message(String m, int t) {
35 message = m;
36 type = t;
37 }
38
39 public String toString() {
40 return message;
41 }
42
43 public String getMessage() {
44 return message;
45 }
46
47 public void setMessage(String message) {
48 this.message = message;
49 }
50
51 public int getType() {
52 return type;
53 }
54
55 public void setType(int type) {
56 this.type = type;
57 }
58 }