KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > engines > EngineMessage


1 package org.jahia.engines;
2
3
4 /**
5  * <p>Title: EngineMessage bean object. </p> <p>Description: Inspired by Struts ActionMessage,
6  * but more JavaBean compliant so that it can work with JSTL and better with Jahia's
7  * localization classes.</p> <p>Copyright: Copyright (c) 2002</p> <p>Company: Jahia Ltd</p>
8  *
9  * @author Serge Huber
10  * @version 1.0
11  */

12
13 public class EngineMessage {
14
15     private String JavaDoc key;
16     private Object JavaDoc[] values;
17
18     public EngineMessage () {
19         this (null, null);
20     }
21
22     public EngineMessage (String JavaDoc key) {
23         this (key, null);
24     }
25
26     public EngineMessage (String JavaDoc key, Object JavaDoc value) {
27         this.key = key;
28         Object JavaDoc[] objectArray = new Object JavaDoc[1];
29         objectArray[0] = value;
30         this.values = objectArray;
31     }
32
33     public EngineMessage (String JavaDoc key, Object JavaDoc value1, Object JavaDoc value2) {
34         this.key = key;
35         Object JavaDoc[] objectArray = new Object JavaDoc[2];
36         objectArray[0] = value1;
37         objectArray[1] = value2;
38         this.values = objectArray;
39     }
40
41     public EngineMessage (String JavaDoc key, Object JavaDoc[] values) {
42         this.key = key;
43         this.values = values;
44     }
45
46     public String JavaDoc getKey () {
47         return key;
48     }
49
50     public Object JavaDoc[] getValues () {
51         return values;
52     }
53 }
Popular Tags