|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.util.XMLResources
Constructor Summary | |
XMLResources()
|
Method Summary | |
String |
getString(String name)
Returns a named string for the specified key. |
String |
getString(String name,
boolean required)
Returns a named string for the specified key. |
String |
getString(String name,
Map parameters)
Returns a named string, replacing parameters with the values set in a Map. |
String |
getString(String name,
Map parameters,
boolean required)
Returns a named string, replacing parameters with the values set in a Map. |
void |
init(File xmlFile,
String group,
String select,
Map configParameters)
Configures an XMLResources object to provide string statements from a file. |
static String |
replaceParameters(String str,
Map parameters)
Returns a named string, replacing parameters with the values set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLResources()
Method Detail |
public void init(File xmlFile, String group, String select, Map configParameters) throws Exception
xmlFile
- the input file containing the string definitionsgroup
- xml element containing the strings to be usedselect
- if customized elements exist for this value, use them instead of the defaultconfigParameters
- a map of parameters (name-value string pairs) which are
replaced where found in the input strings
Exception
public String getString(String name)
name
- the name of the String resource required.
public String getString(String name, boolean required)
name
- the name of the String resource required.required
- true if the resource is required
ConfigurationException
- if a required resource cannot be found.public String getString(String name, Map parameters)
name
- the name of the String resource required.parameters
- a map of parameters (name-value string pairs) which are
replaced where found in the input strings
public String getString(String name, Map parameters, boolean required)
name
- the name of the String resource required.parameters
- a map of parameters (name-value string pairs) which are
replaced where found in the input strings
public static String replaceParameters(String str, Map parameters)
parameters
- a map of parameters (name-value string pairs) which are
replaced where found in the input strings
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |