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 WebSphere Commerce.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Locale getLocale(java.lang.String language)
      Reads the locale from the WebSphere 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

        equals, 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 WebSphere 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.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 {}, for example, {1}
        Returns:
        the locale 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 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.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
      • 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.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.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
      • 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