CAMEL-10491 - Spring-LDAP - Updated component documentation
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/23c7dc46 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/23c7dc46 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/23c7dc46 Branch: refs/heads/master Commit: 23c7dc4663a4e7d4aa3cdd98c5951237139a36c8 Parents: 8ab374b Author: Thakker <thak...@ad.vzwcorp.com> Authored: Mon Nov 21 11:03:01 2016 -0500 Committer: Claus Ibsen <davscl...@apache.org> Committed: Tue Nov 22 09:47:26 2016 +0100 ---------------------------------------------------------------------- .../src/main/docs/spring-ldap-component.adoc | 34 +++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/23c7dc46/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc b/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc index 562bb52..d7a18a2 100644 --- a/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc +++ b/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc @@ -46,7 +46,7 @@ The Spring LDAP component has no options. // endpoint options: START -The Spring LDAP component supports 4 endpoint options which are listed below: +The Spring LDAP component supports 7 endpoint options which are listed below: {% raw %} [width="100%",cols="2,1,1m,1m,5",options="header"] @@ -68,12 +68,12 @@ Usage The component supports producer endpoint only. An attempt to create a consumer endpoint will result in an `UnsupportedOperationException`. + The body of the message must be a map (an instance of `java.util.Map`). -This map must contain at least an entry with the key *`dn`* that +This map must contain at least an entry with the key *`dn`* (not needed for function_driven operation) that specifies the root node for the LDAP operation to be performed. Other entries of the map are operation-specific (see below). The body of the message remains unchanged for the `bind` and `unbind` -operations. For the `search` operation, the body is set to the result of +operations. For the `search` and `function_driven` operations, the body is set to the result of the search, see http://static.springsource.org/spring-ldap/site/apidocs/org/springframework/ldap/core/LdapTemplate.html#search%28java.lang.String,%20java.lang.String,%20int,%20org.springframework.ldap.core.AttributesMapper%29[http://static.springsource.org/spring-ldap/site/apidocs/org/springframework/ldap/core/LdapTemplate.html#search%28java.lang.String,%20java.lang.String,%20int,%20org.springframework.ldap.core.AttributesMapper%29]. @@ -82,7 +82,7 @@ Search ++++++ The message body must have an entry with the key *`filter`*. The value -must be a String representing a valid LDAP filter, see +must be a `String` representing a valid LDAP filter, see http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare[http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare]. [[SpringLDAP-Bind]] @@ -101,6 +101,28 @@ Unbind No further entries necessary, the node with the specified *`dn`* is deleted. +[[SpringLDAP-Authenticate]] +Authenticate ++++++++++++ + +The message body must have entries with the keys *`filter`* and *`password`*. The +values must be an instance of `String` representing a valid LDAP filter and a user password, respectively. + +[[SpringLDAP-ModifyAttributes]] +Modify Attributes +++++++++++++++++ + +The message body must have an entry with the key *`modificationItems`*. The +value must be an instance of any array of type +http://docs.oracle.com/javase/6/docs/api/javax/naming/directory/ModificationItem.html[javax.naming.directory.ModificationItem] + +[[SpringLDAP-FunctionDriven]] +Function-Driven +++++++++++++++++ + +The message body must have entries with the keys *`function`* and *`request`*. The *`function`* value must be of type `org.apache.camel.component.springldap.LdapOperationsFunction<Q, S>`. The *`request`* value must be the same type as the `Q` type parameter in the *`function`* and it must encapsulate the parameters expected by the LdapTemplate method being invoked within the *`function`*. The `S` type parameter represents the response type as returned by the LdapTemplate method being invoked. +This operation allows dynamic invocation of LdapTemplate methods that are not covered by the operations mentioned above. + *Key definitions* In order to avoid spelling errors, the following constants are defined @@ -109,4 +131,8 @@ in `org.apache.camel.springldap.SpringLdapProducer`: * public static final String DN = "dn" * public static final String FILTER = "filter" * public static final String ATTRIBUTES = "attributes" +* public static final String PASSWORD = "password"; +* public static final String MODIFICATION_ITEMS = "modificationItems"; +* public static final String FUNCTION = "function"; +* public static final String REQUEST = "request";