---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: ref
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: ref
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: ref
        spec:
          containers:
          - image: funktion/connector-ref:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: ref
      syntax: ref:name
      title: Ref
      description: The ref component is used for lookup of existing endpoints bound in the Registry.
      label: core,endpoint
      deprecated: false
      async: false
      javaType: org.apache.camel.component.ref.RefComponent
      groupId: org.apache.camel
      artifactId: camel-core
      version: 2.18.3
    componentProperties: {}
    properties:
      name:
        kind: path
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: Name of endpoint to lookup in the registry.
        order: 0
      bridgeErrorHandler:
        kind: parameter
        group: consumer
        label: consumer
        type: boolean
        javaType: boolean
        optionalPrefix: consumer.
        deprecated: false
        secret: false
        defaultValue: false
        description: Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
        order: 1
      exceptionHandler:
        kind: parameter
        group: consumer (advanced)
        label: consumer,advanced
        type: object
        javaType: org.apache.camel.spi.ExceptionHandler
        optionalPrefix: consumer.
        deprecated: false
        secret: false
        description: To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
        order: 2
      exchangePattern:
        kind: parameter
        group: consumer (advanced)
        label: consumer,advanced
        type: string
        javaType: org.apache.camel.ExchangePattern
        enum:
        - InOnly
        - RobustInOnly
        - InOut
        - InOptionalOut
        - OutOnly
        - RobustOutOnly
        - OutIn
        - OutOptionalIn
        deprecated: false
        secret: false
        description: Sets the default exchange pattern when creating an exchange.
        order: 3
      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: 4
  documentation.adoc: "[[Ref-RefComponent]]\nRef Component\n~~~~~~~~~~~~~\n\nThe *ref:*\
    \ component is used for lookup of existing endpoints bound in\nthe link:registry.html[Registry].\n\
    \n[[Ref-URIformat]]\nURI format\n^^^^^^^^^^\n\n[source,java]\n----------------------\n\
    ref:someName[?options]\n----------------------\n\nWhere *someName* is the name\
    \ of an endpoint in the\nlink:registry.html[Registry] (usually, but not always,\
    \ the Spring\nregistry). If you are using the Spring registry, `someName` would\
    \ be the\nbean ID of an endpoint in the Spring registry.\n\n[[Ref-Options]]\n\
    Ref Options\n^^^^^^^^^^^\n\n// component options: START\nThe Ref component has\
    \ no options.\n// component options: END\n\n\n// endpoint options: START\nThe\
    \ Ref component supports 5 endpoint options which are listed below:\n\n{% raw\
    \ %}\n[width=\"100%\",cols=\"2,1,1m,1m,5\",options=\"header\"]\n|=======================================================================\n\
    | Name | Group | Default | Java Type | Description\n| name | common |  | String\
    \ | *Required* Name of endpoint to lookup in the registry.\n| bridgeErrorHandler\
    \ | consumer | false | boolean | Allows for bridging the consumer to the Camel\
    \ routing Error Handler which mean any exceptions occurred while the consumer\
    \ is trying to pickup incoming messages or the likes will now be processed as\
    \ a message and handled by the routing Error Handler. By default the consumer\
    \ will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that\
    \ will be logged at WARN/ERROR level and ignored.\n| exceptionHandler | consumer\
    \ (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler.\
    \ Notice if the option bridgeErrorHandler is enabled then this options is not\
    \ in use. By default the consumer will deal with exceptions that will be logged\
    \ at WARN/ERROR level and ignored.\n| exchangePattern | consumer (advanced) |\
    \  | ExchangePattern | Sets the default exchange pattern when creating an exchange.\n\
    | synchronous | advanced | false | boolean | Sets whether synchronous processing\
    \ should be strictly used or Camel is allowed to use asynchronous processing (if\
    \ supported).\n|=======================================================================\n\
    {% endraw %}\n// endpoint options: END\n\n\n[[Ref-Runtimelookup]]\nRuntime lookup\n\
    ^^^^^^^^^^^^^^\n\nThis component can be used when you need dynamic discovery of\
    \ endpoints\nin the link:registry.html[Registry] where you can compute the URI\
    \ at\nruntime. Then you can look up the endpoint using the following code:\n\n\
    [source,java]\n-------------------------------------------------------------------\n\
    \   // lookup the endpoint\n   String myEndpointRef = \"bigspenderOrder\";\n \
    \  Endpoint endpoint = context.getEndpoint(\"ref:\" + myEndpointRef);\n   \n \
    \  Producer producer = endpoint.createProducer();\n   Exchange exchange = producer.createExchange();\n\
    \   exchange.getIn().setBody(payloadToSend);\n   // send the exchange\n   producer.process(exchange);\n\
    \   ...\n-------------------------------------------------------------------\n\
    \nAnd you could have a list of endpoints defined in the\nlink:registry.html[Registry]\
    \ such as:\n\n[source,xml]\n----------------------------------------------------------------------------------\n\
    \  <camelContext id=\"camel\" xmlns=\"http://activemq.apache.org/camel/schema/spring\"\
    >\n      <endpoint id=\"normalOrder\" uri=\"activemq:order.slow\"/>\n      <endpoint\
    \ id=\"bigspenderOrder\" uri=\"activemq:order.high\"/>\n      ...\n  </camelContext>\n\
    ----------------------------------------------------------------------------------\n\
    \n[[Ref-Sample]]\nSample\n^^^^^^\n\nIn the sample below we use the `ref:` in the\
    \ URI to reference the\nendpoint with the spring ID, `endpoint2`:\n\nYou could,\
    \ of course, have used the `ref` attribute instead:\n\n[source,xml]\n---------------------------\n\
    \      <to ref=\"endpoint2\"/>\n---------------------------\n\nWhich is the more\
    \ common way to write it.\n\n[[Ref-SeeAlso]]\nSee Also\n^^^^^^^^\n\n* link:configuring-camel.html[Configuring\
    \ Camel]\n* link:component.html[Component]\n* link:endpoint.html[Endpoint]\n*\
    \ link:getting-started.html[Getting Started]\n\n"
