[java-opensaml COMMIT] in /trunk: opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 30 12:51:46 EDT 2013
Author: scantor
Date: Wed Oct 30 12:51:46 2013
New Revision: 3492
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3492&view=rev
Log:
Turn request-scoped interface into a marker and rename JSON impl to better reflect the nature.
Added:
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java
- copied, changed from r3491, trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JSONRequestScopedStorageService.java
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/ServletRequestScopedStorageServiceTest.java
- copied, changed from r3491, trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JSONRequestScopedStorageServiceTest.java
Modified:
trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JSONRequestScopedStorageService.java
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JSONRequestScopedStorageServiceTest.java
Modified: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java?rev=3492&r1=3491&r2=3492&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/RequestScopedStorageService.java Wed Oct 30 12:51:46 2013
@@ -17,16 +17,13 @@
package org.opensaml.storage;
-import java.io.IOException;
-
-import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
/**
* 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 will typically be injected with objects or proxies
+ * that supply access to the underlying request/response environment, such as servlets.</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
@@ -35,19 +32,4 @@
@ThreadSafe
public interface RequestScopedStorageService extends StorageService {
- /**
- * Reconstitute stored data.
- *
- * <p>This method must be idempotent with respect to existing state when called more than once.</p>
- *
- * @throws IOException if an error occurs reconstituting the data
- */
- public void load() throws IOException;
-
- /**
- * Write/preserve stored data for subsequent requests.
- *
- * @throws IOException if an error occurs preserving the data
- */
- @Nullable public void save() throws IOException;
}
Copied: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java (from r3491, trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JSONRequestScopedStorageService.java)
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java?p2=trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java&p1=trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JSONRequestScopedStorageService.java&r1=3491&r2=3492&rev=3492&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JSONRequestScopedStorageService.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java Wed Oct 30 12:51:46 2013
@@ -81,25 +81,25 @@
* Implementation of {@link RequestScopedStorageService} that stores data in-memory in a servlet request attribute,
* and reads and writes the data with a secured string form using JSON as the underlying format.
*/
-public class JSONRequestScopedStorageService extends AbstractMapBackedStorageService
+public class ServletRequestScopedStorageService extends AbstractMapBackedStorageService
implements RequestScopedStorageService, Filter {
/** Name of request attribute for context map. */
@Nonnull protected static final String CONTEXT_MAP_ATTRIBUTE =
- "org.opensaml.storage.impl.JSONRequestScopedStorageService.contextMap";
+ "org.opensaml.storage.impl.ServletRequestScopedStorageService.contextMap";
/** Name of request attribute used as a dirty bit. */
@Nonnull protected static final String DIRTY_BIT_ATTRIBUTE =
- "org.opensaml.storage.impl.JSONRequestScopedStorageService.dirty";
+ "org.opensaml.storage.impl.ServletRequestScopedStorageService.dirty";
[... 144 lines stripped ...]
More information about the commits
mailing list