You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/08 10:39:00 UTC

[jira] [Commented] (CAMEL-10570) camel-salesforce: add metadata to generated DTOs

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

ASF GitHub Bot commented on CAMEL-10570:
----------------------------------------

GitHub user zregvart opened a pull request:

    https://github.com/apache/camel/pull/1334

    CAMEL-10570  camel-salesforce: add metadata to generated DTOs

    This commit adds SObjectDescription by making the DTOs extend
    AbstractDescribedSObjectBase (new class) instead of AbstractSObjectBase.
    
    The code generation is performed in Velocity template by recursing the
    bean SObjectDescription properties. Helper methods are added to
    GeneratorUtility that help track the stack of the recursive invocation.
    
    To prevent hitting Java method length restriction (64K) some properties
    are blacklisted: PicklistValues and ChildRelationships which most likely
    would not be needed in the component operation anyways.
    
    @dhirajsb would you mind taking a look at this?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zregvart/camel salesforce-metadata

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1334.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1334
    
----
commit a7cdf08cf52ef4f5cc6f418e6357142b5a441b9a
Author: Zoran Regvart <zo...@regvart.com>
Date:   2016-12-08T10:27:28Z

    SObjectDescription metadata in DTOs
    
    This commit adds SObjectDescription by making the DTOs extend
    AbstractDescribedSObjectBase (new class) instead of AbstractSObjectBase.
    
    The code generation is performed in Velocity template by recursing the
    bean SObjectDescription properties. Helper methods are added to
    GeneratorUtility that help track the stack of the recursive invocation.
    
    To prevent hitting Java method length restriction (64K) some properties
    are blacklisted: PicklistValues and ChildRelationships which most likely
    would not be needed in the component operation anyways.
    
    (cherry picked from commit 2d14fd8caa58f4520cf70801a27a0a57b023f492)

----


> camel-salesforce: add metadata to generated DTOs
> ------------------------------------------------
>
>                 Key: CAMEL-10570
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10570
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-salesforce
>    Affects Versions: 2.19.0
>            Reporter: Zoran Regvart
>            Assignee: Zoran Regvart
>            Priority: Minor
>
> As per discussion in [CAMEL-10452], Data Transfer Objects (DTOs) generated by {{camel-salesforce-maven-plugin}} could contain additional metadata. This metadata could be used to get the list of fields in the SObject, to provide label plural form (needed in some APIs), or URLs of SObjects.
> The simplest option would be to add a method that returns existing {{SObjectDescription}} populated with the data received from the metadata service during the generation of DTOs.



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