View Javadoc

1   /*
2    * $Id: Message.java 366395 2006-01-06 02:42:19Z niallp $
3    * $Revision: 366395 $
4    * $Date: 2006-01-06 02:42:19 +0000 (Fri, 06 Jan 2006) $
5    *
6    * ====================================================================
7    *
8    *  Copyright 2003-2006 The Apache Software Foundation
9    *
10   *  Licensed under the Apache License, Version 2.0 (the "License");
11   *  you may not use this file except in compliance with the License.
12   *  You may obtain a copy of the License at
13   *
14   *      http://www.apache.org/licenses/LICENSE-2.0
15   *
16   *  Unless required by applicable law or agreed to in writing, software
17   *  distributed under the License is distributed on an "AS IS" BASIS,
18   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   *  See the License for the specific language governing permissions and
20   *  limitations under the License.
21   *
22   */
23  
24  package org.apache.commons.resources;
25  
26  /**
27   * An encapsulation of an individual message stored in a MessageList object, consisting
28   * of a message key (to be used to look up message text in an appropriate
29   * message resources database) plus up to four placeholder objects that can
30   * be used for parametric replacement in the message text.
31   * <p>
32   * Orginally based on org.apache.struts.action.ActionMessage, Revision 50677.
33   */
34  public interface Message {
35  
36      /**
37       * <p>Return the logical name of the {@link org.apache.commons.resources.Resources} 
38       * instance this message is associated with.</p>
39       *
40       * @return The name of the resources instance.
41       */
42      public String getResourcesName();
43  
44      /**
45       * @return Get the message key for this message.
46       */
47      public String getKey();
48  
49      /**
50       * @return Get the replacement values for this message.
51       */
52      public Object[] getValues();
53  
54  }
55