no.sesat.search.site.config
Class TextMessages

java.lang.Object
  extended by no.sesat.search.site.config.TextMessages

public final class TextMessages
extends Object

Wrapper to the MessageResources for a corresponding site. The site to use is defined through the context.

Version:
$Id: TextMessages.java 7225 2009-04-09 00:32:20Z ssmiweve $

Nested Class Summary
static interface TextMessages.Context
           
 
Method Summary
 String getMessage(String key)
          Get the message.
 String getMessage(String key, Object... arguments)
          Get the message.
 String getMessage(String key, Object arg0)
          Get the message.
 String getMessage(String key, Object arg0, Object arg1)
          Get the message.
 String getMessage(String key, Object arg0, Object arg1, Object arg2)
          Get the message.
 String getMessage(String key, Object arg0, Object arg1, Object arg2, Object arg3)
          Get the message.
 boolean hasMessage(String key)
          Does this message exist.
static TextMessages valueOf(Site site)
          Utility wrapper to the instanceOf(Context).
static TextMessages valueOf(TextMessages.Context cxt)
          Find the correct instance handling this Site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

valueOf

public static TextMessages valueOf(TextMessages.Context cxt)
Find the correct instance handling this Site.

Parameters:
cxt -
Returns:

valueOf

public static TextMessages valueOf(Site site)
Utility wrapper to the instanceOf(Context).

Parameters:
site -
Returns:

hasMessage

public boolean hasMessage(String key)
Does this message exist.

Parameters:
key - the message key
Returns:
true if a message value exists

getMessage

public String getMessage(String key)
Get the message.

Parameters:
key - the message key.
Returns:
Get the message.

getMessage

public String getMessage(String key,
                         Object arg0)
Get the message.

Parameters:
key - the message key.
arg0 - first parameter value, eg {0}
Returns:
Get the message.

getMessage

public String getMessage(String key,
                         Object arg0,
                         Object arg1)
Get the message.

Parameters:
key - key the message key.
arg0 - first parameter value, eg {0}
arg1 - second parameter value, eg {{1}
Returns:
Get the message.

getMessage

public String getMessage(String key,
                         Object arg0,
                         Object arg1,
                         Object arg2)
Get the message.

Parameters:
key - the message key.
arg0 - first param eter value, eg {0}
arg1 - second parameter value, eg {1}
arg2 - third parameter value, eg {2}
Returns:
Get the message.

getMessage

public String getMessage(String key,
                         Object arg0,
                         Object arg1,
                         Object arg2,
                         Object arg3)
Get the message.

Parameters:
key - the message key.
arg0 - first parameter value, eg {0}
arg1 - second parameter value, eg {1}
arg2 - third parameter value, eg {2}
arg3 - fourth parameter value, eg {3}
Returns:
Get the message.

getMessage

public String getMessage(String key,
                         Object... arguments)
Get the message.

Parameters:
key - the message key.
arguments - variable array of parameters, eg {0}, {1}, {2}, ...
Returns:
Get the message.


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.