All Packages Class Hierarchy This Package Previous Next Index
Class java.naming.directory.InitialDSContext
java.lang.Object
|
+----java.naming.InitialContext
|
+----java.naming.directory.InitialDSContext
- public class InitialDSContext
- extends InitialContext
- implements DSContext
The InitialDSContext is the starting point for performing
directory operations.
- See Also:
- InitialContext
-
defaultInitDSCtx
-
-
InitialDSContext()
- Constructs an initial DSContext.
-
InitialDSContext(Properties)
- Constructs an initial DSContext using information supplied in
'environment'.
-
bind(Name, Object, AttributeSet)
- Binds 'name' to the object 'obj' and associate the attributes 'attrs'
with the named object.
-
bind(String, Object, AttributeSet)
- Binds 'name' to the object 'obj' and associate the attributes 'attrs'
with the named object.
-
createSubcontext(Name, AttributeSet)
- Creates a new subcontext with the given name resolved
relative to the initial context, and associates the attributes 'attrs'
with the named object.
-
createSubcontext(String, AttributeSet)
- Creates a new subcontext with the given name resolved
relative to the initial context, and associates the attributes 'attrs'
with the named object.
-
getAttributes(Name)
- Retrieves all the attributes associated with named object.
-
getAttributes(Name, String[])
- Retrieves the attributes listed in attrIds associated with named object.
-
getAttributes(String)
- Retrieves all the attributes associated with named object.
-
getAttributes(String, String[])
- Retrieves the attributes listed in attrIds associated with named object.
-
getSchema(Name)
- Retrieves the schema associated with this initial DSContext.
-
getSchema(String)
- Retrieves the schema associated with this initial DSContext.
-
getSchemaClassDefinition(Name)
- Retrieves the schema class definition associated with this initial context.
-
getSchemaClassDefinition(String)
- Retrieves the schema class definition associated with this initial context.
-
modifyAttributes(Name, int, AttributeSet)
- Modifies according to mod_op and attrs the attributes associated with
the named object.
-
modifyAttributes(Name, ModificationEnumeration)
- Modifies according to mods the attributes associated with
the named object.
-
modifyAttributes(String, int, AttributeSet)
- Modifies according to mod_op and attrs the attributes associated with
the named object.
-
modifyAttributes(String, ModificationEnumeration)
- Modifies according to mods the attributes associated with
the named object.
-
rebind(Name, Object, AttributeSet)
- Binds 'name' to the object 'obj' and associates the attributes
'attrs' with the named object.
-
rebind(String, Object, AttributeSet)
- Binds 'name' to the object 'obj' and associates the attributes
'attrs' with the named object.
-
search(Name, AttributeSet)
-
Searches for named objects that contain a set of attributes
in a single context.
-
search(Name, AttributeSet, String[])
-
Searches for named objects that contain a set of attributes
in a single context.
-
search(Name, String, Object[], SearchConstraints)
- Search in the context named by 'name' entries with
that satisfies the given 'filter'.
-
search(Name, String, SearchConstraints)
- Search in the context named by 'name' entries with
that satisfies the given string 'filter'.
-
search(String, AttributeSet)
-
Searches for named objects that contain a set of attributes
in a single context.
-
search(String, AttributeSet, String[])
-
Searches for named objects that contain a set of attributes
in a single context.
-
search(String, String, Object[], SearchConstraints)
- Search in the context named by 'name' entries with
that satisfies the given 'filter'.
-
search(String, String, SearchConstraints)
- Search in the context named by 'name' entries with
that satisfies the given string 'filter'.
defaultInitDSCtx
protected DSContext defaultInitDSCtx
InitialDSContext
public InitialDSContext()
- Constructs an initial DSContext.
InitialDSContext
public InitialDSContext(Properties environment)
- Constructs an initial DSContext using information supplied in
'environment'.
- Parameters:
- environment - Environment properties that may be used in the
construction of the initial DSContext
(such as user name, password, etc.)
getAttributes
public AttributeSet getAttributes(String name) throws NamingException
- Retrieves all the attributes associated with named object.
- Parameters:
- name - The string name of the object for which to retrieve the attributes. name is resolved relative to the initial context.
- Returns:
- The attributes associated with 'name'.
getAttributes
public AttributeSet getAttributes(String name,
String attrIds[]) throws NamingException
- Retrieves the attributes listed in attrIds associated with named object.
- Parameters:
- name - The string name of the object for which to retrieve the attributes. name is resolved relative to the initial context.
- attrIds - The attribute ids of the attributes to retrieve.
- Returns:
- The attributes identified by attrIds (or a subset thereof if
some attributes are not found).
getAttributes
public AttributeSet getAttributes(Name name) throws NamingException
- Retrieves all the attributes associated with named object.
- Parameters:
- name - The name of the object for which to retrieve the attributes.
name is resolved relative to the initial context.
- Returns:
- The attributes associated with 'name'.
getAttributes
public AttributeSet getAttributes(Name name,
String attrIds[]) throws NamingException
- Retrieves the attributes listed in attrIds associated with named object.
- Parameters:
- name - The name of the object for which to retrieve the attributes.
name is resolved relative to the initial context.
- attrIds - The attribute ids of the attributes to retrieve.
- Returns:
- The attributes identified by attrIds (or a subset thereof if
some attributes are not found).
modifyAttributes
public void modifyAttributes(String name,
int mod_op,
AttributeSet attrs) throws NamingException
- Modifies according to mod_op and attrs the attributes associated with
the named object. The order of the modifications within attrs
are not specified. Where possible, the modifications are performed
atomically. If the operation fails to complete,
AttributeModification is thrown containing details of the failure.
- Parameters:
- name - The string name of the object whose attributes will be updated. name is resolved relative to the initial context.
- mod_op - The modification operation.
It is one of ADD_ATTRIBUTE, REPLACE_ATTRIBUTE,
DELETE_ATTRIBUTE.
- attrs - The attributes to use for the modification.
modifyAttributes
public void modifyAttributes(Name name,
int mod_op,
AttributeSet attrs) throws NamingException
- Modifies according to mod_op and attrs the attributes associated with
the named object. The order of the modifications within attrs
are not specified. Where possible, the modifications are performed
atomically. If the operation fails to complete,
AttributeModification is thrown containing details of the failure.
- Parameters:
- name - The name of the object whose attributes will be updated. name is resolved relative to the initial context.
- attrs - The attributes to use for the modification.
- mod_op - The modification code.
modifyAttributes
public void modifyAttributes(String name,
ModificationEnumeration mods) throws NamingException
- Modifies according to mods the attributes associated with
the named object.
Where possible, the modifications are performed
atomically. If the operation fails to complete,
AttributeModification is thrown containing details of the failure.
- Parameters:
- name - The string name of the object whose attributes will be updated. name is resolved relative to the initial context.
- mods - The list of modifications to apply.
modifyAttributes
public void modifyAttributes(Name name,
ModificationEnumeration mods) throws NamingException
- Modifies according to mods the attributes associated with
the named object.
Where possible, the modifications are performed
atomically. If the operation fails to complete,
AttributeModification is thrown containing details of the failure.
- Parameters:
- name - The name of the object whose attributes will be updated. name is resolved relative to the initial context.
- mods - The list of modifications to apply.
bind
public void bind(String name,
Object obj,
AttributeSet attrs) throws NamingException
- Binds 'name' to the object 'obj' and associate the attributes 'attrs'
with the named object. If 'attrs' is null, the resulting binding
will have the attributes associated with 'obj' if 'obj' is a
DSContext. If 'obj' is not a DSContext and 'attrs' is null,
the resulting binding will have no attributes.
If 'attrs' is non-null, the resulting binding will have 'attrs'
as its attributes and any attributes associated with 'obj'
are ignored.
- Parameters:
- name - The name to bind, resolved relative to the initial
context. It cannot be empty.
- obj - The object to bind.
- attrs - The attributes to associate with the bound object.
- Throws: NameAlreadyBoundException
- If name is already bound.
- Throws: InvalidAttributeSetException
- If the attributes specified
by 'attrs', or 'obj' if 'attrs' is null, are not sufficient
to create the binding.
bind
public void bind(Name name,
Object obj,
AttributeSet attrs) throws NamingException
- Binds 'name' to the object 'obj' and associate the attributes 'attrs'
with the named object. If 'attrs' is null, the resulting binding
will have the attributes associated with 'obj' if 'obj' is a
DSContext. If 'obj' is not a DSContext and 'attrs' is null,
the resulting binding will have no attributes.
If 'attrs' is non-null, the resulting binding will have 'attrs'
as its attributes and any attributes associated with 'obj'
are ignored.
- Parameters:
- name - The name to bind, resolved relative to the initial
context. It cannot be empty.
- obj - The object to bind.
- attrs - The attributes to associate with the bound object.
- Throws: NameAlreadyBoundException
- If name is already bound.
- Throws: InvalidAttributeSetException
- If the attributes specified
by 'attrs', or 'obj' if 'attrs' is null, are not sufficient
to create the binding.
rebind
public void rebind(String name,
Object obj,
AttributeSet attrs) throws NamingException
- Binds 'name' to the object 'obj' and associates the attributes
'attrs' with the named object.
If 'name' is already bound, 'obj' overwrites the existing binding.
If 'attrs' is null and 'obj' is a DSContext,
the attributes from 'obj' are used.
If 'attrs' is null and 'obj' is not a DSContext,
any existing attributes associated with the already bound object
remain unchanged.
If 'attrs' is non-null, any existing attributes associated with
the already bound object are removed and 'attrs' is associated
with the named object. If 'obj' is a DSContext and 'attrs' is
non-null, obj's attributes are ignored.
- Parameters:
- name - The name to bind, resolved relative to the initial context.
- obj - The object to bind.
- attrs - The attributes to associate with the bound object.
rebind
public void rebind(Name name,
Object obj,
AttributeSet attrs) throws NamingException
- Binds 'name' to the object 'obj' and associates the attributes
'attrs' with the named object.
If 'name' is already bound, 'obj' overwrites the existing binding.
If 'attrs' is null and 'obj' is a DSContext,
the attributes from 'obj' are used.
If 'attrs' is null and 'obj' is not a DSContext,
any existing attributes associated with the already bound object
remain unchanged.
If 'attrs' is non-null, any existing attributes associated with
the already bound object are removed and 'attrs' is associated
with the named object. If 'obj' is a DSContext and 'attrs' is
non-null, obj's attributes are ignored.
- Parameters:
- name - The name to bind, resolved relative to the initial context.
- obj - The object to bind.
- attrs - The attributes to associate with the bound object.
createSubcontext
public DSContext createSubcontext(String name,
AttributeSet attrs) throws NamingException
- Creates a new subcontext with the given name resolved
relative to the initial context, and associates the attributes 'attrs'
with the named object.
If 'name' is already bound, throws NameAlreadyBoundException.
- Parameters:
- name - The string name to use when creating the new context.
name is resolved relative to the initial context.
- attrs - The attributes to associate with the newly created context.
- Returns:
- The newly created context.
- Throws: NameAlreadyBoundException
- name is already bound.
- Throws: InvalidAttributeSetException
- If 'attrs' does not
contain all the mandatory attributes required for creation.
createSubcontext
public DSContext createSubcontext(Name name,
AttributeSet attrs) throws NamingException
- Creates a new subcontext with the given name resolved
relative to the initial context, and associates the attributes 'attrs'
with the named object.
- Parameters:
- name - The name to use when creating the new context.
name is resolved relative to the initial context.
- attrs - The attributes to associate with the newly created context.
- Returns:
- The newly created context.
- Throws: NameAlreadyBoundException
- If name is already bound.
- Throws: InvalidAttributeSetException
- If 'attrs' does not
contain all the mandatory attributes required for creation.
getSchema
public DSContext getSchema(String name) throws NamingException
- Retrieves the schema associated with this initial DSContext.
- Parameters:
- name - name of context.
- Returns:
- The schema associated with this initial DSContext.
getSchema
public DSContext getSchema(Name name) throws NamingException
- Retrieves the schema associated with this initial DSContext.
- Parameters:
- name - name of context.
- Returns:
- The schema associated with this initial DSContext.
getSchemaClassDefinition
public DSContext getSchemaClassDefinition(String name) throws NamingException
- Retrieves the schema class definition associated with this initial context.
- Returns:
- The schema class definition associated with this initial context.
getSchemaClassDefinition
public DSContext getSchemaClassDefinition(Name name) throws NamingException
- Retrieves the schema class definition associated with this initial context.
- Returns:
- The schema class definition associated with this initial context.
search
public SearchEnumeration search(String name,
AttributeSet matchingAttributes) throws NamingException
- Searches for named objects that contain a set of attributes
in a single context.
- Parameters:
- name - The string name of the context to search. name is resolved relative to the initial context.
- matchingAttributes - The attributes to search for.
- Returns:
- An enumeration of the objects that has the attributes
specified in matchingAttributes. All attributes associated
with the named object are returned.
search
public SearchEnumeration search(Name name,
AttributeSet matchingAttributes) throws NamingException
- Searches for named objects that contain a set of attributes
in a single context.
- Parameters:
- name - The name of the context to search. name is resolved relative to the initial context.
- matchingAttributes - The attributes to search for.
- Returns:
- An enumeration of the objects that has the attributes
specified in matchingAttributes. All attributes associated
with the named object are returned.
search
public SearchEnumeration search(String name,
AttributeSet matchingAttributes,
String attributesToReturn[]) throws NamingException
- Searches for named objects that contain a set of attributes
in a single context.
- Parameters:
- name - The name of the context to search. name is resolved relative to the initial context.
- matchingAttributes - The attributes to search for.
- attributesToReturn - The attributes to return.
- Returns:
- An enumeration of the objects that has the attributes
specified in matchingAttributes. Each item in the enumeration
contain the attributes identified by attributesToReturn.
search
public SearchEnumeration search(Name name,
AttributeSet matchingAttributes,
String attributesToReturn[]) throws NamingException
- Searches for named objects that contain a set of attributes
in a single context.
- Parameters:
- name - The name of the context to search. name is resolved relative to the initial context.
- matchingAttributes - The attributes to search for.
- attributesToReturn - The attributes to return.
- Returns:
- An enumeration of the objects that has the attributes
specified in matchingAttributes. Each item in the enumeration
contain the attributes identified by attributesToReturn.
search
public SearchEnumeration search(String name,
String filter,
SearchConstraints cons) throws NamingException
- Search in the context named by 'name' entries with
that satisfies the given string 'filter'.
Perform the search according to parameters specified in
the search constraints 'cons'.
- Parameters:
- name - The string name of the context/object to start the search. name is resolved relative to the initial context.
- filter - The string filter to use for the search. The syntax
used for the filter is the LDAP filter syntax (RFC 1960).
- cons - The search constraints to be applied to this search.
- Returns:
- An enumeration of the objects that satifised the filter.
search
public SearchEnumeration search(Name name,
String filter,
SearchConstraints cons) throws NamingException
- Search in the context named by 'name' entries with
that satisfies the given string 'filter'.
Perform the search according to parameters specified in
the search constraints 'cons'.
- Parameters:
- name - The name of the context/object to start the search. name is resolved relative to the initial context.
- filter - The string filter to use for the search. The syntax
used for the filter is the LDAP filter syntax (RFC 1960).
- cons - The search constraints to be applied to this search.
- Returns:
- An enumeration of the objects that satifised the filter.
search
public SearchEnumeration search(String name,
String filterExpr,
Object filterArgs[],
SearchConstraints cons) throws NamingException
- Search in the context named by 'name' entries with
that satisfies the given 'filter'.
Perform the search according to parameters specified in
the search constraints 'cons'.
- Parameters:
- name - The string name of the context/object to start the search. name is resolved relative to the initial context.
- filter - The filter to use for the search.
- cons - The search constraints to be applied to this search.
- Returns:
- An enumeration of the objects that satifised the filter.
search
public SearchEnumeration search(Name name,
String filterExpr,
Object filterArgs[],
SearchConstraints cons) throws NamingException
- Search in the context named by 'name' entries with
that satisfies the given 'filter'.
Perform the search according to parameters specified in
the search constraints 'cons'.
- Parameters:
- name - The name of the context/object to start the search. name is resolved relative to the initial context.
- filter - The filter to use for the search.
- cons - The search constraints to be applied to this search.
- Returns:
- An enumeration of the objects that satifised the filter.
All Packages Class Hierarchy This Package Previous Next Index