---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: dataformat
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: dataformat
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: dataformat
        spec:
          containers:
          - image: funktion/connector-dataformat:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: dataformat
      syntax: dataformat:name:operation
      title: Data Format
      description: The dataformat component is used for working with Data Formats as if it was a regular Component supporting Endpoints and URIs.
      label: core,transformation
      deprecated: false
      async: false
      producerOnly: true
      lenientProperties: true
      javaType: org.apache.camel.component.dataformat.DataFormatComponent
      groupId: org.apache.camel
      artifactId: camel-core
      version: 2.18.3
    componentProperties: {}
    properties:
      name:
        kind: path
        group: producer
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: Name of data format
        order: 0
      operation:
        kind: path
        group: producer
        required: true
        type: string
        javaType: java.lang.String
        enum:
        - marshal
        - unmarshal
        deprecated: false
        secret: false
        description: Operation to use either marshal or unmarshal
        order: 1
      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: 2
  documentation.adoc: |+
    [[DataFormatComponent-DataFormatComponent]]
    Data Format Component
    ~~~~~~~~~~~~~~~~~~~~~

    *Available as of Camel 2.12*

    The *dataformat:* component allows to use link:data-format.html[Data
    Format] as a Camel link:component.html[Component].

    [[DataFormatComponent-URIformat]]
    URI format
    ^^^^^^^^^^

    [source,java]
    ---------------------------------------------
    dataformat:name:(marshal|unmarshal)[?options]
    ---------------------------------------------

    Where *name* is the name of the link:data-format.html[Data Format]. And
    then followed by the operation which must either be `marshal` or
    `unmarshal`. The options is used for configuring the link:data-format.html[Data
    Format] in use. See the link:data-format.html[Data Format] documentation
    for which options it support.

    [[DataFormatComponent-Options]]
    DataFormat Options
    ^^^^^^^^^^^^^^^^^^


    // component options: START
    The Data Format component has no options.
    // component options: END



    // endpoint options: START
    The Data Format component supports 3 endpoint options which are listed below:

    {% raw %}
    [width="100%",cols="2,1,1m,1m,5",options="header"]
    |=======================================================================
    | Name | Group | Default | Java Type | Description
    | name | producer |  | String | *Required* Name of data format
    | operation | producer |  | String | *Required* Operation to use either marshal or unmarshal
    | 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


    [[DataFormatComponent-Samples]]
    Samples
    ^^^^^^^

    For example to use the link:jaxb.html[JAXB] link:data-format.html[Data
    Format] we can do as follows:

    [source,java]
    -------------------------------------------------------------
    from("activemq:My.Queue").
      to("dataformat:jaxb:unmarshal?contextPath=com.acme.model").
      to("mqseries:Another.Queue");
    -------------------------------------------------------------

    And in XML DSL you do:

    [source,xml]
    -----------------------------------------------------------------------
    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
      <route>
        <from uri="activemq:My.Queue"/>
        <to uri="dataformat:jaxb:unmarshal?contextPath=com.acme.model"/>
        <to uri="mqseries:Another.Queue"/>
      </route>
    </camelContext>
    -----------------------------------------------------------------------

    [[DataFormatComponent-SeeAlso]]
    See Also
    ^^^^^^^^

    * link:configuring-camel.html[Configuring Camel]
    * link:component.html[Component]
    * link:endpoint.html[Endpoint]
    * link:getting-started.html[Getting Started]
    * link:data-format.html[Data Format]

