<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../plugin.xsl" type="text/xsl"?>
<plugin name="LdapInjector">
  <object class="org.ow2.isac.plugin.ldapinjector.SessionObject">
    <params>
      <param name="ldapHost" type="String" />
      <param name="ldapVersion" type="String" />
      <param name="ldapPort" type="String" />
      <param name="ldapSSLPort" type="String" />
    </params>
    <help>This plugin allows to test an LDAP V3 directory. It provides primitives to connect (with or without SSL), search, add or delete entries, and add or delete attributes.</help>
  </object>
  <sample name="bind" number="0">
    <params>
      <param name="login" type="String" />
      <param name="password" type="String" />
      <param name="withSSL" type="String" />
      <param name="actiontype" type="String" />
      <param name="comment" type="String" />
    </params>
    <help>Connects and binds to an LDAP directory. This sample must be performed at least once prior to any other sample.&#xD;
&#xD;
Leave login and password empty for an anonymous bind.&#xD;
&#xD;
When trying to connect over SSL (LDAPS), beware of setting Java properties regarding trusted certificates: the LDAP server certificate, when not signed by a recognized certification authority, must be added to a Java trust store file, possibly protected by a password. Both the path to the trust store file and the associated password must be specified via these Java system properties:&#xD;
-Djavax.net.ssl.trustStore=/path/to/keystore&#xD;
-Djavax.net.ssl.trustStorePassword=the_keystore_password</help>
  </sample>
  <sample name="search" number="2">
    <params>
      <param name="searchBase" type="String" />
      <param name="searchFilter" type="String" />
      <param name="searchScope" type="String" />
      <param name="actiontype" type="String" />
      <param name="comment" type="String" />
      <param name="buffer" type="String" />
      <param name="searchLimit" type="String" />
    </params>
    <help>Performs a search operation in the LDAP directory.&#xD;
A successful call to sample 'bind' is mandatory prior to running any search.&#xD;
The number of result entries may be limited unless this limit is set to 0, which means unlimited.&#xD;
Search results may be stored in a buffer for further reference via a number of variable statements:&#xD;
- ${myLdap:bufferName:#} number of entries left to read;&#xD;
- ${myLdap:bufferName:} gets the next entry and returns all of its attributes as name-value pairs;&#xD;
- ${myLdap:bufferName:attributeName} gets the next entry and returns the value of its attribute whose name is given.</help>
  </sample>
  <sample name="closeConnection" number="3">
    <params />
    <help>Disconnects from the LDAP server.&#xD;
A successful call to sample 'bind' is mandatory prior to calling 'closeConnection'.</help>
  </sample>
  <sample name="addEntry" number="4">
    <params>
      <param name="ldapDN" type="String" />
      <param name="entryNodeType" type="String" />
      <param name="entryNodeName" type="String" />
      <param name="AttributesList" type="String" />
    </params>
    <help>Add entry into an ldap directory.&#xD;
A successful call to sample 'bind' is mandatory prior to adding an entry.</help>
  </sample>
  <sample name="deleteEntry" number="5">
    <params>
      <param name="ldapDN" type="String" />
    </params>
    <help>Delete entry into an ldap directory.&#xD;
A successful call to sample 'bind' is mandatory prior to deleting an entry.</help>
  </sample>
  <sample name="addAttribute" number="6">
    <params>
      <param name="dn" type="String" />
      <param name="attributesNameValues" type="String" />
    </params>
    <help>Add attributes into an entry of a ldap directory.&#xD;
A successful call to sample 'bind' is mandatory prior to adding attributes.</help>
  </sample>
  <sample name="deleteAttribute" number="7">
    <params>
      <param name="dn" type="String" />
      <param name="attributesToDelete" type="String" />
    </params>
    <help>Delete attributes of entries of a ldap directory.&#xD;
A successful call to sample 'bind' is mandatory prior to deleting attributes.</help>
  </sample>
  <test name="isConnected" number="8">
    <params />
    <help>True if the LDAP connection is established, false otherwise.</help>
  </test>
  <test name="isNotConnected" number="9">
    <params />
    <help>True if the LDAP connection is not established, false otherwise.</help>
  </test>
  <test name="hasMoreEntries" number="10">
    <params>
      <param name="buffer" type="String" />
    </params>
    <help>True if there is at least one entry left to read in a search results buffer, false otherwise.</help>
  </test>
  <test name="hasNoMoreEntries" number="11">
    <params>
      <param name="buffer" type="String" />
    </params>
    <help>True if there is no more entry left to read in a search results buffer, false otherwise.</help>
  </test>
</plugin>

