You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Alex Dettinger (JIRA)" <ji...@apache.org> on 2017/01/12 11:20:52 UTC
[jira] [Commented] (CAMEL-10546) CamelContext - Rename
getProperties to getConfiguration
[ https://issues.apache.org/jira/browse/CAMEL-10546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15820774#comment-15820774 ]
Alex Dettinger commented on CAMEL-10546:
----------------------------------------
My understanding is that the proposed refactoring is:
{noformat}
CamelContext.getProperties() => CamelContext.getConfiguration()
CamelContext.setProperties(Map<String, String> properties) => CamelContext.setConfiguration(Map<String, String> configuration)
{noformat}
However, I'm wondering whether getProperty(String name) should be enrolled in the refactoring too. I would then propose:
{noformat}
CamelContext.getProperties() => CamelContext.getGlobalOptions()
CamelContext.getProperty(String name) => CamelContext.getGlobalOption(String name)
CamelContext.setProperties(Map<String, String> properties) => CamelContext.setGlobalOptions(Map<String, String> globalOptions)
{noformat}
What do you think ?
> CamelContext - Rename getProperties to getConfiguration
> -------------------------------------------------------
>
> Key: CAMEL-10546
> URL: https://issues.apache.org/jira/browse/CAMEL-10546
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 2.19.0
>
>
> People may mistake this with property placeholders. However its used for generic key/value pairs for configuring some global options on CamelContext such as max debug log length etc.
> An alternative is to change this configuration to be a type safe configuration which then adds fluent DSL support in Java and also in XML.
> But for 2.x we could add methods called getConfiguration() / setConfiguration() and deprecate the older methods so people get more aware of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)