org.tigris.subversion.svnclientadapter.utils
Class Messages

java.lang.Object
  extended by org.tigris.subversion.svnclientadapter.utils.Messages

public class Messages
extends java.lang.Object

A helper class used for binding NLS supported message strings


Field Summary
protected static java.util.ResourceBundle bundle
           
 
Constructor Summary
Messages()
           
 
Method Summary
static java.lang.String bind(java.lang.String key)
          Gets a string from the resource bundle.
static java.lang.String bind(java.lang.String key, java.lang.Object[] args)
          Gets a string from the resource bundle and binds it with the given arguments.
static java.lang.String bind(java.lang.String id, java.lang.String binding)
          Lookup the message with the given ID in this catalog and bind its substitution locations with the given string.
static java.lang.String bind(java.lang.String id, java.lang.String binding1, java.lang.String binding2)
          Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundle

protected static java.util.ResourceBundle bundle
Constructor Detail

Messages

public Messages()
Method Detail

bind

public static java.lang.String bind(java.lang.String id,
                                    java.lang.String binding)
Lookup the message with the given ID in this catalog and bind its substitution locations with the given string.

Parameters:
id -
binding -
Returns:
the message with substitutions applied

bind

public static java.lang.String bind(java.lang.String id,
                                    java.lang.String binding1,
                                    java.lang.String binding2)
Lookup the message with the given ID in this catalog and bind its substitution locations with the given strings.

Parameters:
id -
binding1 -
binding2 -
Returns:
the message with substitutions applied

bind

public static java.lang.String bind(java.lang.String key)
Gets a string from the resource bundle. We don't want to crash because of a missing String.

Parameters:
key -
Returns:
string from the resource bundle or the key if not found.

bind

public static java.lang.String bind(java.lang.String key,
                                    java.lang.Object[] args)
Gets a string from the resource bundle and binds it with the given arguments. If the key is not found, return the key.

Parameters:
key -
args -
Returns:
string with substitutions from the resource bundle or the key if not found.