public class RecipientRewriteTableUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
CollectionToMapping(Collection<String> map)
Convert a Collection which holds mappings to a raw mapping String
|
static Collection<String> |
getMappings(String rawMapping)
Deprecated.
Use mappingToCollection(String rawMapping)
|
static String |
getSeparator(String targetString)
Returns the character used to delineate multiple addresses.
|
static String |
getTargetString(String user,
String domain,
Map<String,String> mappings)
Returns the real recipient given a virtual username and domain.
|
static Map<String,String> |
getXMLMappings(String mapping)
Returns a Map which contains the mappings
|
static ArrayList<String> |
mappingToCollection(String rawMapping)
Convert a raw mapping String to a Collection
|
static String |
regexMap(org.apache.mailet.MailAddress address,
String targetString)
Processes regex virtual user mapping
If a mapped target string begins with the prefix regex:, it must be
formatted as regex:
|
static String |
replaceParameters(String str,
Map<String,String> parameters)
Returns a named string, replacing parameters with the values set.
|
public static String QUERY
public static String regexMap(org.apache.mailet.MailAddress address, String targetString)
address
- the MailAddress to be mappedtargetString
- a String specifying the mappingMalformedPatternException
public static String replaceParameters(String str, Map<String,String> parameters)
str
- the name of the String resource required.parameters
- a map of parameters (name-value string pairs) which are
replaced where found in the input stringspublic static String getTargetString(String user, String domain, Map<String,String> mappings)
user
- the virtual userdomain
- the virtual domainnull
if no mapping
existspublic static String getSeparator(String targetString)
targetString
- the string to parsepublic static Map<String,String> getXMLMappings(String mapping)
mapping
- A String which contains a list of mappingspublic static Collection<String> getMappings(String rawMapping)
rawMapping
- public static ArrayList<String> mappingToCollection(String rawMapping)
rawMapping
- the mapping Stringpublic static String CollectionToMapping(Collection<String> map)
map
- the CollectionCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.