|
OracleVirtual Directory Java API Reference 11g Release 1 (11.1.1) E10688-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.octetstring.vde.backend.AdapterServiceInterface
public class AdapterServiceInterface
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 |
---|
public static final java.lang.String VDE_ALL_ATTRIBUTES
public static final DirectoryString DN
public static final DirectoryString ATTR_ALL
public static final DirectoryString ATTR_NONE
public static final OctetString OC_PRESENT
public static final DirectoryString OBJECTCLASS
Method Detail |
---|
public void reload(com.octetstring.vde.router.RoutingHandler routing, com.octetstring.vde.backend.BackendHandler handler)
public void setEntryChangesListeners(java.util.List<? extends EntryChangesListener> ecl)
public java.util.Vector<EntryChangesListener> getEntryChangesListeners()
public static AdapterServiceInterface getInstance()
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.AdapterServiceInterface
instancepublic static void init()
public static void reset()
public Int8 add(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, Entry entry) throws DirectoryException, ChainException
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
.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
object containing the credentials of the user performing the add request.entry
- an Entry
objectInt8
LDAPResult valueDirectoryException
ChainException
public Int8 add(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, Entry entry) throws DirectoryException, ChainException
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
.request
- a HashMap
containing the transaction contextual informationadapterName
- 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
objectInt8
LDAPResult valueDirectoryException
ChainException
public boolean bind(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString dn, BinarySyntax password) throws DirectoryException, ChainException
bind
method passes a DN and Password to the appropriate adapter to complete a bind.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
object containing the current user contextdn
- a DirectoryString
value representing the subject DN of the user to bind.password
- a BinarySyntax
value representing the subject password.boolean
value, true if bind is successfulDirectoryException
ChainException
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
bind
method passes a DN and Password to a specific adapter adapter to complete a bind.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
object containing the current subjectadapterName
- a String
containing the adapter name to authenticate todn
- a DirectoryString
value representing the subject DN of the user to bind.password
- a BinarySyntax
value representing the subject password.boolean
value, true if bind is successfulDirectoryException
ChainException
public Int8 delete(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString name) throws DirectoryException, ChainException
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
.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
object representing the subject performing the operation.name
- a DirectoryString
value with the DN to delete.Int8
LDAPResult value.DirectoryException
ChainException
public Int8 delete(java.util.HashMap<java.lang.Object,java.lang.Object> request, java.lang.String adapterName, Credentials creds, DirectoryString name) throws DirectoryException, ChainException
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
.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
object representing the subject performing the operation.name
- a DirectoryString
value with the DN to delete.Int8
LDAPResult value.DirectoryException
ChainException
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
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.request
- a HashMap
containing the transaction contextual informationcreds
- 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.Vector
containing ChainEntrySet elements which are results from selected adapters.DirectoryException
- if an error occursChainException
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
getByAdapter
by adapter method works in similar function to the get method except that it allows specific selection of the target adapter.request
- a HashMap
containing the transaction contextual informationadapterName
- a String
value containing the adapter namecreds
- 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.Vector
containing ChainEntrySet elements which are results from selected adapters.DirectoryException
- if an error occursChainException
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
DirectoryException
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.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
value representing the subject making the requestnormalizedDN
- a DirectoryString
value representing the DN of the entry to be returned.Entry
value representing the entry returned.DirectoryException
- if an error occursChainException
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.request
- a HashMap
containing the transaction contextual informationadapterName
- a String
value containing the adapter numbercreds
- a Credentials
value representing the subject making the requestnormalizedDN
- a DirectoryString
value representing the DN of the entry to be returned.Entry
value representing the entry returned.DirectoryException
- if an error occursChainException
public void modify(java.util.HashMap<java.lang.Object,java.lang.Object> request, Credentials creds, DirectoryString name, java.util.Vector<EntryChange> changeEntries) throws DirectoryException
modify
method checks access control, schema, and finds an appropriate adapter to submit requested changes to. On success, also publishes to any change listeners.request
- a HashMap
containing the transaction contextual informationcreds
- 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.DirectoryException
- if an error occurspublic 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
modify
by adapter method checks access control, schema, and submits requested changes to selected adapter. On success, also publishes to any change listeners.request
- a HashMap
containing the transaction contextual informationadapterName
- a String
value containing the adapter numbercreds
- 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.DirectoryException
- if an error occurspublic 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.request
- a HashMap
containing the transaction contextual informationcreds
- a Credentials
value representing the subject making the change.oldName
- a DirectoryString
value representing the old DNnewName
- a DirectoryString
value representing the new RDNnewSuffix
- a DirectoryString
value representing the new DN suffix.removeOldRDN
- a boolean
value indicating whether the old rdnvalue is to be removed.Int8
value representing the LDAPResult code.DirectoryException
- if an error occursChainException
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.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 DNnewName
- a DirectoryString
value representing the new RDNnewSuffix
- a DirectoryString
value representing the new DN suffix.removeOldRDN
- a boolean
value indicating whether the old rdnvalue is to be removed.Int8
value representing the LDAPResult code.DirectoryException
- if an error occursChainException
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.request
- a HashMap
containing the transaction contextual informationadapNumFrom
- 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 DNnewName
- a DirectoryString
value representing the new RDNnewSuffix
- a DirectoryString
value representing the new DN suffix.removeOldRDN
- a boolean
value indicating whether the old rdnvalue is to be removed.Int8
value representing the LDAPResult code.DirectoryException
- if an error occursChainException
- if an exception occurs within the plug-in chainspublic boolean simpleBind(java.util.HashMap<java.lang.Object,java.lang.Object> request, DirectoryString dn, BinarySyntax password, Credentials creds, Adapter adapter)
public boolean simpleBind(java.util.HashMap<java.lang.Object,java.lang.Object> request, DirectoryString dn, BinarySyntax password, Credentials creds)
|
OracleVirtual Directory Java API Reference 11g Release 1 (11.1.1) E10688-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |