[java-opensaml COMMIT] in /trunk/opensaml-storage-api/src/main/java/org/opensaml/storage: ClientStorageService.java R...

noreply at shibboleth.net noreply at shibboleth.net
Tue Oct 8 14:34:22 EDT 2013


Author: scantor
Date: Tue Oct  8 14:34:22 2013
New Revision: 3463

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3463&view=rev
Log:
Rename and adjust eventual interface for cookie-based store.

Added:
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java
      - copied, changed from r3461, trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/ClientStorageService.java
Modified:
    trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/ClientStorageService.java

Copied: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java (from r3461, trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/ClientStorageService.java)
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java?p2=trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java&p1=trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/ClientStorageService.java&r1=3461&r2=3463&rev=3463&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/ClientStorageService.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java Tue Oct  8 14:34:22 2013
@@ -21,29 +21,38 @@
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
+
+import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
 
 /**
- * Extension of {@link StorageService} that maintains its data with client-side storage.
+ * Specialization of {@link StorageService} that maintains its data on a per-request basis.
+ * 
+ * <p>Clients of this service are required to load/save the data across requests in order to
+ * preserve it.</p>
+ * 
+ * <p>Implementations of this interface are not required to guarantee coherency across requests
+ * operating on the same initial data but must guarantee updates leave data in a consistent
+ * state.</p> 
  */
 @ThreadSafe
-public interface ClientStorageService extends StorageService {
+public interface RequestScopedStorageService extends StorageService {
 
     /**
-     * Reconstitute stored data from client request.
+     * Reconstitute stored data from source.
      * 
-     * @param request   client request
-     * @throws IOException  if an error occurs reconstituing the data
+     * @param source the data to load
+     * 
+     * @throws IOException  if an error occurs reconstituting the data
      */
-    public void load(@Nonnull final ServletRequest request) throws IOException;
+    public void load(@Nonnull @NotEmpty final String source) throws IOException;
     
     /**
-     * Preserve stored data in client.
+     * Writes stored data to a string.
      * 
-     * @param response  response to client
+     * @return  the serialized data
+     * 
      * @throws IOException  if an error occurs preserving the data
      */
-    public void save(@Nonnull final ServletResponse response) throws IOException;
+    @Nonnull @NotEmpty public String save() throws IOException;
     
 }



More information about the commits mailing list