camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: camel-salesforce-maven-plugin picklist to enum generation
Date Fri, 29 Jan 2016 08:56:54 GMT
Hi

What version of Camel are you using?

And can you tell more about how you are using that plugin? Maybe a bit
more about what salesforce API you generate "against".


Dhiraj wonder if you have time to help also? Wonder if there is
something that need to be improved in that maven plugin to avoid those
name clashes? And would there be a way to reproduce the issue with the
existing camel-salesforce component we have at Apache ?







On Thu, Jan 28, 2016 at 2:44 PM, kag <kimalster@gmail.com> wrote:
> Hello all,
>
> We are currently looking into using Camel for integrating with our
> salesforce org.
> To do this we plan to use the salesforce component and the
> camel-salesforce-maven-plugin which generates DTO classes based on the
> metadata fetched from salesforce.
>
> We have encountered a problem when handling Fields of the PickList type with
> the same name.
>
> E.g. Customer class has a PickList Field called Type. This translates to
> TypeEnum.java.
>
> The problem occurs when we introduce the new Bicycle class, which also has a
> PickList Field called Type.
> This also translates to TypeEnum.java.
>
> Result, the first TypeEnum.java is replaced/overwritten with the latter.
>
> In the Java Class the method:
>
> public String enumTypeName(String name) {
>         name = name.endsWith("__c") ? name.substring(0, name.length() - 3) : name;
>         return name + "Enum";
> }
>
> seems to be the source of this.
> Is there any way around this issue, is it possible to name the enums
> differently when generating?
>
> E.g. CustomerTypeEnum.java and BicycleTypeEnum.java
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-salesforce-maven-plugin-picklist-to-enum-generation-tp5776908.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

Mime
View raw message