[
https://issues.apache.org/jira/browse/CAMEL-6306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13640184#comment-13640184
]
james strachan commented on CAMEL-6306:
---------------------------------------
Thanks Alan, great ideas!
For default values, I did wonder about creating an empty Endpoint object and
using introspection to find the value; then it'd work with all current
endpoints and would work with any kind of value too (e.g. boolean / numeric /
date etc). The slightly tricky part is that its non-trivial creating an
empty/exemplar endpoint as they take various constructor parameters & often
need the URI up front to create. I wonder if we should do both though really;
try deduce from the code but if that doesn't work let folks use annotations?
Totally agree with possible values though! I was thinking we maybe need to add
a Completer API rather like Karaf Commands use to let folks do tab completion
on arguments/options to commands in the shell. So that, for example, a JMS,
file system or database endpoint could let folks complete on the name of a
queue, file or table respectively (letting folks specify a prefix/search string
to filter) then in tools we could use a Suggest/Completer/Combo Box. Whenever
values are enums or booleans there's no need; but for Strings we need a way to
figure out the possible values - either statically with annotations or
dynamically with a @Completer API
> provide a way to introspect a component, find the various parameters
> available and their types so that tooling can provide forms to let users
> create & customise endpoints
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-6306
> URL: https://issues.apache.org/jira/browse/CAMEL-6306
> Project: Camel
> Issue Type: New Feature
> Reporter: james strachan
> Assignee: james strachan
> Fix For: 2.12.0
>
>
> From the current EndpointConfiguration you need a URI or Endpoint to be able
> to get the configuration object; and there's no way to introspect it to find
> its properties.
> Tools like IDEs or web consoles typically need to start from a blank slate,
> create a form and let users enter the various properties required to
> configure and create a new endpoint.
> So this issue adds a new ComponentConfiguration API; which is like
> EndpointConfiguration but can be created on any existing Camel component
> without any code changes and lets users configure the configuration; then
> either create a URI string or create an Endpoint directly - or introspect the
> available properties.
> There are 2 implementations; a basic implementation which works with any
> camel component today and a more advanced implementation which makes use of
> the @UriEndpoint / @UriParam / @UriParams annotations from CAMEL-6304 to
> provide better metadata.
> The aim is to work with all camel components/endpoints from day 1 but to
> provide a way for endpoint developers to provide better metadata by using
> some annotations
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira