001 /* 002 * $Id: Message.java 366395 2006-01-06 02:42:19Z niallp $ 003 * $Revision: 366395 $ 004 * $Date: 2006-01-06 02:42:19 +0000 (Fri, 06 Jan 2006) $ 005 * 006 * ==================================================================== 007 * 008 * Copyright 2003-2006 The Apache Software Foundation 009 * 010 * Licensed under the Apache License, Version 2.0 (the "License"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an "AS IS" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * 022 */ 023 024 package org.apache.commons.resources; 025 026 /** 027 * An encapsulation of an individual message stored in a MessageList object, consisting 028 * of a message key (to be used to look up message text in an appropriate 029 * message resources database) plus up to four placeholder objects that can 030 * be used for parametric replacement in the message text. 031 * <p> 032 * Orginally based on org.apache.struts.action.ActionMessage, Revision 50677. 033 */ 034 public interface Message { 035 036 /** 037 * <p>Return the logical name of the {@link org.apache.commons.resources.Resources} 038 * instance this message is associated with.</p> 039 * 040 * @return The name of the resources instance. 041 */ 042 public String getResourcesName(); 043 044 /** 045 * @return Get the message key for this message. 046 */ 047 public String getKey(); 048 049 /** 050 * @return Get the replacement values for this message. 051 */ 052 public Object[] getValues(); 053 054 } 055