com.ibm.commerce.negotiation.beans
Class NegotiationResource

java.lang.Object
  |
  +--com.ibm.commerce.negotiation.beans.NegotiationResource

public class NegotiationResource
extends java.lang.Object

Contains locale dependant messages for the Commerce Service Provider Merchant Tool.


Constructor Summary
NegotiationResource()
           
 
Method Summary
 java.util.Locale getLocale(java.lang.String language)
          Reads the locale from the Net.Commerce config file.
 java.lang.String getMessage(java.lang.String id)
          Gets the message from the given id for the default locale.
 java.lang.String getMessage(java.lang.String id, java.util.Locale locale)
          Gets the locale dependent message from the given id.
 java.lang.String getMessage(java.lang.String id, java.lang.Object p1)
          Gets the locale dependent message corresponding to the given id.
 java.lang.String getMessage(java.lang.String id, java.lang.Object[] objects)
          Gets the message from the given id for the default locale and an array of objects.
 java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.util.Locale locale)
          Gets the locale dependent message corresponding to the given id.
 java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2)
          Gets the locale dependent message corresponding to the given id.
 java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2, java.util.Locale locale)
          Gets the locale dependent message corresponding to the given id.
 java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Gets the local dependent message corresponding to the given id.
 java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.util.Locale locale)
          Gets the locale dependent message corresponding to the given id.
static void main(java.lang.String[] agrgs)
           
 void setLocale(java.lang.String l)
          Gets the message from the given id for the default locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegotiationResource

public NegotiationResource()
Method Detail

getLocale

public java.util.Locale getLocale(java.lang.String language)
Reads the locale from the Net.Commerce config file.
Returns:
Locale

getMessage

public java.lang.String getMessage(java.lang.String id)
Gets the message from the given id for the default locale.
Parameters:
id - message identifier
Returns:
the locale dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.util.Locale locale)
Gets the locale dependent message from the given id.
Parameters:
id - message identifier
locale - of the message
Returns:
the local dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object p1)
Gets the locale dependent message corresponding to the given id. The occurences of %1 are replaced by p1.
Parameters:
id - message identifier
p1 - replacement for %1
Returns:
the locale dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object[] objects)
Gets the message from the given id for the default locale and an array of objects.
Parameters:
id - message identifier
objects[] - to be used to replace locale specific information inside {}, e.g., {1}
Returns:
the locale dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object p1,
                                   java.util.Locale locale)
Gets the locale dependent message corresponding to the given id. The occurences of %1 are replaced by p1.
Parameters:
id - message identifier
p1 - replacement for %1
locale - locale of the returned message
Returns:
the locale dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object p1,
                                   java.lang.Object p2)
Gets the locale dependent message corresponding to the given id. The occurences of %1 are replaced by p1. The occurences of %2 are replaced by p2.
Parameters:
id - message identifier
p1 - replacement for %1
p2 - replacement for %2
Returns:
the locale dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object p1,
                                   java.lang.Object p2,
                                   java.util.Locale locale)
Gets the locale dependent message corresponding to the given id. The occurences of %1 are replaced by p1. The occurences of %2 are replaced by p2.
Parameters:
id - message identifier
p1 - replacement for %1
p2 - replacement for %2
locale - target locale of the message
Returns:
the locale dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object p1,
                                   java.lang.Object p2,
                                   java.lang.Object p3)
Gets the local dependent message corresponding to the given id. The occurences of %1 are replaced by p1. The occurences of %2 are replaced by p2. The occurences of %3 are replaced by p3.
Parameters:
id - message identifier
p1 - replacement for %1
p2 - replacement for %2
p3 - replacement for %3
Returns:
the local dependent message

getMessage

public java.lang.String getMessage(java.lang.String id,
                                   java.lang.Object p1,
                                   java.lang.Object p2,
                                   java.lang.Object p3,
                                   java.util.Locale locale)
Gets the locale dependent message corresponding to the given id. The occurences of %1 are replaced by p1. The occurences of %2 are replaced by p2. The occurences of %3 are replaced by p3.
Parameters:
id - message identifier
p1 - replacement for %1
p2 - replacement for %2
p3 - replacement for %3
locale - target locale for the message
Returns:
the local dependent message

main

public static void main(java.lang.String[] agrgs)

setLocale

public void setLocale(java.lang.String l)
Gets the message from the given id for the default locale.
Parameters:
id - message identifier
Returns:
the locale dependent message