---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: irc
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: irc
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: irc
        spec:
          containers:
          - image: funktion/connector-irc:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: irc
      syntax: irc:hostname:port
      alternativeSyntax: irc:username:password@hostname:port
      title: IRC
      description: The irc component implements an IRC (Internet Relay Chat) transport.
      label: chat
      deprecated: false
      async: false
      javaType: org.apache.camel.component.irc.IrcComponent
      groupId: org.apache.camel
      artifactId: camel-irc
      version: 2.18.3
    componentProperties: {}
    properties:
      hostname:
        kind: path
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: Hostname for the IRC chat server
        order: 0
      port:
        kind: path
        group: common
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: 6667,6668,6669
        description: Port number for the IRC chat server
        order: 1
      autoRejoin:
        kind: parameter
        group: common
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Whether to auto re-join when being kicked
        order: 2
      namesOnJoin:
        kind: parameter
        group: common
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Sends NAMES command to channel after joining it. link onReply has to be true in order to process the result which will have the header value irc.num = '353'.
        order: 3
      nickname:
        kind: parameter
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The nickname used in chat.
        order: 4
      persistent:
        kind: parameter
        group: common
        type: boolean
        javaType: boolean
        deprecated: true
        secret: false
        defaultValue: true
        description: Use persistent messages.
        order: 5
      realname:
        kind: parameter
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The IRC user's actual name.
        order: 6
      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: 7
      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: 8
      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 exchange pattern when the consumer creates an exchange.
        order: 9
      colors:
        kind: parameter
        group: advanced
        label: advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Whether or not the server supports color codes.
        order: 10
      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: 11
      onJoin:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle user join events.
        order: 12
      onKick:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle kick events.
        order: 13
      onMode:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle mode change events.
        order: 14
      onNick:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle nickname change events.
        order: 15
      onPart:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle user part events.
        order: 16
      onPrivmsg:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle private message events.
        order: 17
      onQuit:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle user quit events.
        order: 18
      onReply:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Whether or not to handle general responses to commands or informational messages.
        order: 19
      onTopic:
        kind: parameter
        group: filter
        label: filter
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Handle topic change events.
        order: 20
      nickPassword:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: Your IRC server nickname password.
        order: 21
      password:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The IRC server password.
        order: 22
      sslContextParameters:
        kind: parameter
        group: security
        label: security
        type: object
        javaType: org.apache.camel.util.jsse.SSLContextParameters
        deprecated: false
        secret: false
        description: Used for configuring security using SSL. Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry. This reference overrides any configured SSLContextParameters at the component level. Note that this setting overrides the trustManager option.
        order: 23
      trustManager:
        kind: parameter
        group: security
        label: security
        type: object
        javaType: org.schwering.irc.lib.ssl.SSLTrustManager
        deprecated: false
        secret: false
        description: The trust manager used to verify the SSL server's certificate.
        order: 24
      username:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The IRC server user name.
        order: 25
  documentation.adoc: "[[IRC-IRCComponent]]\nIRC Component\n~~~~~~~~~~~~~\n\nThe *irc*\
    \ component implements an\nhttp://en.wikipedia.org/wiki/Internet_Relay_Chat[IRC]\
    \ (Internet Relay\nChat) transport.\n\nMaven users will need to add the following\
    \ dependency to their `pom.xml`\nfor this component:\n\n[source,xml]\n------------------------------------------------------------\n\
    <dependency>\n    <groupId>org.apache.camel</groupId>\n    <artifactId>camel-irc</artifactId>\n\
    \    <version>x.x.x</version>\n    <!-- use the same version as your Camel core\
    \ version -->\n</dependency>\n------------------------------------------------------------\n\
    \n[[IRC-URIformat]]\nURI format\n^^^^^^^^^^\n\n[source,java]\n---------------------------------------------------------------------\n\
    irc:nick@host[:port]/#room[?options]\nirc:nick@host[:port]?channels=#channel1,#channel2,#channel3[?options]\n\
    ---------------------------------------------------------------------\n\nYou can\
    \ append query options to the URI in the following format,\n`?option=value&option=value&...`\n\
    \n[[IRC-Options]]\nOptions\n^^^^^^^\n\n\n// component options: START\nThe IRC\
    \ component has no options.\n// component options: END\n\n\n\n\n\n\n\n// endpoint\
    \ options: START\nThe IRC component supports 26 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| hostname | common |  | String\
    \ | *Required* Hostname for the IRC chat server\n| port | common | 6667,6668,6669\
    \ | int | Port number for the IRC chat server\n| autoRejoin | common | true |\
    \ boolean | Whether to auto re-join when being kicked\n| namesOnJoin | common\
    \ | false | boolean | Sends NAMES command to channel after joining it. link onReply\
    \ has to be true in order to process the result which will have the header value\
    \ irc.num = '353'.\n| nickname | common |  | String | The nickname used in chat.\n\
    | persistent | common | true | boolean | Use persistent messages.\n| realname\
    \ | common |  | String | The IRC user's actual name.\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 exchange pattern when the consumer\
    \ creates an exchange.\n| colors | advanced | true | boolean | Whether or not\
    \ the server supports color codes.\n| synchronous | advanced | false | boolean\
    \ | Sets whether synchronous processing should be strictly used or Camel is allowed\
    \ to use asynchronous processing (if supported).\n| onJoin | filter | true | boolean\
    \ | Handle user join events.\n| onKick | filter | true | boolean | Handle kick\
    \ events.\n| onMode | filter | true | boolean | Handle mode change events.\n|\
    \ onNick | filter | true | boolean | Handle nickname change events.\n| onPart\
    \ | filter | true | boolean | Handle user part events.\n| onPrivmsg | filter |\
    \ true | boolean | Handle private message events.\n| onQuit | filter | true |\
    \ boolean | Handle user quit events.\n| onReply | filter | false | boolean | Whether\
    \ or not to handle general responses to commands or informational messages.\n\
    | onTopic | filter | true | boolean | Handle topic change events.\n| nickPassword\
    \ | security |  | String | Your IRC server nickname password.\n| password | security\
    \ |  | String | The IRC server password.\n| sslContextParameters | security |\
    \  | SSLContextParameters | Used for configuring security using SSL. Reference\
    \ to a org.apache.camel.util.jsse.SSLContextParameters in the Registry. This reference\
    \ overrides any configured SSLContextParameters at the component level. Note that\
    \ this setting overrides the trustManager option.\n| trustManager | security |\
    \  | SSLTrustManager | The trust manager used to verify the SSL server's certificate.\n\
    | username | security |  | String | The IRC server user name.\n|=======================================================================\n\
    {% endraw %}\n// endpoint options: END\n\n\n\n\n\n\n[[IRC-SSLSupport]]\nSSL Support\n\
    ^^^^^^^^^^^\n\n[[IRC-UsingtheJSSEConfigurationUtility]]\nUsing the JSSE Configuration\
    \ Utility\n++++++++++++++++++++++++++++++++++++\n\nAs of Camel 2.9, the IRC component\
    \ supports SSL/TLS configuration\nthrough the link:camel-configuration-utilities.html[Camel\
    \ JSSE\nConfiguration Utility].\_ This utility greatly decreases the amount of\n\
    component specific code you need to write and is configurable at the\nendpoint\
    \ and component levels.\_ The following examples demonstrate how\nto use the utility\
    \ with the IRC component.\n\n[[IRC-Programmaticconfigurationoftheendpoint]]\n\
    Programmatic configuration of the endpoint\n\n[source,java]\n-----------------------------------------------------------------------------------------------------------------------------------------\n\
    KeyStoreParameters ksp = new KeyStoreParameters();\nksp.setResource(\"/users/home/server/truststore.jks\"\
    );\nksp.setPassword(\"keystorePassword\");\n\nTrustManagersParameters tmp = new\
    \ TrustManagersParameters();\ntmp.setKeyStore(ksp);\n\nSSLContextParameters scp\
    \ = new SSLContextParameters();\nscp.setTrustManagers(tmp);\n\nRegistry registry\
    \ = ...\nregistry.bind(\"sslContextParameters\", scp);\n\n...\n\nfrom(...)\n \
    \   .to(\"ircs://camel-prd-user@server:6669/#camel-test?nickname=camel-prd&password=password&sslContextParameters=#sslContextParameters\"\
    );\n-----------------------------------------------------------------------------------------------------------------------------------------\n\
    \n[[IRC-SpringDSLbasedconfigurationofendpoint]]\nSpring DSL based configuration\
    \ of endpoint\n\n[source,xml]\n----------------------------------------------------------------------------------------------------------------------------------------------\n\
    ...\n  <camel:sslContextParameters\n      id=\"sslContextParameters\">\n    <camel:trustManagers>\n\
    \      <camel:keyStore\n          resource=\"/users/home/server/truststore.jks\"\
    \n          password=\"keystorePassword\"/>\n    </camel:keyManagers>\n  </camel:sslContextParameters>...\n\
    ...\n  <to uri=\"ircs://camel-prd-user@server:6669/#camel-test?nickname=camel-prd&password=password&sslContextParameters=#sslContextParameters\"\
    />...\n----------------------------------------------------------------------------------------------------------------------------------------------\n\
    \n[[IRC-Usingthelegacybasicconfigurationoptions]]\nUsing the legacy basic configuration\
    \ options\n++++++++++++++++++++++++++++++++++++++++++++\n\nYou can also connect\
    \ to an SSL enabled IRC server, as follows:\n\n[source,java]\n--------------------------------------------------\n\
    ircs:host[:port]/#room?username=user&password=pass\n--------------------------------------------------\n\
    \nBy default, the IRC transport uses\nhttp://moepii.sourceforge.net/irclib/javadoc/org/schwering/irc/lib/ssl/SSLDefaultTrustManager.html[SSLDefaultTrustManager].\n\
    If you need to provide your own custom trust manager, use the\n`trustManager`\
    \ parameter as follows:\n\n[source,java]\n----------------------------------------------------------------------------------------------\n\
    ircs:host[:port]/#room?username=user&password=pass&trustManager=#referenceToMyTrustManagerBean\n\
    ----------------------------------------------------------------------------------------------\n\
    \n[[IRC-Usingkeys]]\nUsing keys\n^^^^^^^^^^\n\n*Available as of Camel 2.2*\n\n\
    Some irc rooms requires you to provide a key to be able to join that\nchannel.\
    \ The key is just a secret word.\n\nFor example we join 3 channels where as only\
    \ channel 1 and 3 uses a key.\n\n[source,java]\n-----------------------------------------------------------------------------\n\
    irc:nick@irc.server.org?channels=#chan1,#chan2,#chan3&keys=chan1Key,,chan3key\n\
    -----------------------------------------------------------------------------\n\
    \nGetting a list of users of the channel\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\
    \nUsing the `namesOnJoin` option one can invoke the IRC-`NAMES` command after\
    \ the component has joined a channel. \nThe server will reply with `irc.num =\
    \ 353`. So in order to process the result the property `onReply` has to be `true`.\n\
    Furthermore one has to filter the `onReply` exchanges in order to get the names.\n\
    \nFor example we want to get all exchanges that contain the usernames of the channel:\n\
    \n[source,java]\n-----------------------------------------------------------------------------\n\
    from(\"ircs:nick@myserver:1234/#mychannelname?listOnJoin=true&onReply=true\")\n\
    \t.choice()\n\t\t.when(header(\"irc.messageType\").isEqualToIgnoreCase(\"REPLY\"\
    ))\n\t\t\t.filter(header(\"irc.num\").isEqualTo(\"353\"))\n\t\t\t.to(\"mock:result\"\
    ).stop();\n-----------------------------------------------------------------------------\n\
    \n[[IRC-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"
