You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2013/05/20 19:19:53 UTC

svn commit: r1484530 - in /cxf/trunk/api/src/main/java/org/apache/cxf/databinding: BaseDataReader.java BaseDataWriter.java DataReader.java DataWriter.java

Author: dkulp
Date: Mon May 20 17:19:53 2013
New Revision: 1484530

URL: http://svn.apache.org/r1484530
Log:
Remove unreferenced BaseDataReader/Writer interfaces, merging methods directly into DataReader/DataWriter

Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/BaseDataReader.java
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/BaseDataWriter.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataReader.java
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataWriter.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataReader.java?rev=1484530&r1=1484529&r2=1484530&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataReader.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataReader.java Mon May 20 17:19:53 2013
@@ -19,7 +19,12 @@
 
 package org.apache.cxf.databinding;
 
+import java.util.Collection;
+
 import javax.xml.namespace.QName;
+import javax.xml.validation.Schema;
+
+import org.apache.cxf.message.Attachment;
 import org.apache.cxf.service.model.MessagePartInfo;
 
 /**
@@ -27,7 +32,34 @@ import org.apache.cxf.service.model.Mess
  * from a source of type T.
  * @param <T> The type of the source. Each data binding defines the set of source types that it supports.
  */
-public interface DataReader<T> extends BaseDataReader {
+public interface DataReader<T> {
+    
+    String FAULT = DataReader.class.getName() + "Fault";
+    String ENDPOINT = DataReader.class.getName() + "Endpoint";
+    /**
+     * Supply a schema to validate the input. Bindings silently ignore this parameter if they
+     * do not support schema validation, or the particular form of validation implied by
+     * a particular form of Schema.
+     * @param s
+     */
+    void setSchema(Schema s);
+    
+    /**
+     * Attach a collection of attachments to a binding. This permits a binding to process the contents
+     * of one or more attachments as part of reading from this reader.
+     * @param attachments attachments.
+     */    
+    void setAttachments(Collection<Attachment> attachments);
+    
+    /**
+     * Set an arbitrary property on the reader.
+     * {@link #FAULT} and {@link #ENDPOINT} specify two common properties: the Fault object being read
+     * and the {@link org.apache.cxf.endpoint.Endpoint}.
+     * @param prop Name of the property.
+     * @param value Value of the property.
+     */
+    void setProperty(String prop, Object value);    
+    
     /**
      * Read an object from the input.
      * @param input input source object.

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataWriter.java?rev=1484530&r1=1484529&r2=1484530&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataWriter.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataWriter.java Mon May 20 17:19:53 2013
@@ -19,6 +19,11 @@
 
 package org.apache.cxf.databinding;
 
+import java.util.Collection;
+
+import javax.xml.validation.Schema;
+
+import org.apache.cxf.message.Attachment;
 import org.apache.cxf.service.model.MessagePartInfo;
 
 /**
@@ -26,10 +31,28 @@ import org.apache.cxf.service.model.Mess
  * objects to a 'sink' of type T.
  * @param <T> The type of sink. Each data binding defines the set of sink types that it supports.
  */
-public interface DataWriter<T> extends BaseDataWriter {
+public interface DataWriter<T> {
     String ENDPOINT = DataWriter.class.getName() + "Endpoint";
     
     /**
+     * Attach a schema to the writer. If the binding supports validation, it will
+     * validate the XML that it produces (assuming that it produces XML). 
+     * @param s the schema.
+     */
+    void setSchema(Schema s);
+    /**
+     * Attach a collection of attachments to this writer.
+     * @param attachments
+     */
+    void setAttachments(Collection<Attachment> attachments);
+    /**
+     * Set a property for the writer.
+     * @param key property key 
+     * @param value property value.
+     */
+    void setProperty(String key, Object value);
+    
+    /**
      * Write an object to an output sink.
      * @param obj the object to write.
      * @param output the output sink.