[
https://issues.apache.org/jira/browse/CAMEL-15404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17178037#comment-17178037
]
Michael Genereux commented on CAMEL-15404:
------------------------------------------
Here's the workaround. I hope it's right.
{code:scala}
object BoxRouteBuilder extends RouteBuilder() {
override def configure(): Unit = {
from(timer("box_start").repeatCount(1))
.process(new Processor {
override def process(exchange: Exchange): Unit = {
val message = exchange.getMessage()
message
.setHeader("CamelBox.fileId",
message.getBody(classOf[BoxFile#Info]).getID)
exchange.getMessage()
.setHeader("CamelBox.output", stream)
}
})
.to("box:files/download")
.to(kafka("box_file_list")
}
}
{code}
> Box Endpoint DSL missing options for most api methods
> -----------------------------------------------------
>
> Key: CAMEL-15404
> URL: https://issues.apache.org/jira/browse/CAMEL-15404
> Project: Camel
> Issue Type: Bug
> Components: camel-box
> Affects Versions: 3.4.2
> Reporter: Michael Genereux
> Priority: Minor
> Fix For: 3.5.0
>
>
> Looking in
> [https://github.com/apache/camel/blob/master/components/camel-box/camel-box-component/src/generated/resources/org/apache/camel/component/box/box.json],
> none of the URI options for the different box API methods are available to
> the Endpoint DSL generator. I don't know if there's an "escape valve" to
> allow me to apply non-typesafe options if the typesafe one is not available.
> Maybe it's a bug if the options are just not there.
> Here's the endpoint I expected to write:
> {code:scala}
> object BoxRouteBuilder extends RouteBuilder() {
> override def configure(): Unit = {
> from(timer("box_start").repeatCount(1))
> .to(box("folders/getFolderItems").folderId("12345678")
> .to(kafka("box_file_list")
> }
> }{code}
> but instead I had to write this working code:
> {code:scala}
> object BoxRouteBuilder extends RouteBuilder() {
> override def configure(): Unit = {
> from(timer("box_start").repeatCount(1))
> .to("box:folders/getFolderItems?folderId=12345678")
> .to(kafka("box_file_list")
> }
> }{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)