abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r600750 - in /incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol: EntityProvider.java util/AbstractEntityProvider.java
Date Tue, 04 Dec 2007 00:49:05 GMT
Author: jmsnell
Date: Mon Dec  3 16:49:05 2007
New Revision: 600750

URL: http://svn.apache.org/viewvc?rev=600750&view=rev
Log:
make EntityProvider an interface with an abstract base impl.

Added:
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractEntityProvider.java
Modified:
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityProvider.java

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityProvider.java?rev=600750&r1=600749&r2=600750&view=diff
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityProvider.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityProvider.java
Mon Dec  3 16:49:05 2007
@@ -27,31 +27,31 @@
  * interface.  The EntityProvider interface can be implemented by applications
  * to provide an efficient means of serializing non-FOM objects to Atom/XML. 
  */
-public abstract class EntityProvider {
+public interface EntityProvider {
 
   /**
    * Write to the specified StreamWriter
    */
-  public abstract void writeTo(StreamWriter sw);
+  void writeTo(StreamWriter sw);
  
   /**
    * True if the serialization is repeatable. 
    */
-  public abstract boolean isRepeatable();
+  boolean isRepeatable();
   
   /**
    * Return the mime content type of the serialized entity
    */
-  public abstract String getContentType();
+  String getContentType();
   
   /**
    * Return the EntityTag of the entity,
    */
-  public EntityTag getEntityTag() { return null; }
+  EntityTag getEntityTag();
   
   /**
    * Return the Last-Modified date of the entity
    */
-  public Date getLastModified() { return null; }
+  Date getLastModified();
   
 }

Added: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractEntityProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractEntityProvider.java?rev=600750&view=auto
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractEntityProvider.java
(added)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractEntityProvider.java
Mon Dec  3 16:49:05 2007
@@ -0,0 +1,36 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.protocol.util;
+
+import java.util.Date;
+
+import org.apache.abdera.protocol.EntityProvider;
+import org.apache.abdera.util.EntityTag;
+
+public abstract class AbstractEntityProvider 
+  implements EntityProvider {
+  
+  public String getContentType() {
+    return "application/xml";
+  }
+  
+  public EntityTag getEntityTag() { return null; }
+  
+  public Date getLastModified() { return null; }
+  
+}



Mime
View raw message