public class DiscoverNamesInDictionary extends ResourceNameDiscoverImpl implements ResourceNameDiscover
Properties extends Hashtable extends Dictionary
.
The recovered value is expected to be either a String
or a String[]
.Modifier and Type | Field and Description |
---|---|
private java.util.Dictionary<java.lang.String,java.lang.String[]> |
dictionary |
private static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
DiscoverNamesInDictionary()
Construct a new resource discoverer with an empty Dictionary.
|
DiscoverNamesInDictionary(java.util.Dictionary<java.lang.String,java.lang.String[]> dictionary)
Construct a new resource discoverer with the given Dictionary.
|
Modifier and Type | Method and Description |
---|---|
void |
addResource(java.lang.String resourceName,
java.lang.String resource)
Add a resource name to a single name mapping.
|
void |
addResource(java.lang.String resourceName,
java.lang.String[] resources)
Add a resource name to multiple names mapping.
|
ResourceNameIterator |
findResourceNames(java.lang.String resourceName)
Locate names of resources that are bound to
resourceName . |
protected java.util.Dictionary<java.lang.String,java.lang.String[]> |
getDictionary()
Returns the current Dictionary for names mapping.
|
void |
setDictionary(java.util.Dictionary<java.lang.String,java.lang.String[]> table)
Specify the Dictionary for names mapping.
|
static void |
setLog(org.apache.commons.logging.Log _log)
Deprecated.
This method is not thread-safe
|
findResourceNames
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findResourceNames
private static org.apache.commons.logging.Log log
private java.util.Dictionary<java.lang.String,java.lang.String[]> dictionary
public DiscoverNamesInDictionary()
public DiscoverNamesInDictionary(java.util.Dictionary<java.lang.String,java.lang.String[]> dictionary)
dictionary
- The initial Dictionary@Deprecated public static void setLog(org.apache.commons.logging.Log _log)
Log
for this class._log
- This class Log
protected java.util.Dictionary<java.lang.String,java.lang.String[]> getDictionary()
public void setDictionary(java.util.Dictionary<java.lang.String,java.lang.String[]> table)
table
- The Dictionary for names mappingpublic void addResource(java.lang.String resourceName, java.lang.String resource)
resourceName
- The resource nameresource
- The target namepublic void addResource(java.lang.String resourceName, java.lang.String[] resources)
resourceName
- The resource nameresources
- The target namespublic ResourceNameIterator findResourceNames(java.lang.String resourceName)
resourceName
.findResourceNames
in interface ResourceNameDiscover
findResourceNames
in class ResourceNameDiscoverImpl
resourceName
- The resource name to locateResourceNameIterator