camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8345) We should use Properties instead of Property to define the properties in restConfiguration
Date Sat, 14 Feb 2015 15:38:11 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321532#comment-14321532
] 

Claus Ibsen commented on CAMEL-8345:
------------------------------------

It is actually correct as-is, as you can define as many of them as you want. 
{code}   
 <restConfiguration>
      <componentProperty key="" value=""/>
      <componentProperty key="" value=""/>
      <consumerProperty key="" value=""/>
      <dataFormatProperty key="" value="xx"/>
    </restConfiguration>
{code}

What you suggest I suppose is

{code}
 <restConfiguration>
  <componentProperties>
      <componentProperty key="" value=""/>
      <componentProperty key="" value=""/>
  </componentProperties>
 <consumerProperties>
      <componentProperty key="" value=""/>
      <componentProperty key="" value=""/>
  </consumerProperties>

    </restConfiguration>
{code}

But since we got property fixed in Camel 2.15 onwards we can make it
{code}
 <restConfiguration>
  <componentProperties>
      <property key="" value=""/>
      <property key="" value=""/>
  </componentProperties>
 <consumerProperties>
      <property key="" value=""/>
      <property key="" value=""/>
  </consumerProperties>
    </restConfiguration>
{code}

Which likely is a bit more Spring like


> We should use Properties instead of Property to define the properties in restConfiguration
> ------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-8345
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8345
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.1
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.15.0
>
>
> Current <restConfiguration> use xxxProperty to specify the properties, it is not
the common usage. It could be better if we can fix it in Camel 2.15.0.
> {code}
>     @XmlElement(name = "componentProperty")
>     private List<RestPropertyDefinition> componentProperties = new ArrayList<RestPropertyDefinition>();
>     @XmlElement(name = "endpointProperty")
>     private List<RestPropertyDefinition> endpointProperties = new ArrayList<RestPropertyDefinition>();
>     @XmlElement(name = "consumerProperty")
>     private List<RestPropertyDefinition> consumerProperties = new ArrayList<RestPropertyDefinition>();
>     @XmlElement(name = "dataFormatProperty")
>     private List<RestPropertyDefinition> dataFormatProperties = new ArrayList<RestPropertyDefinition>();
> {code}
> The XmlElement need to be changed to 
> {code}
>     @XmlElement(name = "componentProperties")
>     private List<RestPropertyDefinition> componentProperties = new ArrayList<RestPropertyDefinition>();
>     @XmlElement(name = "endpointProperties")
>     private List<RestPropertyDefinition> endpointProperties = new ArrayList<RestPropertyDefinition>();
>     @XmlElement(name = "consumerProperties")
>     private List<RestPropertyDefinition> consumerProperties = new ArrayList<RestPropertyDefinition>();
>     @XmlElement(name = "dataFormatProperties")
>     private List<RestPropertyDefinition> dataFormatProperties = new ArrayList<RestPropertyDefinition>();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message