import javax.naming.OperationNotSupportedException;
import javax.naming.Reference;
import javax.naming.Referenceable;
-import javax.naming.directory.InvalidAttributesException;
import javax.naming.spi.NamingManager;
/**
* @return the object bound to name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookup(Name name)
throws NamingException {
return lookup(name, true);
* @return the object bound to name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookup(String name)
throws NamingException {
return lookup(new CompositeName(name), true);
* @param name the name to bind; may not be empty
* @param obj the object to bind; possibly null
* @exception NameAlreadyBoundException if name is already bound
- * @exception InvalidAttributesException if object did not supply all
- * mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if object
+ * did not supply all mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void bind(Name name, Object obj)
throws NamingException {
bind(name, obj, false);
* @param name the name to bind; may not be empty
* @param obj the object to bind; possibly null
* @exception NameAlreadyBoundException if name is already bound
- * @exception InvalidAttributesException if object did not supply all
- * mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if object
+ * did not supply all mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void bind(String name, Object obj)
throws NamingException {
bind(new CompositeName(name), obj);
*
* @param name the name to bind; may not be empty
* @param obj the object to bind; possibly null
- * @exception InvalidAttributesException if object did not supply all
- * mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if object
+ * did not supply all mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rebind(Name name, Object obj)
throws NamingException {
bind(name, obj, true);
*
* @param name the name to bind; may not be empty
* @param obj the object to bind; possibly null
- * @exception InvalidAttributesException if object did not supply all
- * mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if object
+ * did not supply all mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rebind(String name, Object obj)
throws NamingException {
rebind(new CompositeName(name), obj);
* exist
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void unbind(Name name)
throws NamingException {
checkWritable();
* exist
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void unbind(String name)
throws NamingException {
unbind(new CompositeName(name));
* @exception NameAlreadyBoundException if newName is already bound
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rename(Name oldName, Name newName)
throws NamingException {
Object value = lookup(oldName);
* @exception NameAlreadyBoundException if newName is already bound
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rename(String oldName, String newName)
throws NamingException {
rename(new CompositeName(oldName), new CompositeName(newName));
* this context. Each element of the enumeration is of type NameClassPair.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<NameClassPair> list(Name name)
throws NamingException {
// Removing empty parts
* this context. Each element of the enumeration is of type NameClassPair.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<NameClassPair> list(String name)
throws NamingException {
return list(new CompositeName(name));
* Each element of the enumeration is of type Binding.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<Binding> listBindings(Name name)
throws NamingException {
// Removing empty parts
* Each element of the enumeration is of type Binding.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<Binding> listBindings(String name)
throws NamingException {
return listBindings(new CompositeName(name));
* @exception NotContextException if the name is bound but does not name
* a context, or does not name a context of the appropriate type
*/
+ @Override
public void destroySubcontext(Name name)
throws NamingException {
* @exception NotContextException if the name is bound but does not name
* a context, or does not name a context of the appropriate type
*/
+ @Override
public void destroySubcontext(String name)
throws NamingException {
destroySubcontext(new CompositeName(name));
* @param name the name of the context to create; may not be empty
* @return the newly created context
* @exception NameAlreadyBoundException if name is already bound
- * @exception InvalidAttributesException if creation of the subcontext
- * requires specification of mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if creation
+ * of the sub-context requires specification of mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Context createSubcontext(Name name)
throws NamingException {
checkWritable();
* @param name the name of the context to create; may not be empty
* @return the newly created context
* @exception NameAlreadyBoundException if name is already bound
- * @exception InvalidAttributesException if creation of the subcontext
- * requires specification of mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if creation
+ * of the sub-context requires specification of mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Context createSubcontext(String name)
throws NamingException {
return createSubcontext(new CompositeName(name));
* (if any).
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookupLink(Name name)
throws NamingException {
return lookup(name, false);
* (if any).
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookupLink(String name)
throws NamingException {
return lookup(new CompositeName(name), false);
* components
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NameParser getNameParser(Name name)
throws NamingException {
* components
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NameParser getNameParser(String name)
throws NamingException {
return getNameParser(new CompositeName(name));
* @return the composition of prefix and name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Name composeName(Name name, Name prefix)
throws NamingException {
prefix = (Name) prefix.clone();
* @return the composition of prefix and name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public String composeName(String name, String prefix)
throws NamingException {
return prefix + "/" + name;
* @param propVal the value of the property to add; may not be null
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object addToEnvironment(String propName, Object propVal)
throws NamingException {
return env.put(propName, propVal);
* may not be null
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object removeFromEnvironment(String propName)
throws NamingException {
return env.remove(propName);
* @return the environment of this context; never null
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Hashtable<?,?> getEnvironment()
throws NamingException {
return env;
*
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void close()
throws NamingException {
env.clear();
* not have the notion of a full name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public String getNameInNamespace()
throws NamingException {
throw new OperationNotSupportedException
* @param obj the object to bind; possibly null
* @param rebind if true, then perform a rebind (ie, overwrite)
* @exception NameAlreadyBoundException if name is already bound
- * @exception InvalidAttributesException if object did not supply all
- * mandatory attributes
+ * @exception javax.naming.directory.InvalidAttributesException if object
+ * did not supply all mandatory attributes
* @exception NamingException if a naming exception is encountered
*/
protected void bind(Name name, Object obj, boolean rebind)