org.paulneve.wlab.utilities
Class Strings

java.lang.Object
  extended by org.paulneve.wlab.utilities.Strings

public class Strings
extends java.lang.Object

Class to hold all of the text values used by the system. The values are set via Spring from strings.xml, which can be modified as the user sees fit (e.g. for translation to different languages etc).

Getter methods are intended to be read either from Java code, or from JSP. Setter methods are called once via Spring at application startup, and thence on should not be called again.

More information on what attribute goes where can be found in the comments in webapp/conf/strings.xml. (I don't see much point in populating a Javadoc with dozens of mostly identical comments! ;-)

Author:
Paul Neve

Constructor Summary
Strings()
           
 
Method Summary
 java.util.HashMap<java.lang.String,java.lang.String> getMap()
           
 java.lang.String m(java.lang.String s)
          Convenience method to get a value out of the map, rather than having to do strings.getMap().get("abc") - strings.m("abc") is so much easier to type :-)
 void setMap(java.util.HashMap<java.lang.String,java.lang.String> m)
          Sets the values into the map, tidying them to remove double spaces, and converting [ ] to < > - called from Spring and shouldn't be set in code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strings

public Strings()
Method Detail

m

public java.lang.String m(java.lang.String s)
Convenience method to get a value out of the map, rather than having to do strings.getMap().get("abc") - strings.m("abc") is so much easier to type :-)

Parameters:
s - key value to return
Returns:
corresponding value to key

getMap

public java.util.HashMap<java.lang.String,java.lang.String> getMap()

setMap

public void setMap(java.util.HashMap<java.lang.String,java.lang.String> m)
Sets the values into the map, tidying them to remove double spaces, and converting [ ] to < > - called from Spring and shouldn't be set in code.

Parameters:
m - map to set