...
Spring
...
LDAP
...
Component
...
Available
...
since
...
Camel
...
2.11
...
The
...
spring-ldap:
...
component
...
provides
...
a
...
Camel
...
wrapper
...
for
...
...
LDAP.
Maven users will need to add the following dependency to their pom.xml
for this component:
Code Block | ||||
---|---|---|---|---|
| ||||
|http://www.springsource.org/ldap].
Maven users will need to add the following dependency to their {{pom.xml}} for this component:
{code:xml}
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-ldap</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
|
URI format
Code Block |
---|
{code} h3. URI format {code} spring-ldap:springLdapTemplate[?options] {code} Where *springLdapTemplate* is |
Where springLdapTemplate is the name of the Spring LDAP Template bean. In this bean, you configure the URL and the credentials for your LDAP access.
Options
Wiki Markup |
---|
the name of the [Spring LDAP Template bean|http://static.springsource.org/spring-ldap/site/apidocs/org/springframework/ldap/core/LdapTemplate.html]. In this bean, you configure the URL and the credentials for your LDAP access. h3. Options {div:class=confluenceTableSmall} || Name || Type || Description || | {{operation}} | String | The LDAP operation to be performed. Must be one of {{search}}, {{bind}}, or {{unbind}}. | | {{scope}} | String | The scope of the search operation. Must be one of {{object}}, {{onelevel}}, or {{subtree}}, see also [http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare] | {div} |
If
...
an
...
unsupported
...
value
...
is
...
specified
...
for
...
some
...
option,
...
the
...
component
...
throws
...
an
...
UnsupportedOperationException
...
.
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
...
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
...
the
...
search,
...
see
...
...
.
...
Search
The message body must have an entry with the key filter
. The value must be a String representing a valid LDAP filter, see http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare
...
.
...
Bind
The message body must have an entry with the key attributes
. The value must be an instance of javax.naming.directory
...
...
...
This
...
entry
...
specifies
...
the
...
LDAP
...
node
...
to
...
be
...
created.
...
Unbind
No further entries necessary, the node with the specified dn
is deleted.
Key definitions
In order to avoid spelling errors, the following constants are defined in org.apache.camel.springldap.SpringLdapProducer
...
:
...
- public
...
- static
...
- final
...
- String
...
- DN
...
- =
...
- "dn"
...
- public
...
- static
...
- final
...
- String
...
- FILTER
...
- =
...
- "filter"
...
- public
...
- static
...
- final
...
- String
...
- ATTRIBUTES
...
- =
...
- "attributes"