Title: [waffle-scm] [492] trunk/waffle-core/src/main/java/org/codehaus/waffle/io: WAFFLE-50: Moved serializers to o.c.waffle.io package.

Diff

Copied: trunk/waffle-core/src/main/java/org/codehaus/waffle/io/Serializer.java (from rev 491, trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/Serializer.java) (0 => 492)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/io/Serializer.java	                        (rev 0)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/io/Serializer.java	2007-12-15 16:12:51 UTC (rev 492)
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (C) 2005,2006 Michael Ward                                      *
+ * All rights reserved.                                                      *
+ * ------------------------------------------------------------------------- *
+ * The software in this package is published under the terms of the BSD      *
+ * style license a copy of which has been included with this distribution in *
+ * the LICENSE.txt file.                                                     *
+ *                                                                           *
+ * Original code by: Mauro Talevi                                            *
+ *****************************************************************************/
+package org.codehaus.waffle.io;
+
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * Serializer is responsible for marshalling and unmarshalling objects.
+ * 
+ * @author Mauro Talevi
+ */
+public interface Serializer {
+
+    /**
+     * Marshalls object to a writer
+     * 
+     * @param object the Object to marshall
+     * @param writer the writer to which the object is marshalled
+     */
+    void marshall(Object object, Writer writer);
+
+    /**
+     * Unmarshalls object from reader input
+     * 
+     * @param reader the input resource
+     * @return An unmarshalled Object
+     */
+    Object unmarshall(Reader reader);
+
+}

Copied: trunk/waffle-core/src/main/java/org/codehaus/waffle/io/XStreamSerializer.java (from rev 491, trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/XStreamSerializer.java) (0 => 492)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/io/XStreamSerializer.java	                        (rev 0)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/io/XStreamSerializer.java	2007-12-15 16:12:51 UTC (rev 492)
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (C) 2005,2006 Michael Ward                                      *
+ * All rights reserved.                                                      *
+ * ------------------------------------------------------------------------- *
+ * The software in this package is published under the terms of the BSD      *
+ * style license a copy of which has been included with this distribution in *
+ * the LICENSE.txt file.                                                     *
+ *                                                                           *
+ * Original code by: Mauro Talevi                                            *
+ *****************************************************************************/
+package org.codehaus.waffle.io;
+
+import java.io.Reader;
+import java.io.Writer;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+
+/**
+ * XStream-based serializer.  Delegates to XStream the marshalling.
+ * 
+ * @author Mauro Talevi
+ */
+public class XStreamSerializer implements Serializer {
+    
+    private XStream xstream;
+    
+    /**
+     * Creates a XStreamSerializer with default XStream instance with minimal dependencies
+     */
+    public XStreamSerializer(){
+        this(new XStream(new DomDriver()));
+    }
+
+    /**
+     * Creates a XStreamSerializer with a given XStream instance
+     * @param xstream the XStream instance
+     */
+    public XStreamSerializer(XStream xstream) {
+        this.xstream = xstream;
+    }
+
+    public void marshall(Object object, Writer writer) {
+        xstream.toXML(object, writer);
+    }
+
+    public Object unmarshall(Reader reader) {
+        return xstream.fromXML(reader);
+    }
+
+}

Deleted: trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/Serializer.java (491 => 492)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/Serializer.java	2007-12-15 16:07:59 UTC (rev 491)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/Serializer.java	2007-12-15 16:12:51 UTC (rev 492)
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2005,2006 Michael Ward                                      *
- * All rights reserved.                                                      *
- * ------------------------------------------------------------------------- *
- * The software in this package is published under the terms of the BSD      *
- * style license a copy of which has been included with this distribution in *
- * the LICENSE.txt file.                                                     *
- *                                                                           *
- * Original code by: Mauro Talevi                                            *
- *****************************************************************************/
-package org.codehaus.waffle.serialisation;
-
-import java.io.Reader;
-import java.io.Writer;
-
-/**
- * Serializer is responsible for marshalling and unmarshalling objects.
- * 
- * @author Mauro Talevi
- */
-public interface Serializer {
-
-    /**
-     * Marshalls object to a writer
-     * 
-     * @param object the Object to marshall
-     * @param writer the writer to which the object is marshalled
-     */
-    void marshall(Object object, Writer writer);
-
-    /**
-     * Unmarshalls object from reader input
-     * 
-     * @param reader the input resource
-     * @return An unmarshalled Object
-     */
-    Object unmarshall(Reader reader);
-
-}

Deleted: trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/XStreamSerializer.java (491 => 492)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/XStreamSerializer.java	2007-12-15 16:07:59 UTC (rev 491)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/serialisation/XStreamSerializer.java	2007-12-15 16:12:51 UTC (rev 492)
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2005,2006 Michael Ward                                      *
- * All rights reserved.                                                      *
- * ------------------------------------------------------------------------- *
- * The software in this package is published under the terms of the BSD      *
- * style license a copy of which has been included with this distribution in *
- * the LICENSE.txt file.                                                     *
- *                                                                           *
- * Original code by: Mauro Talevi                                            *
- *****************************************************************************/
-package org.codehaus.waffle.serialisation;
-
-import java.io.Reader;
-import java.io.Writer;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.xml.DomDriver;
-
-/**
- * XStream-based serializer.  Delegates to XStream the marshalling.
- * 
- * @author Mauro Talevi
- */
-public class XStreamSerializer implements Serializer {
-    
-    private XStream xstream;
-    
-    /**
-     * Creates a XStreamSerializer with default XStream instance with minimal dependencies
-     */
-    public XStreamSerializer(){
-        this(new XStream(new DomDriver()));
-    }
-
-    /**
-     * Creates a XStreamSerializer with a given XStream instance
-     * @param xstream the XStream instance
-     */
-    public XStreamSerializer(XStream xstream) {
-        this.xstream = xstream;
-    }
-
-    public void marshall(Object object, Writer writer) {
-        xstream.toXML(object, writer);
-    }
-
-    public Object unmarshall(Reader reader) {
-        return xstream.fromXML(reader);
-    }
-
-}

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/view/XMLView.java (491 => 492)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/view/XMLView.java	2007-12-15 16:07:59 UTC (rev 491)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/view/XMLView.java	2007-12-15 16:12:51 UTC (rev 492)
@@ -9,8 +9,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.codehaus.waffle.Constants;
-import org.codehaus.waffle.serialisation.Serializer;
-import org.codehaus.waffle.serialisation.XStreamSerializer;
+import org.codehaus.waffle.io.Serializer;
+import org.codehaus.waffle.io.XStreamSerializer;
 
 import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.converters.collections.CollectionConverter;


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to