1 /*
2 * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/config/Message.java,v 1.3 2004/08/18 12:25:56 hkollmann Exp $
3 * $Revision: 1.3 $
4 * $Date: 2004/08/18 12:25:56 $
5 *
6 * DbForms - a Rapid Application Development Framework
7 * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24 package org.dbforms.config;
25
26
27 /***
28 * <p>
29 * This class represents a Message tag in dbforms-error.xml
30 * </p>
31 *
32 * @author unknown
33 */
34 public class Message {
35 //------------------------ Properties ---------------------------------------------------------
36 private String language; // Code used to specify a language for this message
37
38 // May be converted to a real Locale object if need be...
39 private String message; // the message-name, as provided in xml-error file
40
41 /***
42 * DOCUMENT ME!
43 *
44 * @param language DOCUMENT ME!
45 */
46 public void setLanguage(String language) {
47 this.language = language;
48 }
49
50
51 /***
52 * DOCUMENT ME!
53 *
54 * @return DOCUMENT ME!
55 */
56 public String getLanguage() {
57 return language;
58 }
59
60
61 /***
62 * DOCUMENT ME!
63 *
64 * @param message DOCUMENT ME!
65 */
66 public void setMessage(String message) {
67 this.message = message;
68 }
69
70
71 /***
72 * DOCUMENT ME!
73 *
74 * @return DOCUMENT ME!
75 */
76 public String getMessage() {
77 return message;
78 }
79
80
81 /***
82 * DOCUMENT ME!
83 *
84 * @return DOCUMENT ME!
85 */
86 public String toString() {
87 StringBuffer buf = new StringBuffer();
88 buf.append("language=");
89 buf.append(language);
90 buf.append(" message=");
91 buf.append(getMessage());
92
93 return buf.toString();
94 }
95 }