Skip navigation links

OracleVirtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-02


com.octetstring.vde.backend
Class AdapterServiceInterface

java.lang.Object
  extended by com.octetstring.vde.backend.AdapterServiceInterface

All Implemented Interfaces:
com.octetstring.vde.Singleton

public class AdapterServiceInterface
extends java.lang.Object
implements com.octetstring.vde.Singleton

The AdapterServiceInterface (ASI) is responsible for handling actual calls into VDE's backend adapters. It handles all the base directory methods (add, bind delete, get, modify, and rename). All operations performed by this module are subject to the directories access control mechanisms. Typically, this module is used by VDE's BackendHandler, Custom Plugins, and JoinView custom Joiners.


Field Summary
static DirectoryString ATTR_ALL
           
static DirectoryString ATTR_NONE
           
static DirectoryString DN
           
static DirectoryString OBJECTCLASS
           
static OctetString OC_PRESENT
           
static java.lang.String VDE_ALL_ATTRIBUTES
           

 

Method Summary
 Int8 add(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, Entry entry)
          The add method checks schema, performs access control, locates an appropriate adapter for the change, and submits the add request to that backend adapter.
 Int8 add(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, Entry entry)
          The add method checks schema, performs access control, locates an appropriate adapter for the change, and submits the add request to that backend adapter.
 boolean bind(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString dn, BinarySyntax password)
          The bind method passes a DN and Password to the appropriate adapter to complete a bind.
 boolean bindBy(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, java.lang.String adapterName, DirectoryString dn, BinarySyntax password)
          The bind method passes a DN and Password to a specific adapter adapter to complete a bind.
 Int8 delete(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString name)
          The delete method checks access control to validate operation request, locates an appropriate adapter, and passes a delete entry request to that adapter.
 Int8 delete(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, DirectoryString name)
          The delete by adapter method checks access control to validate operation request, using the selected adapter passes a delete entry request to that adapter.
 java.util.Vector<EntrySet> get(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString base, int scope, Filter filter, boolean typesOnly, java.util.Vector<DirectoryString> attributes, java.util.Vector<EntrySet> results)
          The get method finds the appropriate adapters to perform searches against and passes the query to qualifying adapters and collects the results.
 ChainEntrySet getByAdapter(java.util.HashMap<java.lang.Object,java.lang.Object> request, Adapter adapter, Credentials creds, DirectoryString base, int scope, Filter filter, boolean typesOnly, java.util.Vector<DirectoryString> attributes)
           
 ChainEntrySet getByAdapter(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, DirectoryString base, int scope, Filter filter, boolean typesOnly, java.util.Vector<DirectoryString> attributes)
          The getByAdapter by adapter method works in similar function to the get method except that it allows specific selection of the target adapter.
 Entry getByDN(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString normalizedDN)
          getByDN retrieves an entry by name from the most appropriate adapter.
 Entry getByDN(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, DirectoryString normalizedDN)
          getByDN by adapter retrieves an entry by name from the adapter specified.
 java.util.Vector<EntryChangesListener> getEntryChangesListeners()
           
static AdapterServiceInterface getInstance()
          The getInstance method returns an instance of the AdapterServiceInterface class.
static void init()
          This is used to by BackendHandler to instantiate the ASI the first time it is started.
 void modify(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString name, java.util.Vector<EntryChange> changeEntries)
          The modify method checks access control, schema, and finds an appropriate adapter to submit requested changes to.
 void modify(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, DirectoryString name, java.util.Vector<EntryChange> changeEntries)
          The modify by adapter method checks access control, schema, and submits requested changes to selected adapter.
 void reload(com.octetstring.vde.router.RoutingHandler routing, com.octetstring.vde.backend.BackendHandler handler)
           
 Int8 rename(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString oldName, DirectoryString newName, DirectoryString newSuffix, boolean removeOldRDN)
          rename: Checks access control, finds the appropriate adapter or adapters and either does the rename by calling add/delete on two adapters or passing a rename request to a single adapter.
 Int8 rename(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapNumFrom, java.lang.String adapNumTo, Credentials creds, DirectoryString oldName, DirectoryString newName, DirectoryString newSuffix, boolean removeOldRDN)
          rename Checks access control, finds the appropriate adapter or adapters and either does the rename by calling add/delete on two adapters or passing a rename request to a single adapter.
 Int8 renameFromAdapter(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapNum, Credentials creds, DirectoryString oldName, DirectoryString newName, DirectoryString newSuffix, boolean removeOldRDN)
          renameFromAdapter: Checks access control, finds the appropriate adapter to locate the original entry and automatically selects a target adapter.
static void reset()
           
 void setEntryChangesListeners(java.util.List<? extends EntryChangesListener> ecl)
           
 boolean simpleBind(java.util.HashMap<java.lang.Object,java.lang.Object> request, DirectoryString dn, BinarySyntax password, Credentials creds)
           
 boolean simpleBind(java.util.HashMap<java.lang.Object,java.lang.Object> request, DirectoryString dn, BinarySyntax password, Credentials creds, Adapter adapter)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

VDE_ALL_ATTRIBUTES

public static final java.lang.String VDE_ALL_ATTRIBUTES
See Also:
Constant Field Values

DN

public static final DirectoryString DN

ATTR_ALL

public static final DirectoryString ATTR_ALL

ATTR_NONE

public static final DirectoryString ATTR_NONE

OC_PRESENT

public static final OctetString OC_PRESENT

OBJECTCLASS

public static final DirectoryString OBJECTCLASS

Method Detail

reload

public void reload(com.octetstring.vde.router.RoutingHandler routing,
                   com.octetstring.vde.backend.BackendHandler handler)

setEntryChangesListeners

public void setEntryChangesListeners(java.util.List<? extends EntryChangesListener> ecl)

getEntryChangesListeners

public java.util.Vector<EntryChangesListener> getEntryChangesListeners()
Returns:
Vector containing list of registered entry change listeners.

getInstance

public static AdapterServiceInterface getInstance()
The getInstance method returns an instance of the AdapterServiceInterface class. Since this class is designed using a Singleton pattern, only one instance of this class will ever exist.
Returns:
the AdapterServiceInterface instance

init

public static void init()
This is used to by BackendHandler to instantiate the ASI the first time it is started.

reset

public static void reset()

add

public Int8 add(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                Credentials creds,
                Entry entry)
         throws DirectoryException,
                ChainException
The add method checks schema, performs access control, locates an appropriate adapter for the change, and submits the add request to that backend adapter. On success also passes the change to any registered EntryChangeListener.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials object containing the credentials of the user performing the add request.
entry - an Entry object
Returns:
a Int8 LDAPResult value
Throws:
DirectoryException
ChainException

add

public Int8 add(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                java.lang.String adapterName,
                Credentials creds,
                Entry entry)
         throws DirectoryException,
                ChainException
The add method checks schema, performs access control, locates an appropriate adapter for the change, and submits the add request to that backend adapter. On success also passes the change to any registered EntryChangeListener.
Parameters:
request - a HashMap containing the transaction contextual information
adapterName - a String containing the name of the adapter to perform operation on.
creds - a Credentials object containing the credentials of the user performing the add request.
entry - an Entry object
Returns:
a Int8 LDAPResult value
Throws:
DirectoryException
ChainException

bind

public boolean bind(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                    Credentials creds,
                    DirectoryString dn,
                    BinarySyntax password)
             throws DirectoryException,
                    ChainException
The bind method passes a DN and Password to the appropriate adapter to complete a bind.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials object containing the current user context
dn - a DirectoryString value representing the subject DN of the user to bind.
password - a BinarySyntax value representing the subject password.
Returns:
a boolean value, true if bind is successful
Throws:
DirectoryException
ChainException

bindBy

public boolean bindBy(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                      Credentials creds,
                      java.lang.String adapterName,
                      DirectoryString dn,
                      BinarySyntax password)
               throws DirectoryException,
                      ChainException
The bind method passes a DN and Password to a specific adapter adapter to complete a bind.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials object containing the current subject
adapterName - a String containing the adapter name to authenticate to
dn - a DirectoryString value representing the subject DN of the user to bind.
password - a BinarySyntax value representing the subject password.
Returns:
a boolean value, true if bind is successful
Throws:
DirectoryException
ChainException

delete

public Int8 delete(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                   Credentials creds,
                   DirectoryString name)
            throws DirectoryException,
                   ChainException
The delete method checks access control to validate operation request, locates an appropriate adapter, and passes a delete entry request to that adapter. On success, also submits change to an EntryChangeListener.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials object representing the subject performing the operation.
name - a DirectoryString value with the DN to delete.
Returns:
a Int8 LDAPResult value.
Throws:
DirectoryException
ChainException

delete

public Int8 delete(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                   java.lang.String adapterName,
                   Credentials creds,
                   DirectoryString name)
            throws DirectoryException,
                   ChainException
The delete by adapter method checks access control to validate operation request, using the selected adapter passes a delete entry request to that adapter. On success, also submits change to an EntryChangeListener.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials object representing the subject performing the operation.
name - a DirectoryString value with the DN to delete.
Returns:
a Int8 LDAPResult value.
Throws:
DirectoryException
ChainException

get

public java.util.Vector<EntrySet> get(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                                      Credentials creds,
                                      DirectoryString base,
                                      int scope,
                                      Filter filter,
                                      boolean typesOnly,
                                      java.util.Vector<DirectoryString> attributes,
                                      java.util.Vector<EntrySet> results)
                               throws DirectoryException,
                                      ChainException
The get method finds the appropriate adapters to perform searches against and passes the query to qualifying adapters and collects the results. Adapter qualification is performed automatically by a call to the VDE Router.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials value representing the subject making the request.
base - a DirectoryString value representing the directory tree base where the query will start from.
scope - an int value representing the scope of the search: 0 for base level, 1 for one-level, and 2 for sub-tree search.
filter - a Filter value representing the search filter.
typesOnly - a boolean value indicating whether attribute values are to be returned.
attributes - a Vector containing a list of attributes (DirectoryString's) to be returned.
Returns:
a Vector containing ChainEntrySet elements which are results from selected adapters.
Throws:
DirectoryException - if an error occurs
ChainException

getByAdapter

public ChainEntrySet getByAdapter(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                                  java.lang.String adapterName,
                                  Credentials creds,
                                  DirectoryString base,
                                  int scope,
                                  Filter filter,
                                  boolean typesOnly,
                                  java.util.Vector<DirectoryString> attributes)
                           throws DirectoryException,
                                  ChainException
The getByAdapter by adapter method works in similar function to the get method except that it allows specific selection of the target adapter.
Parameters:
request - a HashMap containing the transaction contextual information
adapterName - a String value containing the adapter name
creds - a Credentials value representing the subject making the request.
base - a DirectoryString value representing the directory tree base where the query will start from.
scope - an int value representing the scope of the search: 0 for base level, 1 for one-level, and 2 for sub-tree search.
filter - a Filter value representing the search filter.
typesOnly - a boolean value indicating whether attribute values are to be returned.
attributes - a Vector containing a list of attributes (DirectoryString's) to be returned.
Returns:
a Vector containing ChainEntrySet elements which are results from selected adapters.
Throws:
DirectoryException - if an error occurs
ChainException

getByAdapter

public ChainEntrySet getByAdapter(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                                  Adapter adapter,
                                  Credentials creds,
                                  DirectoryString base,
                                  int scope,
                                  Filter filter,
                                  boolean typesOnly,
                                  java.util.Vector<DirectoryString> attributes)
                           throws DirectoryException
Throws:
DirectoryException

getByDN

public Entry getByDN(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                     Credentials creds,
                     DirectoryString normalizedDN)
              throws DirectoryException,
                     ChainException
getByDN retrieves an entry by name from the most appropriate adapter.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials value representing the subject making the request
normalizedDN - a DirectoryString value representing the DN of the entry to be returned.
Returns:
an Entry value representing the entry returned.
Throws:
DirectoryException - if an error occurs
ChainException

getByDN

public Entry getByDN(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                     java.lang.String adapterName,
                     Credentials creds,
                     DirectoryString normalizedDN)
              throws DirectoryException,
                     ChainException
getByDN by adapter retrieves an entry by name from the adapter specified.
Parameters:
request - a HashMap containing the transaction contextual information
adapterName - a String value containing the adapter number
creds - a Credentials value representing the subject making the request
normalizedDN - a DirectoryString value representing the DN of the entry to be returned.
Returns:
an Entry value representing the entry returned.
Throws:
DirectoryException - if an error occurs
ChainException

modify

public void modify(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                   Credentials creds,
                   DirectoryString name,
                   java.util.Vector<EntryChange> changeEntries)
            throws DirectoryException
The modify method checks access control, schema, and finds an appropriate adapter to submit requested changes to. On success, also publishes to any change listeners.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials value representing the subject making the change.
name - a DirectoryString value representing the DN of the entry to be changed.
changeEntries - a Vector value representing the list of changes, a Vector of com.octetstring.vde.EntryChange values.
Throws:
DirectoryException - if an error occurs

modify

public void modify(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                   java.lang.String adapterName,
                   Credentials creds,
                   DirectoryString name,
                   java.util.Vector<EntryChange> changeEntries)
            throws DirectoryException
The modify by adapter method checks access control, schema, and submits requested changes to selected adapter. On success, also publishes to any change listeners.
Parameters:
request - a HashMap containing the transaction contextual information
adapterName - a String value containing the adapter number
creds - a Credentials value representing the subject making the change.
name - a DirectoryString value representing the DN of the entry to be changed.
changeEntries - a Vector value representing the list of changes, a Vector of com.octetstring.vde.EntryChange values.
Throws:
DirectoryException - if an error occurs

rename

public Int8 rename(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                   Credentials creds,
                   DirectoryString oldName,
                   DirectoryString newName,
                   DirectoryString newSuffix,
                   boolean removeOldRDN)
            throws DirectoryException,
                   ChainException
rename: Checks access control, finds the appropriate adapter or adapters and either does the rename by calling add/delete on two adapters or passing a rename request to a single adapter.
Parameters:
request - a HashMap containing the transaction contextual information
creds - a Credentials value representing the subject making the change.
oldName - a DirectoryString value representing the old DN
newName - a DirectoryString value representing the new RDN
newSuffix - a DirectoryString value representing the new DN suffix.
removeOldRDN - a boolean value indicating whether the old rdnvalue is to be removed.
Returns:
a Int8 value representing the LDAPResult code.
Throws:
DirectoryException - if an error occurs
ChainException

renameFromAdapter

public Int8 renameFromAdapter(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                              java.lang.String adapNum,
                              Credentials creds,
                              DirectoryString oldName,
                              DirectoryString newName,
                              DirectoryString newSuffix,
                              boolean removeOldRDN)
                       throws DirectoryException,
                              ChainException
renameFromAdapter: Checks access control, finds the appropriate adapter to locate the original entry and automatically selects a target adapter.
Parameters:
request - a HashMap containing the transaction contextual information.
adapNum - a String value containing the adapter name.
creds - a Credentials value representing the subject making the change.
oldName - a DirectoryString value representing the old DN
newName - a DirectoryString value representing the new RDN
newSuffix - a DirectoryString value representing the new DN suffix.
removeOldRDN - a boolean value indicating whether the old rdnvalue is to be removed.
Returns:
a Int8 value representing the LDAPResult code.
Throws:
DirectoryException - if an error occurs
ChainException

rename

public Int8 rename(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                   java.lang.String adapNumFrom,
                   java.lang.String adapNumTo,
                   Credentials creds,
                   DirectoryString oldName,
                   DirectoryString newName,
                   DirectoryString newSuffix,
                   boolean removeOldRDN)
            throws DirectoryException,
                   ChainException
rename Checks access control, finds the appropriate adapter or adapters and either does the rename by calling add/delete on two adapters or passing a rename request to a single adapter. The parameters adapNumFrom and adapNumTo specify source and destination target adapters.
Parameters:
request - a HashMap containing the transaction contextual information
adapNumFrom - a String containing the name of the adapter to move from.
adapNumTo - a String containing the name of the adapter to move to.
creds - a Credentials value representing the subject making the change.
oldName - a DirectoryString value representing the old DN
newName - a DirectoryString value representing the new RDN
newSuffix - a DirectoryString value representing the new DN suffix.
removeOldRDN - a boolean value indicating whether the old rdnvalue is to be removed.
Returns:
a Int8 value representing the LDAPResult code.
Throws:
DirectoryException - if an error occurs
ChainException - if an exception occurs within the plug-in chains

simpleBind

public boolean simpleBind(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                          DirectoryString dn,
                          BinarySyntax password,
                          Credentials creds,
                          Adapter adapter)

simpleBind

public boolean simpleBind(java.util.HashMap<java.lang.Object,java.lang.Object> request,
                          DirectoryString dn,
                          BinarySyntax password,
                          Credentials creds)

Skip navigation links

OracleVirtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-02


Copyright © 2000-2009 Oracle. All Rights Reserved.