Author: rickette
Date: Sun Apr 1 23:02:41 2012
New Revision: 1308211
URL: http://svn.apache.org/viewvc?rev=1308211&view=rev
Log:
CAMEL-5135: support for JSON views in Jackson and ExclusionStrategy's in GSON
Added:
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalExclusionTest.java
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/TestPojoExclusion.java
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeAge.java
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeWeight.java
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalViewTest.java
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/TestPojoView.java
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/Views.java
Modified:
camel/trunk/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
camel/trunk/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
Modified:
camel/trunk/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java?rev=1308211&r1=1308210&r2=1308211&view=diff
==============================================================================
---
camel/trunk/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
(original)
+++
camel/trunk/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
Sun Apr 1 23:02:41 2012
@@ -25,7 +25,9 @@ import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Map;
+import com.google.gson.ExclusionStrategy;
import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
import org.apache.camel.Exchange;
import org.apache.camel.spi.DataFormat;
@@ -53,6 +55,17 @@ public class GsonDataFormat implements D
}
/**
+ * Use the default Gson {@link Gson} and with a custom
+ * unmarshal type and {@link ExclusionStrategy}
+ *
+ * @param unmarshalType the custom unmarshal type
+ * @param exclusionStrategy the custom ExclusionStrategy
+ */
+ public GsonDataFormat(Class<?> unmarshalType, ExclusionStrategy
exclusionStrategy) {
+ this(createGsonWithExclusionStrategy(exclusionStrategy),
unmarshalType);
+ }
+
+ /**
* Use a custom Gson mapper and and unmarshal type
*
* @param gson the custom mapper
@@ -63,6 +76,14 @@ public class GsonDataFormat implements D
this.unmarshalType = unmarshalType;
}
+ private static Gson createGsonWithExclusionStrategy(ExclusionStrategy
exclusionStrategy) {
+ if (exclusionStrategy != null) {
+ return new
GsonBuilder().setExclusionStrategies(exclusionStrategy).create();
+ } else {
+ return new Gson();
+ }
+ }
+
@Override
public void marshal(Exchange exchange, Object graph, OutputStream stream)
throws Exception {
Writer writer = new BufferedWriter(new OutputStreamWriter(stream));
Added:
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalExclusionTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalExclusionTest.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalExclusionTest.java
(added)
+++
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/GsonMarshalExclusionTest.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,118 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.gson;
+
+import com.google.gson.ExclusionStrategy;
+import com.google.gson.FieldAttributes;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.gson.annotation.ExcludeAge;
+import org.apache.camel.component.gson.annotation.ExcludeWeight;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class GsonMarshalExclusionTest extends CamelTestSupport {
+
+ @Test
+ public void testMarshalAndUnmarshalPojoWithExclusion() throws Exception {
+
+ TestPojoExclusion in = new TestPojoExclusion();
+
+ MockEndpoint mock = getMockEndpoint("mock:reversePojoExcludeWeight");
+ mock.expectedMessageCount(1);
+ mock.message(0).body().isInstanceOf(TestPojoExclusion.class);
+ mock.message(0).body().equals(in);
+
+ Object marshalled = template.requestBody("direct:inPojoExcludeWeight",
in);
+ String marshalledAsString =
context.getTypeConverter().convertTo(String.class, marshalled);
+ assertEquals("{\"age\":30,\"height\":190}", marshalledAsString);
+
+ template.sendBody("direct:backPojoExcludeWeight", marshalled);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Test
+ public void testMarshalAndUnmarshalPojoWithAnotherExclusion() throws
Exception {
+
+ TestPojoExclusion in = new TestPojoExclusion();
+
+ MockEndpoint mock = getMockEndpoint("mock:reversePojoExcludeAge");
+ mock.expectedMessageCount(1);
+ mock.message(0).body().isInstanceOf(TestPojoExclusion.class);
+ mock.message(0).body().equals(in);
+
+ Object marshalled = template.requestBody("direct:inPojoExcludeAge",
in);
+ String marshalledAsString =
context.getTypeConverter().convertTo(String.class, marshalled);
+ assertEquals("{\"height\":190,\"weight\":70}", marshalledAsString);
+
+ template.sendBody("direct:backPojoExcludeAge", marshalled);
+
+ mock.assertIsSatisfied();
+ }
+
+ /**
+ * Strategy to exclude {@link ExcludeWeight} annotated fields
+ */
+ protected static class WeightExclusionStrategy implements
ExclusionStrategy {
+
+ @Override
+ public boolean shouldSkipField(FieldAttributes f) {
+ return f.getAnnotation(ExcludeWeight.class) != null;
+ }
+
+ @Override
+ public boolean shouldSkipClass(Class<?> clazz) {
+ return false;
+ }
+ }
+
+ /**
+ * Strategy to exclude {@link ExcludeAge} annotated fields
+ */
+ protected static class AgeExclusionStrategy implements ExclusionStrategy {
+
+ @Override
+ public boolean shouldSkipField(FieldAttributes f) {
+ return f.getAnnotation(ExcludeAge.class) != null;
+ }
+
+ @Override
+ public boolean shouldSkipClass(Class<?> clazz) {
+ return false;
+ }
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() throws Exception {
+
+ GsonDataFormat weightExclusionFormat = new
GsonDataFormat(TestPojoExclusion.class, new WeightExclusionStrategy());
+
from("direct:inPojoExcludeWeight").marshal(weightExclusionFormat);
+
from("direct:backPojoExcludeWeight").unmarshal(weightExclusionFormat).to("mock:reversePojoExcludeWeight");
+
+ GsonDataFormat ageExclusionFormat = new
GsonDataFormat(TestPojoExclusion.class, new AgeExclusionStrategy());
+ from("direct:inPojoExcludeAge").marshal(ageExclusionFormat);
+
from("direct:backPojoExcludeAge").unmarshal(ageExclusionFormat).to("mock:reversePojoExcludeAge");
+ }
+ };
+ }
+
+}
Added:
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/TestPojoExclusion.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/TestPojoExclusion.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/TestPojoExclusion.java
(added)
+++
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/TestPojoExclusion.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.gson;
+
+import org.apache.camel.component.gson.annotation.ExcludeAge;
+import org.apache.camel.component.gson.annotation.ExcludeWeight;
+
+public class TestPojoExclusion {
+
+ @ExcludeAge
+ private int age = 30;
+
+ private int height = 190;
+
+ @ExcludeWeight
+ private int weight = 70;
+
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+ public int getWeight() {
+ return weight;
+ }
+
+ public void setWeight(int weight) {
+ this.weight = weight;
+ }
+}
Added:
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeAge.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeAge.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeAge.java
(added)
+++
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeAge.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.gson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface ExcludeAge {
+}
Added:
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeWeight.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeWeight.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeWeight.java
(added)
+++
camel/trunk/components/camel-gson/src/test/java/org/apache/camel/component/gson/annotation/ExcludeWeight.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.gson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface ExcludeWeight {
+}
Modified:
camel/trunk/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java?rev=1308211&r1=1308210&r2=1308211&view=diff
==============================================================================
---
camel/trunk/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
(original)
+++
camel/trunk/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
Sun Apr 1 23:02:41 2012
@@ -33,6 +33,7 @@ public class JacksonDataFormat implement
private final ObjectMapper objectMapper;
private Class<?> unmarshalType;
+ private Class<?> jsonView;
/**
* Use the default Jackson {@link ObjectMapper} and {@link Map}
@@ -52,18 +53,43 @@ public class JacksonDataFormat implement
}
/**
+ * Use the default Jackson {@link ObjectMapper} and with a custom
+ * unmarshal type and JSON view
+ *
+ * @param unmarshalType the custom unmarshal type
+ * @param jsonView marker class to specifiy properties to be included
during marshalling.
+ * See also http://wiki.fasterxml.com/JacksonJsonViews
+ */
+ public JacksonDataFormat(Class<?> unmarshalType, Class<?> jsonView) {
+ this(new ObjectMapper(), unmarshalType, jsonView);
+ }
+
+ /**
* Use a custom Jackson mapper and and unmarshal type
*
* @param mapper the custom mapper
* @param unmarshalType the custom unmarshal type
*/
public JacksonDataFormat(ObjectMapper mapper, Class<?> unmarshalType) {
+ this(mapper, unmarshalType, null);
+ }
+
+ /**
+ * Use a custom Jackson mapper, unmarshal type and JSON view
+ *
+ * @param mapper the custom mapper
+ * @param unmarshalType the custom unmarshal type
+ * @param jsonView marker class to specifiy properties to be included
during marshalling.
+ * See also http://wiki.fasterxml.com/JacksonJsonViews
+ */
+ public JacksonDataFormat(ObjectMapper mapper, Class<?> unmarshalType,
Class<?> jsonView) {
this.objectMapper = mapper;
this.unmarshalType = unmarshalType;
+ this.jsonView = jsonView;
}
public void marshal(Exchange exchange, Object graph, OutputStream stream)
throws Exception {
- this.objectMapper.writeValue(stream, graph);
+ this.objectMapper.writerWithView(jsonView).writeValue(stream, graph);
}
public Object unmarshal(Exchange exchange, InputStream stream) throws
Exception {
@@ -81,6 +107,14 @@ public class JacksonDataFormat implement
this.unmarshalType = unmarshalType;
}
+ public Class<?> getJsonView() {
+ return jsonView;
+ }
+
+ public void setJsonView(Class<?> jsonView) {
+ this.jsonView = jsonView;
+ }
+
public ObjectMapper getObjectMapper() {
return this.objectMapper;
}
Added:
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalViewTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalViewTest.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalViewTest.java
(added)
+++
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalViewTest.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jackson;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class JacksonMarshalViewTest extends CamelTestSupport {
+
+ @Test
+ public void testMarshalAndUnmarshalPojoWithView() throws Exception {
+
+ TestPojoView in = new TestPojoView();
+
+ MockEndpoint mock = getMockEndpoint("mock:reversePojoAgeView");
+ mock.expectedMessageCount(1);
+ mock.message(0).body().isInstanceOf(TestPojoView.class);
+ mock.message(0).body().equals(in);
+
+ Object marshalled = template.requestBody("direct:inPojoAgeView", in);
+ String marshalledAsString =
context.getTypeConverter().convertTo(String.class, marshalled);
+ assertEquals("{\"age\":30,\"height\":190}", marshalledAsString);
+
+ template.sendBody("direct:backPojoAgeView", marshalled);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Test
+ public void testMarshalAndUnmarshalPojoWithAnotherView() throws Exception {
+
+ TestPojoView in = new TestPojoView();
+
+ MockEndpoint mock = getMockEndpoint("mock:reversePojoWeightView");
+ mock.expectedMessageCount(1);
+ mock.message(0).body().isInstanceOf(TestPojoView.class);
+ mock.message(0).body().equals(in);
+
+ Object marshalled = template.requestBody("direct:inPojoWeightView",
in);
+ String marshalledAsString =
context.getTypeConverter().convertTo(String.class, marshalled);
+ assertEquals("{\"height\":190,\"weight\":70}", marshalledAsString);
+
+ template.sendBody("direct:backPojoWeightView", marshalled);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() throws Exception {
+
+ JacksonDataFormat ageViewFormat = new
JacksonDataFormat(TestPojoView.class, Views.Age.class);
+ from("direct:inPojoAgeView").marshal(ageViewFormat);
+
from("direct:backPojoAgeView").unmarshal(ageViewFormat).to("mock:reversePojoAgeView");
+
+ JacksonDataFormat weightViewFormat = new
JacksonDataFormat(TestPojoView.class, Views.Weight.class);
+ from("direct:inPojoWeightView").marshal(weightViewFormat);
+
from("direct:backPojoWeightView").unmarshal(weightViewFormat).to("mock:reversePojoWeightView");
+ }
+ };
+ }
+
+}
Added:
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/TestPojoView.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/TestPojoView.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/TestPojoView.java
(added)
+++
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/TestPojoView.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jackson;
+
+import org.codehaus.jackson.map.annotate.JsonView;
+
+public class TestPojoView {
+
+ private int age = 30;
+ private int height = 190;
+ private int weight = 70;
+
+ @JsonView(Views.Age.class)
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+ @JsonView(Views.Weight.class)
+ public int getWeight() {
+ return weight;
+ }
+
+ public void setWeight(int weight) {
+ this.weight = weight;
+ }
+}
Added:
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/Views.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/Views.java?rev=1308211&view=auto
==============================================================================
---
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/Views.java
(added)
+++
camel/trunk/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/Views.java
Sun Apr 1 23:02:41 2012
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jackson;
+
+public class Views {
+
+ static class Weight { }
+ static class Age { }
+}