gldapo
Class GldapoDirectoryRegistry
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap
gldapo.GldapoDirectoryRegistry
- All Implemented Interfaces:
- Serializable, Cloneable, Map
public class GldapoDirectoryRegistry
- extends LinkedHashMap
A directory registry holds instances of GldapoDirectory, retrievable by their GldapoDirectory.getName().
- See Also:
- Serialized Form
GldapoDirectoryRegistry
public GldapoDirectoryRegistry()
getDefaultDirectoryName
public String getDefaultDirectoryName()
setDefaultDirectoryName
public void setDefaultDirectoryName(String value)
getDefaultDirectory
public GldapoDirectory getDefaultDirectory()
throws GldapoNoDefaultDirectoryException,
GldapoDirectoryNotFoundException
- Returns the current default directory.
If there is only one directory in the registry, it is returned regardless. Else the registry is searched for a directory with
a name matching defaultDirectoryName.
- Returns:
- The default directory
- Throws:
GldapoNoDefaultDirectoryException - If there is more then one registered directory, and defaultDirectoryName is null.
GldapoDirectoryNotFoundException - If there is no directory registered that has a name of defaultDirectoryName
isHasDefault
public boolean isHasDefault()
get
public Object get(Object name)
- Allows the directories to be retrieved by name.
- Specified by:
get in interface Map- Overrides:
get in class LinkedHashMap
- Parameters:
name - The target directory
- Throws:
GldapoDirectoryNotFoundException - If there is no directory registered with name
put
public Object put(Object key,
Object value)
- Specified by:
put in interface Map- Overrides:
put in class HashMap
leftShift
public void leftShift(Object directory)
- Does simple type check to make sure what's being added is an instance of
GldapoDirectory
- Parameters:
directory -
getMetaClass
public MetaClass getMetaClass()
setMetaClass
public void setMetaClass(MetaClass metaClass)
invokeMethod
public Object invokeMethod(String name,
Object args)
getProperty
public Object getProperty(String name)
setProperty
public void setProperty(String name,
Object value)
Copyright © 2007-2010 Codehaus. All Rights Reserved.