camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Spring LDAP
Date Thu, 21 Feb 2013 21:05:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">Spring
    <h4>Page <b>edited</b> by             <a href="">Leonid
                         <h4>Changes (1)</h4>
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-unchanged" >h2. Spring LDAP Component <br>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">_available
since: 2.11_ <br> <br></td></tr>
            <tr><td class="diff-unchanged" >The *spring-ldap:* component provides
a Camel wrapper for [Spring LDAP|]. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="SpringLDAP-SpringLDAPComponent"></a>Spring LDAP Component</h2>

<p><em>available since: 2.11</em></p>

<p>The <b>spring-ldap:</b> component provides a Camel wrapper for <a
href="" class="external-link" rel="nofollow">Spring LDAP</a>.</p>

<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt>
for this component:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;dependency&gt;</span>
    <span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span
    <span class="code-tag">&lt;artifactId&gt;</span>camel-spring-ldap<span
    <span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
    <span class="code-tag"><span class="code-comment">&lt;!-- use the same
version as your Camel core version --&gt;</span></span>
<span class="code-tag">&lt;/dependency&gt;</span>

<h3><a name="SpringLDAP-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<p>Where <b>springLdapTemplate</b> is the name of the <a href=""
class="external-link" rel="nofollow">Spring LDAP Template bean</a>. In this bean,
you configure the URL and the credentials for your LDAP access.</p>

<h3><a name="SpringLDAP-Options"></a>Options</h3>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
<td class='confluenceTd'> <tt>operation</tt> </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> The LDAP operation to be performed. Must be one of <tt>search</tt>,
<tt>bind</tt>, or <tt>unbind</tt>. </td>
<td class='confluenceTd'> <tt>scope</tt> </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> The scope of the search operation. Must be one of <tt>object</tt>,
<tt>onelevel</tt>, or <tt>subtree</tt>, see also <a href=""
class="external-link" rel="nofollow"></a>
<p>If an unsupported value is specified for some option, the component throws an <tt>UnsupportedOperationException</tt>.</p>

<h3><a name="SpringLDAP-Usage"></a>Usage</h3>

<p>The component supports producer endpoint only. An attempt to create a consumer endpoint
will result in an <tt>UnsupportedOperationException</tt>.<br/>
The body of the message must be a map (an instance of <tt>java.util.Map</tt>).
This map must contain at least an entry with the key <b><tt>dn</tt></b>
that specifies the root node for the LDAP operation to be performed. Other entries of the
map are operation-specific (see below).</p>

<p>The body of the message remains unchanged for the <tt>bind</tt> and <tt>unbind</tt>
operations. For the <tt>search</tt> operation, the body is set to the result of
the search, see <a href=",%20java.lang.String,%20int,%20org.springframework.ldap.core.AttributesMapper%29"
class="external-link" rel="nofollow">,%20java.lang.String,%20int,%20org.springframework.ldap.core.AttributesMapper%29</a>.</p>

<h4><a name="SpringLDAP-Search"></a>Search</h4>

<p>The message body must have an entry with the key <b><tt>filter</tt></b>.
The value must be a String representing a valid LDAP filter, see <a href=""
class="external-link" rel="nofollow"></a>.</p>

<h4><a name="SpringLDAP-Bind"></a>Bind</h4>

<p>The message body must have an entry with the key <b><tt>attributes</tt></b>.
The value must be an instance of <a href=""
class="external-link" rel="nofollow"></a> This entry
specifies the LDAP node to be created.</p>

<h4><a name="SpringLDAP-Unbind"></a>Unbind</h4>

<p>No further entries necessary, the node with the specified <b><tt>dn</tt></b>
is deleted.</p>

<p><b>Key definitions</b></p>

<p>In order to avoid spelling errors, the following constants are defined in <tt>org.apache.camel.springldap.SpringLdapProducer</tt>:</p>
	<li>public static final String DN = "dn"</li>
	<li>public static final String FILTER = "filter"</li>
	<li>public static final String ATTRIBUTES = "attributes"</li>

        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message