|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LDAPWorker
Defines an interface for developing LDAP access workers.
Implementations of this interface will provide functionality to interact with LDAP directories.
Method Summary | |
---|---|
java.lang.String |
add(java.lang.String entry,
java.lang.String context,
java.util.Map attrs)
Add an entry to the LDAP directory. |
java.lang.String |
getContextValue(java.lang.String mapping)
Return context value for the given context mapping. |
EntryDefinition |
getEntryDefinition(java.lang.String mapping)
Return EntryDefinition for the given entry mapping. |
java.lang.String |
getRootContext()
Return the root context of this worker. |
void |
init(java.util.Map entries,
java.util.Map contexts,
LDAPManager mngr)
Initialise this worker with the supported Map of LDAP entry definitions and contexts. |
java.util.Map |
lookup(java.lang.String entry,
java.lang.String context,
java.lang.String bindName,
java.lang.String[] attrs)
Return a single entry from the LDAP directory. |
void |
modify(java.lang.String entry,
java.lang.String context,
java.lang.String bindName,
int modType,
java.util.Map attrs)
Modify the attributes of the entry with given bind attribute value. |
void |
remove(java.lang.String entry,
java.lang.String context,
java.lang.String bindName)
Remove an entry from the LDAP directory. |
java.util.List |
search(java.lang.String entry,
java.lang.String filter,
java.lang.String context,
int scope,
java.lang.String[] attrs)
Search for entries in the LDAP directory. |
java.util.List |
search(java.lang.String entry,
java.lang.String filter,
java.lang.String context,
int scope,
java.lang.String[] attrs,
java.lang.String sortAttr,
java.lang.String sortOrder)
Search for entries in the LDAP directory and sort the results as specified. |
void |
update(java.lang.String entry,
java.lang.String context,
java.util.Map attrs)
Update an existing entry in the LDAP directory. |
Method Detail |
---|
void init(java.util.Map entries, java.util.Map contexts, LDAPManager mngr)
entries
- Map instance containing the supported LDAP entry
definitions.contexts
- Map containing the supported context's.mngr
- LDAPManager instance that created this worker.java.lang.String add(java.lang.String entry, java.lang.String context, java.util.Map attrs) throws LDAPException
entry
- String indicating the configured entry type.context
- String indicating the configured context where the
the attributes should be added to the directory.attrs
- Map containing attributes. The keys will be used as
attributes names. Multi-valued attributes must contain
a Set instance with the attribute values.
LDAPException
- if the attributes cannot be added to the directory.void update(java.lang.String entry, java.lang.String context, java.util.Map attrs) throws LDAPException
entry
- String indicating the configured entry type.context
- String indicating the configured context where the
the attributes should be added to the directory.attrs
- Map containing attributes. The keys will be used as
attributes names. Multi-valued attributes must contain
a Set instance with the attribute values.
LDAPException
- if the attributes cannot be updated in the directory.void remove(java.lang.String entry, java.lang.String context, java.lang.String bindName) throws LDAPException
entry
- String indicating the entry type to remove.context
- String containing the name of a configured context where
the entry is located.bindName
- String containing the value of the bind attribute.
LDAPException
- if the entry cannot be removed from the given
context.void modify(java.lang.String entry, java.lang.String context, java.lang.String bindName, int modType, java.util.Map attrs) throws LDAPException
entry
- String indicating the entry type.context
- String containing the name of configured context where
the entry is located.bindName
- String containing the value of the bind attribute.modType
- Primitive int indication the modification operation type.attrs
- Map containing the attributes that must be modified.
LDAPException
- if the attributes cannot be modified.java.util.Map lookup(java.lang.String entry, java.lang.String context, java.lang.String bindName, java.lang.String[] attrs) throws LDAPException
entry
- String indicating the entry type.context
- String indicating the name of the configured context
to look in.bindName
- String containing the value of the bind attribute.attrs
- String array containing the names of the attributes
that must be returned.
LDAPException
- if the attributes cannot be returned.java.util.List search(java.lang.String entry, java.lang.String filter, java.lang.String context, int scope, java.lang.String[] attrs) throws LDAPException
entry
- String containing entry type that we are searching for.filter
- String containing a valid LDAP filter.context
- String containing the name of one of the configured
contexts. May be null.scope
- Primitive int indicating the search scope.attrs
- String array containing the names of the attributes
that must be returned by the search.
LDAPException
- if the search cannot be performed.java.util.List search(java.lang.String entry, java.lang.String filter, java.lang.String context, int scope, java.lang.String[] attrs, java.lang.String sortAttr, java.lang.String sortOrder) throws LDAPException
entry
- String containing entry type that we are searching for.filter
- String containing a valid LDAP filter.context
- String containing the name of one of the configured
contexts. May be null.scope
- Primitive int indicating the search scope.attrs
- String array containing the names of the attributes
that must be returned by the search.sortAttr
- String containing the name of the attribute that must
be sorted on.sortOrder
- String indicating the sort order. Specify "asc" for
ascending order and "desc" for descending order.
LDAPException
- if the search cannot be performed.java.lang.String getContextValue(java.lang.String mapping)
mapping
- String containing the context mapping.
EntryDefinition getEntryDefinition(java.lang.String mapping)
mapping
- String containing the entry mapping.
java.lang.String getRootContext() throws LDAPException
LDAPException
- if the context cannot be returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |