cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1309732 - in /cxf/branches/2.5.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
Date Thu, 05 Apr 2012 09:59:04 GMT
Author: sergeyb
Date: Thu Apr  5 09:59:04 2012
New Revision: 1309732

URL: http://svn.apache.org/viewvc?rev=1309732&view=rev
Log:
Merged revisions 1309357 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1309357 | sergeyb | 2012-04-04 15:23:00 +0300 (Wed, 04 Apr 2012) | 1 line
  
  [CXF-4225] Updating JAXBElementProvider to support Listener properties
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1309357

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?rev=1309732&r1=1309731&r2=1309732&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
Thu Apr  5 09:59:04 2012
@@ -117,6 +117,8 @@ public abstract class AbstractJAXBProvid
     private boolean validateOutput;
     private boolean validateBeforeWrite;
     private ValidationEventHandler eventHandler;
+    private Unmarshaller.Listener unmarshallerListener;
+    private Marshaller.Listener marshallerListener;
     private DocumentDepthProperties depthProperties;
     
     public void setValidationHandler(ValidationEventHandler handler) {
@@ -457,6 +459,9 @@ public abstract class AbstractJAXBProvid
         if (eventHandler != null) {
             unmarshaller.setEventHandler(eventHandler);
         }
+        if (unmarshallerListener != null) {
+            unmarshaller.setListener(unmarshallerListener);
+        }
         if (uProperties != null) {
             for (Map.Entry<String, Object> entry : uProperties.entrySet()) {
                 unmarshaller.setProperty(entry.getKey(), entry.getValue());
@@ -476,6 +481,9 @@ public abstract class AbstractJAXBProvid
         if (enc != null) {
             marshaller.setProperty(Marshaller.JAXB_ENCODING, enc);
         }
+        if (marshallerListener != null) {
+            marshaller.setListener(marshallerListener);
+        }
         validateObjectIfNeeded(marshaller, obj);
         return marshaller;
     }
@@ -651,6 +659,14 @@ public abstract class AbstractJAXBProvid
         this.depthProperties = depthProperties;
     }
 
+    public void setUnmarshallerListener(Unmarshaller.Listener unmarshallerListener) {
+        this.unmarshallerListener = unmarshallerListener;
+    }
+
+    public void setMarshallerListener(Marshaller.Listener marshallerListener) {
+        this.marshallerListener = marshallerListener;
+    }
+
     @XmlRootElement
     protected static class CollectionWrapper {
         



Mime
View raw message