camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Babo (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-8332) Add component implementation to camel-dozer module
Date Tue, 10 Feb 2015 15:37:12 GMT
Keith Babo created CAMEL-8332:
---------------------------------

             Summary: Add component implementation to camel-dozer module
                 Key: CAMEL-8332
                 URL: https://issues.apache.org/jira/browse/CAMEL-8332
             Project: Camel
          Issue Type: New Feature
          Components: camel-dozer
            Reporter: Keith Babo


The camel-dozer component does not actually provide a Camel component implementation today.
 Rather, it provides a converter loader which can be used in combination with a set of Dozer
mapping files to register a global set of converters within a CamelContext.  This issue proposes
the addition of a full-blown component implementation within camel-dozer.  Advantages of this
approach include:

* The ability to manage Dozer mapping configuration on a per-endpoint basis vs. global configuration
via the converter registry.
* Dozer handles direct field assignment quite well, but does not provide other common mapping
functions OOTB.  Camel can enrich Dozer via standard Dozer extensions, e.g.
** Mapping constant values to target fields
** Support for lookup tables, using the source value as the key
** Convenience transformations for mappings (e.g. trim spaces, convertToLowerCase, regular
expression evaluation)
** Allow Camel message/exchange headers to be mapped to target fields
* The ability to surround dozer mappings with data formats to support a single, any-to-any
transformation endpoint

Here's an example of what the endpoint configuration would look like.
{noformat}
dozer:mytransform?mappingFile=dozerBeanMapping.xml&marshalId=json&unmarshalId=jaxb&targetModel=example.MyObject
{noformat}

An initial implementation of this component is available as a PR against the Camel GitHub
repository.  Unit tests in the PR provide examples of various transformation use cases.  Many,
but not all, of the features listed above are implemented already.  I can file follow-up JIRAs
for additional features I have in mind.  I will also post a link to the PR and the topic branch
in the issue comments.



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

Mime
View raw message