---
apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: ConfigMap
  metadata:
    labels:
      funktion.fabric8.io/kind: Connector
      provider: fabric8
      project: connector-spring-ldap
      version: 1.1.44
      group: io.fabric8.funktion.connector
    name: spring-ldap
  data:
    deployment.yml: |
      ---
      apiVersion: extensions/v1beta1
      kind: Deployment
      metadata:
        labels:
          funktion.fabric8.io/kind: Subscription
          connector: spring-ldap
      spec:
        replicas: 1
        template:
          metadata:
            labels:
              funktion.fabric8.io/kind: Subscription
              connector: spring-ldap
          spec:
            containers:
            - image: funktion/connector-spring-ldap:1.1.44
              name: connector
    schema.yml: |
      ---
      component:
        kind: component
        scheme: spring-ldap
        syntax: spring-ldap:templateName
        title: Spring LDAP
        description: The spring-ldap component allows you to perform searches in LDAP servers using filters as the message payload.
        label: spring,ldap
        deprecated: false
        async: false
        producerOnly: true
        javaType: org.apache.camel.component.springldap.SpringLdapComponent
        groupId: org.apache.camel
        artifactId: camel-spring-ldap
        version: 2.18.1
      componentProperties: {}
      properties:
        templateName:
          kind: path
          group: producer
          required: true
          type: string
          javaType: java.lang.String
          deprecated: false
          secret: false
          description: Name of the Spring LDAP Template bean
          order: 0
        operation:
          kind: parameter
          group: producer
          required: true
          type: string
          javaType: org.apache.camel.component.springldap.LdapOperation
          enum:
          - SEARCH
          - BIND
          - UNBIND
          deprecated: false
          secret: false
          description: The LDAP operation to be performed.
          order: 1
        scope:
          kind: parameter
          group: producer
          type: string
          javaType: java.lang.String
          enum:
          - object
          - onelevel
          - subtree
          deprecated: false
          secret: false
          defaultValue: subtree
          description: The scope of the search operation.
          order: 2
        synchronous:
          kind: parameter
          group: advanced
          label: advanced
          type: boolean
          javaType: boolean
          deprecated: false
          secret: false
          defaultValue: false
          description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
          order: 3
    documentation.adoc: |+
      [[SpringLDAP-SpringLDAPComponent]]
      Spring LDAP Component
      ~~~~~~~~~~~~~~~~~~~~~

      *Available since Camel 2.11*

      The *spring-ldap:* component provides a Camel wrapper for
      http://www.springsource.org/ldap[Spring LDAP].

      Maven users will need to add the following dependency to their `pom.xml`
      for this component:

      [source,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>
      ------------------------------------------------------------

      [[SpringLDAP-URIformat]]
      URI format
      ^^^^^^^^^^

      [source,java]
      ----------------------------------------
      spring-ldap:springLdapTemplate[?options]
      ----------------------------------------

      Where *springLdapTemplate* is the name of the
      http://static.springsource.org/spring-ldap/site/apidocs/org/springframework/ldap/core/LdapTemplate.html[Spring
      LDAP Template bean]. In this bean, you configure the URL and the
      credentials for your LDAP access.

      [[SpringLDAP-Options]]
      Options
      ^^^^^^^


      // component options: START
      The Spring LDAP component has no options.
      // component options: END



      // endpoint options: START
      The Spring LDAP component supports 4 endpoint options which are listed below:

      {% raw %}
      [width="100%",cols="2,1,1m,1m,5",options="header"]
      |=======================================================================
      | Name | Group | Default | Java Type | Description
      | templateName | producer |  | String | *Required* Name of the Spring LDAP Template bean
      | operation | producer |  | LdapOperation | *Required* The LDAP operation to be performed.
      | scope | producer | subtree | String | The scope of the search operation.
      | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
      |=======================================================================
      {% endraw %}
      // endpoint options: END


      [[SpringLDAP-Usage]]
      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
      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].

      [[SpringLDAP-Search]]
      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[http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol#Search_and_Compare].

      [[SpringLDAP-Bind]]
      Bind
      ++++

      The message body must have an entry with the key *`attributes`*. The
      value must be an instance of
      http://docs.oracle.com/javase/6/docs/api/javax/naming/directory/Attributes.html[javax.naming.directory.Attributes]
      This entry specifies the LDAP node to be created.

      [[SpringLDAP-Unbind]]
      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"

