Ah quick thought could be to add a component that validates using a
Camel language, and uses simple by default, then you can do

body[foo] == 'Hello'
body[bar] > 100

eg in a plain text file where each line is a predicate.

<to uri="camel-validator:myFile.txt/">

It could also be some kind of xml file where you can setup multiple
groups in the same file, and then refer to which one

<to uri="camel-validator:myFile.xml?rule=foo"/>

<validate-rules>
<validate id="foo">
  <simple>body[foo] == 'Hello'</simple>
  <simple>body[bar] &gt; 100</simple>
</validate>
<validate id="dude">
  <simple>body[yay] == 'Hello'</simple>
  <simple>body[something] in ['a', 'b']</simple>
</validate>
</validate-rules>



On Wed, Mar 16, 2016 at 9:19 AM, Claus Ibsen <[email protected]> wrote:
> No there is no such component.
>
> Creating a pojo vs a xml both requires work. The former is just java,
> the latter introduces a new limited language.
>
> How much validation do you need, eg what are your criteria's?
>
> On Wed, Mar 16, 2016 at 9:08 AM, Michele
> <[email protected]> wrote:
>> Hi Ranx,
>>
>> thanks so much.
>>
>> Exactly, key/values validation... I have different file with different
>> criterions of validations and to create different Pojo is much expensive.
>>
>> Is there a compenent in camel with xml configuration to validate a Map
>> Object?
>>
>> Thaks in advance
>>
>> Best Regards
>>
>> Michele
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/How-to-validate-Body-Content-in-Map-Object-tp5779118p5779142.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to