apache > cocoon
 
Font size:      

LDAP Transformer (2.1 legacy document)

Warning
This document was copied as is from the Cocoon 2.1 documentation, but has not yet been fully reviewed or moved to its new home.

LDAP Transformer

The LDAPTransformer is a class that can be plugged into a pipeline to transform the SAX events which passes through this transformer into queries to an ldap interface and transforms the response to SAX events which are passed on in the pipeline.

  • Name : ldap
  • Class: org.apache.cocoon.transformation.LDAPTransformer
  • Cacheable: no.

This transformer is optional and not available in the binary distribution. However if you want to use it, you have to retrieve the jndi package, copy the jar file into the lib directory of Cocoon and rebuild.

The file will be specified in a parameter tag in the sitemap pipeline to the transformer as follows:

  <map:transform type="ldap"/>
 

The following DTD is valid:
<!ELEMENT execute-query (attribute+ | show-attribute? | scope? | initializer? | authentication? | error-element? | sax-error? doc-element? | row-element? | version? | serverurl? | rootdn? | password? | deref-link? | count-limit? | searchbase, filter)>
<!ELEMENT execute-increment (attribute | show-attribute? | scope? | initializer? | authentication? | error-element? | sax-error? | doc-element? | row-element? | version? | serverurl? | rootdn? | password? | deref-link? | count-limit? | searchbase, filter)>
increments (+1) an integer attribute on a directory-server (ldap)

<!ELEMENT initializer (#PCDATA)>* (default: "com.sun.jndi.ldap.LdapCtxFactory")
<!ELEMENT authentication (#PCDATA)>* (default: "simple")
<!ELEMENT version (#PCDATA)>* (default: "2")
<!ELEMENT serverurl (#PCDATA)>*
<!ELEMENT port (#PCDATA)>* (default: 389)
<!ELEMENT rootdn (#PCDATA)>*
<!ELEMENT password (#PCDATA)>*
<!ELEMENT scope (ONELEVEL_SCOPE | SUBTREE_SCOPE | OBJECT_SCOPE)>* (default: ONELEVEL_SCOPE)
<!ELEMENT searchbase (#PCDATA)>*
<!ELEMENT doc-element (#PCDATA)>* (default: "doc-element")
<!ELEMENT row-element (#PCDATA)>* (default: "row-element")
<!ELEMENT error-element (#PCDATA)>* (default: "ldap-error") (in case of error returned error tag)
<!ELEMENT sax_error (TRUE | FALSE)>* (default: FALSE) (throws SAX-Exception instead of error tag)
<!ELEMENT attribute (#PCDATA)>
<!ELEMENT show-attribute (TRUE | FALSE)> (default: TRUE)
<!ELEMENT filter (#PCDATA | execute-query)>
<!ELEMENT deref-link (TRUE | FALSE)> (default: FALSE)
<!ELEMENT count-limit (#PCDATA)> (integer default: 0 -> no limit)
<!ELEMENT time-limit (#PCDATA)> (integer default: 0 -> infinite)
<!ELEMENT debug (TRUE | FALSE)>* (default: FALSE)
can also be defined as parameter in the sitemap.

Comments

add your comments