|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.james.util.XMLResources
public class XMLResources
Constructor Summary | |
---|---|
XMLResources()
|
Method Summary | |
---|---|
java.lang.String |
getString(java.lang.String name)
Returns a named string for the specified key. |
java.lang.String |
getString(java.lang.String name,
boolean required)
Returns a named string for the specified key. |
java.lang.String |
getString(java.lang.String name,
java.util.Map parameters)
Returns a named string, replacing parameters with the values set in a Map. |
java.lang.String |
getString(java.lang.String name,
java.util.Map parameters,
boolean required)
Returns a named string, replacing parameters with the values set in a Map. |
void |
init(java.io.File xmlFile,
java.lang.String group,
java.lang.String select,
java.util.Map configParameters)
Configures an XMLResources object to provide string statements from a file. |
static java.lang.String |
replaceParameters(java.lang.String str,
java.util.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(java.io.File xmlFile, java.lang.String group, java.lang.String select, java.util.Map configParameters) throws java.lang.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
java.lang.Exception
public java.lang.String getString(java.lang.String name)
name
- the name of the String resource required.
public java.lang.String getString(java.lang.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 java.lang.String getString(java.lang.String name, java.util.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 java.lang.String getString(java.lang.String name, java.util.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 java.lang.String replaceParameters(java.lang.String str, java.util.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |