Google

Cocoon API: Class LdapProcessor

org.apache.cocoon.processor.ldap
Class LdapProcessor

java.lang.Object
  |
  +--org.apache.cocoon.framework.AbstractActor
        |
        +--org.apache.cocoon.processor.ldap.LdapProcessor
All Implemented Interfaces:
Actor, Changeable, Processor, Status

public class LdapProcessor
extends AbstractActor
implements Processor, Status

A processor that performs Ldap queries
XML file format:


<?cocoon-process type="ldap"?>
<?cocoon-process type="xslt"?>

<page>

 <ldap-defs>
  <ldap-server name="searchlight">
   <initializer>com.sun.jndi.ldap.LdapCtxFactory</initializer>
   <ldap-serverurl>ldap://dir.skyway.nsa</ldap-serverurl>
  </ldap-server>
 </ldap-defs>

 <ldap-query server="searchlight" ldap-searchbase="o=Proteus Technologies, c=US">
    uid=jmbirch
 </ldap-query>

</page>
adapted from Donald Ball's SQLProcessor code.

Version:
1.0
Author:
James Birchfield

Fields inherited from class org.apache.cocoon.framework.AbstractActor
director
 
Constructor Summary
LdapProcessor()
           
 
Method Summary
 java.lang.String getStatus()
          Returns information about the status of the implementing class.
 boolean hasChanged(java.lang.Object o)
          Returns false if the requested resource hasn't changed, true otherwise.
 org.w3c.dom.Document process(org.w3c.dom.Document doc, java.util.Dictionary parameters)
          Process the DOM tree.
protected  void processQuery(org.w3c.dom.Document doc, java.util.Dictionary parameters, org.w3c.dom.Element query_element, java.util.Properties query_props, javax.naming.ldap.LdapContext ctx)
           
 
Methods inherited from class org.apache.cocoon.framework.AbstractActor
init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.framework.Actor
init
 

Constructor Detail

LdapProcessor

public LdapProcessor()
Method Detail

process

public org.w3c.dom.Document process(org.w3c.dom.Document doc,
                                    java.util.Dictionary parameters)
                             throws java.lang.Exception
Description copied from interface: Processor
Process the DOM tree. The returned tree is allowed to be either a copy or the modified input tree.
Specified by:
process in interface Processor

processQuery

protected void processQuery(org.w3c.dom.Document doc,
                            java.util.Dictionary parameters,
                            org.w3c.dom.Element query_element,
                            java.util.Properties query_props,
                            javax.naming.ldap.LdapContext ctx)
                     throws java.lang.Exception

hasChanged

public boolean hasChanged(java.lang.Object o)
Description copied from interface: Changeable
Returns false if the requested resource hasn't changed, true otherwise. This method is called by the cache system to ensure the validity of the cached response. It is the producer responsibility to provide the fastest possible implementation of this method or, whether this is not possible and the costs of the change evaluation is comparable to the production costs, to return true directly with no further delay, thus reducing the evaluation overhead to a minimum. This method is guaranteed to be called after at least a single call to any production methods getStream or getDocument. The context is the trigger of the changeable point and may differ between implementations.
Specified by:
hasChanged in interface Changeable

getStatus

public java.lang.String getStatus()
Description copied from interface: Status
Returns information about the status of the implementing class. Note: this is use instead of the usual toString() method because some of these methods are declared final in some classes in JDK 1.1.
Specified by:
getStatus in interface Status


Copyright 1999-2001 Apache Software Foundation. All Rights Reserved.