psdi.webclient.system.controller

Class LocaleString

  • java.lang.Object
    • psdi.webclient.system.controller.LocaleString


  • public class LocaleString
    extends java.lang.Object
    Class used to hold a single localised property that may be in an application. Besides simply holding data, it maintains a unique key that can be used for loading into a hashmap. It is important that the key never be parsed to see if it matches something; always call makeUniqueKey to generate a key and then see if it matches the key in this class
    • Constructor Summary

      Constructors 
      Constructor and Description
      LocaleString(java.lang.String id, java.lang.String property, java.lang.String value)
      Only constructor, must provide all five values
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getId()
      Returns the control id
      java.lang.String getProperty()
      Returns the property name
      java.lang.String getUniqueKey()
      Returns a single unique key for this label
      java.lang.String getValue()
      Returns the value for the label
      static java.lang.String makeUniqueKey(java.lang.String id, java.lang.String property)
      Generates a single unique key for use in hashmaps.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocaleString

        public LocaleString(java.lang.String id,
                            java.lang.String property,
                            java.lang.String value)
        Only constructor, must provide all five values
        Parameters:
        locale - locale or language for the string
        id - control id for the property
        property - name of the property
        value - value of the property
    • Method Detail

      • getUniqueKey

        public java.lang.String getUniqueKey()
        Returns a single unique key for this label
        Returns:
        the unique key
      • makeUniqueKey

        public static java.lang.String makeUniqueKey(java.lang.String id,
                                                     java.lang.String property)
        Generates a single unique key for use in hashmaps. The unique key is a combination of all four parameters.
        Parameters:
        id - control id for the property
        property - name of the property
        Returns:
        a unique key
      • getId

        public java.lang.String getId()
        Returns the control id
        Returns:
        the control id
      • getProperty

        public java.lang.String getProperty()
        Returns the property name
        Returns:
        the property name
      • getValue

        public java.lang.String getValue()
        Returns the value for the label
        Returns:
        the label value