[
https://issues.apache.org/jira/browse/CAMEL-18802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644624#comment-17644624
]
Claus Ibsen commented on CAMEL-18802:
-------------------------------------
So this is special due to the need for base64 function and an optional key.
Because what comes after base64 is what to encode, but you want to lookup
another property with a given key.
So its like we need to check if serviceAccountKey is a property key and use
that instead of its literal value.
And we need to improve PropertiesFunction API to allow it to be executed after
the remainder has been resolved first.
> Optional properties: if encoded the optional doesn't have any effect
> --------------------------------------------------------------------
>
> Key: CAMEL-18802
> URL: https://issues.apache.org/jira/browse/CAMEL-18802
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Andrea Cosentino
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.20.0
>
>
> Suppose you have something like:
> {code:java}
> template:
> from:
> uri: "google-storage://{{bucketNameOrArn}}"
> parameters:
> autoCreateBucket: "{{autoCreateBucket}}"
> serviceAccountKey: "base64:{{serviceAccountKey}}"
> deleteAfterRead: "{{deleteAfterRead}}"
> {code}
> and you want to have serviceAccountKey as optional parameter. If you prefix
> the parameter with '?', like
> {code:java}
> template:
> from:
> uri: "google-storage://{{bucketNameOrArn}}"
> parameters:
> autoCreateBucket: "{{autoCreateBucket}}"
> serviceAccountKey: "base64:{{?serviceAccountKey}}"
> deleteAfterRead: "{{deleteAfterRead}}"
> {code}
> We'll try to encode the value anyway, even if not specified.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)