portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r888098 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/pom.xml jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml pom.xml
Date Mon, 07 Dec 2009 19:26:20 GMT
Author: woonsan
Date: Mon Dec  7 19:26:13 2009
New Revision: 888098

URL: http://svn.apache.org/viewvc?rev=888098&view=rev
Log:
JS2-1087: Using jackson json provider. Thanks to Randy for the pointer.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/pom.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml
    portals/jetspeed-2/portal/trunk/pom.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/pom.xml?rev=888098&r1=888097&r2=888098&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/pom.xml Mon Dec  7 19:26:13
2009
@@ -174,6 +174,16 @@
       <artifactId>cxf-rt-frontend-jaxrs</artifactId>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-jaxrs</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-xc</artifactId>
+      <scope>runtime</scope>
+    </dependency>
 
     <!-- Test Dependencies -->
     <dependency>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml?rev=888098&r1=888097&r2=888098&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml
Mon Dec  7 19:26:13 2009
@@ -68,27 +68,54 @@
       </bean>
     </property>
   </bean>
+
+  <bean id="jacksonObjectMapper" class="org.codehaus.jackson.map.ObjectMapper">
+    <meta key="j2:cat" value="default" />
+  </bean>
+  
+  <bean id="jacksonJaxbIntrospector" class="org.codehaus.jackson.xc.JaxbAnnotationIntrospector">
+    <meta key="j2:cat" value="default" />
+  </bean>
+  
+  <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+    <meta key="j2:cat" value="default" />
+    <property name="targetObject">
+      <bean class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
+        <meta key="j2:cat" value="default" />
+        <property name="targetObject" ref="jacksonObjectMapper" />
+        <property name="propertyPath" value="serializationConfig"/>
+      </bean>
+    </property>
+    <property name="targetMethod" value="setAnnotationIntrospector"/>
+    <property name="arguments">
+      <list>
+        <ref bean="jacksonJaxbIntrospector" />
+      </list>
+    </property>
+  </bean>
   
-  <bean id="jaxrsJsonProvider" class="org.apache.cxf.jaxrs.provider.JSONProvider">
+  <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
     <meta key="j2:cat" value="default" />
-    <property name="serializeAsArray" value="true"/>
-    <property name="arrayKeys">
+    <property name="targetObject">
+      <bean class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
+        <meta key="j2:cat" value="default" />
+        <property name="targetObject" ref="jacksonObjectMapper" />
+        <property name="propertyPath" value="deserializationConfig"/>
+      </bean>
+    </property>
+    <property name="targetMethod" value="setAnnotationIntrospector"/>
+    <property name="arguments">
       <list>
-        <!--
-        <value>displayName</value>
-        <value>description</value>
-        <value>initparam</value>
-        <value>language</value>
-        <value>field</value>
-        <value>portletMode</value>
-        <value>windowState</value>
-        <value>definition</value>
-        <value>application</value>
-        -->
+        <ref bean="jacksonJaxbIntrospector" />
       </list>
     </property>
   </bean>
   
+  <bean id="jaxrsJsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
+    <meta key="j2:cat" value="default" />
+    <property name="mapper" ref="jacksonObjectMapper" />
+  </bean>
+  
   <!-- JAX-RS Service Singleton Resource Beans  -->
   <bean id="org.apache.jetspeed.services.rest.singletons" class="org.springframework.beans.factory.config.SetFactoryBean">
     <meta key="j2:cat" value="default" />
@@ -113,4 +140,4 @@
     <constructor-arg ref="org.apache.jetspeed.search.SearchEngine" />
   </bean>
   
-</beans>
\ No newline at end of file
+</beans>

Modified: portals/jetspeed-2/portal/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/pom.xml?rev=888098&r1=888097&r2=888098&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/pom.xml Mon Dec  7 19:26:13 2009
@@ -313,6 +313,7 @@
     <commonj.version>1.1</commonj.version>
     <tyrex.version>1.0.1</tyrex.version>
     <cxf.version>2.2.5</cxf.version>
+    <jackson.version>1.3.2</jackson.version>
   </properties>
 
   <!-- Dependency Configuration -->
@@ -1014,6 +1015,22 @@
         </exclusions>
       </dependency>
       
+      <!-- Jackson JSON -->
+      <dependency>
+        <groupId>org.codehaus.jackson</groupId>
+        <artifactId>jackson-jaxrs</artifactId>
+        <version>${jackson.version}</version>
+        <scope>runtime</scope>
+      </dependency>
+      
+      <!-- Jacson Xml Compatibility extensions -->
+      <dependency>
+        <groupId>org.codehaus.jackson</groupId>
+        <artifactId>jackson-xc</artifactId>
+        <version>${jackson.version}</version>
+        <scope>runtime</scope>
+      </dependency>
+      
       <!-- Test -->
       <dependency>
         <groupId>junit</groupId>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message