abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r438660 - in /incubator/abdera/java/trunk: client/src/main/java/org/apache/abdera/protocol/client/ protocol/src/main/java/org/apache/abdera/protocol/ protocol/src/main/java/org/apache/abdera/protocol/util/ server/src/main/java/org/apache/ab...
Date Wed, 30 Aug 2006 21:55:50 GMT
Author: jmsnell
Date: Wed Aug 30 14:55:49 2006
New Revision: 438660

URL: http://svn.apache.org/viewvc?rev=438660&view=rev
Log:
Support for the APP Slug header on both the client and server, in both request and 
responses

Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/exceptions/AbderaServerException.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractResponseContext.java

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
Wed Aug 30 14:55:49 2006
@@ -237,10 +237,6 @@
     setHeader("Slug", slug);
   }
   
-  public String getSlug() {
-    return getHeader("Slug");
-  }
-  
   public void setCacheControl(String cc) {
     CacheControlUtil.parseCacheControl(cc, this);
   }

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java
Wed Aug 30 14:55:49 2006
@@ -45,6 +45,8 @@
   
   String getCacheControl();
   
+  String getSlug();
+  
   MimeType getContentType() throws MimeTypeParseException;
   
   Date getDateHeader(String name);

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
Wed Aug 30 14:55:49 2006
@@ -56,6 +56,8 @@
   
   public URI getLocation() throws URISyntaxException;
   
+  public String getSlug();
+  
   public Date getDateHeader(String name);
   
   public URI getUriHeader(String name) throws URISyntaxException;

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
Wed Aug 30 14:55:49 2006
@@ -54,6 +54,10 @@
   public String getCacheControl() {
     return getHeader("Cache-Control");
   }
+  
+  public String getSlug() {
+    return getHeader("Slug");
+  }
 
   public MimeType getContentType() throws MimeTypeParseException {
     String value = getHeader("Content-Type");

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
Wed Aug 30 14:55:49 2006
@@ -60,6 +60,10 @@
   public URI getContentLocation() throws URISyntaxException {
     return getUriHeader("Content-Location");
   }
+  
+  public String getSlug() {
+    return getHeader("Slug");
+  }
 
   public MimeType getContentType() throws MimeTypeParseException {
     String value = getHeader("Content-Type");

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/exceptions/AbderaServerException.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/exceptions/AbderaServerException.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/exceptions/AbderaServerException.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/exceptions/AbderaServerException.java
Wed Aug 30 14:55:49 2006
@@ -204,6 +204,10 @@
   public URI getContentLocation() throws URISyntaxException {
     return context.getContentLocation();
   }
+  
+  public String getSlug() {
+    return context.getSlug();
+  }
 
   public MimeType getContentType() throws MimeTypeParseException {
     return context.getContentType();

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractResponseContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractResponseContext.java?rev=438660&r1=438659&r2=438660&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractResponseContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractResponseContext.java
Wed Aug 30 14:55:49 2006
@@ -180,6 +180,14 @@
     setHeader("Content-Location", uri);
   }
   
+  public void setSlug(String slug) {
+    if (slug == null) {
+      removeHeader("Slug");
+      return;
+    }
+    setHeader("Slug", slug);
+  }
+  
   public void setContentType(String type) {
     if (type == null) {
       removeHeader("Content-Type");



Mime
View raw message