| java.lang.Object org.apache.james.util.XMLResources
XMLResources | public class XMLResources (Code) | | |
Method Summary | |
public String | getString(String name) Returns a named string for the specified key.
Parameters: name - the name of the String resource required. | public String | getString(String name, boolean required) Returns a named string for the specified key. | public String | getString(String name, Map parameters) Returns a named string, replacing parameters with the values set in a Map. | public String | getString(String name, Map parameters, boolean required) Returns a named string, replacing parameters with the values set in a Map. | public void | init(File xmlFile, String group, String select, Map configParameters) Configures an XMLResources object to provide string statements from a file. | public static String | replaceParameters(String str, Map parameters) Returns a named string, replacing parameters with the values set. |
getString | public String getString(String name)(Code) | | Returns a named string for the specified key.
Parameters: name - the name of the String resource required. the requested resource |
getString | public String getString(String name, boolean required)(Code) | | Returns a named string for the specified key.
Parameters: name - the name of the String resource required. Parameters: required - true if the resource is required the requested resource throws: ConfigurationException - if a required resource cannot be found. |
getString | public String getString(String name, Map parameters)(Code) | | Returns a named string, replacing parameters with the values set in a Map.
Parameters: name - the name of the String resource required. Parameters: parameters - a map of parameters (name-value string pairs) which arereplaced where found in the input strings the requested resource |
getString | public String getString(String name, Map parameters, boolean required)(Code) | | Returns a named string, replacing parameters with the values set in a Map.
Parameters: name - the name of the String resource required. Parameters: parameters - a map of parameters (name-value string pairs) which arereplaced where found in the input strings the requested resource |
init | public void init(File xmlFile, String group, String select, Map configParameters) throws Exception(Code) | | Configures an XMLResources object to provide string statements from a file.
Parameters encoded as $(parameter} in the input file are
replace by values from the parameters Map, if the named parameter exists.
Parameter values may also be specified in the resourceSection element.
Parameters: xmlFile - the input file containing the string definitions Parameters: group - xml element containing the strings to be used Parameters: select - if customized elements exist for this value, use them instead of the default Parameters: configParameters - a map of parameters (name-value string pairs) which arereplaced where found in the input strings |
replaceParameters | public static String replaceParameters(String str, Map parameters)(Code) | | Returns a named string, replacing parameters with the values set.
Parameters: name - the name of the String resource required. Parameters: parameters - a map of parameters (name-value string pairs) which arereplaced where found in the input strings the requested resource |
|
|