|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.naming.LDAPEntryManager
public class LDAPEntryManager
The LDAPEntryManager
is an Avalon Component for managing Entries in a Javax Naming Directory.
This is the LDAP implementation of the EntryManager
interface.
This is designed to be used from FlowScript, it uses Maps instead of NamingEnumerations and Attributes.
<component role="org.apache.cocoon.component.EntryManager" class="org.apache.cocoon.components.naming.LDAPEntryManager" logger="flow.ldap"> <parameter name="ldap-host" value="ldap://hostname:port"/> <parameter name="ldap-base" value="dc=example,dc=com"/> <parameter name="ldap-user" value="username"/> <parameter name="ldap-pass" value="password"/> </component>
Field Summary | |
---|---|
protected DirContext |
context
|
protected Hashtable |
environment
|
protected static String |
LDAP_BASE_PARAM
|
protected static String |
LDAP_HOST_PARAM
|
protected static String |
LDAP_PASS_PARAM
|
protected static String |
LDAP_USER_PARAM
|
Fields inherited from interface org.apache.cocoon.components.naming.EntryManager |
---|
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE, ROLE |
Constructor Summary | |
---|---|
LDAPEntryManager()
|
Method Summary | |
---|---|
void |
create(String name,
Map attributes)
Creates a new Entry |
void |
dispose()
|
Map |
find(Map attributes)
Finds Entries based on matching their Attributes |
Map |
find(String cntx,
Map attributes)
Finds Entries based on their Attributes |
Map |
get(String name)
Retrieves a named Entry's Attributes |
protected void |
initialize()
|
void |
modify(String name,
int mod_op,
Map attributes)
Modifies an existing Entry |
void |
parameterize(Parameters params)
Avalon, Parameterize this Class |
void |
recycle()
|
void |
remove(String name)
Deletes an Entry |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String LDAP_HOST_PARAM
protected static final String LDAP_USER_PARAM
protected static final String LDAP_PASS_PARAM
protected static final String LDAP_BASE_PARAM
protected DirContext context
protected Hashtable environment
Constructor Detail |
---|
public LDAPEntryManager()
Method Detail |
---|
public void parameterize(Parameters params) throws ParameterException
parameterize
in interface Parameterizable
ParameterException
public final void recycle()
recycle
in interface Recyclable
public final void dispose()
dispose
in interface Disposable
protected void initialize() throws Exception
Exception
public void create(String name, Map attributes) throws ProcessingException
create
in interface EntryManager
name
- The name of the Entry to createattributes
- The Map of Attributes to create it with
ProcessingException
public Map get(String name) throws ProcessingException
get
in interface EntryManager
name
- The name of the Entry to modify
ProcessingException
public Map find(Map attributes) throws ProcessingException
find
in interface EntryManager
attributes
- The Attributes to match
ProcessingException
public Map find(String cntx, Map attributes) throws ProcessingException
find
in interface EntryManager
cntx
- The sub-context to searchattributes
- The Attributes to match
ProcessingException
public void modify(String name, int mod_op, Map attributes) throws ProcessingException
modify
in interface EntryManager
name
- The name of the Entry to modifymod_op
- The modification mode to useattributes
- The Map of modifications
ProcessingException
public void remove(String name) throws ProcessingException
remove
in interface EntryManager
name
- The name of the Entry to delete
ProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |