[java-opensaml COMMIT] in /trunk/opensaml-storage-impl/src: main/java/org/opensaml/storage/impl/client/ClientStorageS...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Aug 26 13:45:23 EDT 2015
Author: scantor
Date: Wed Aug 26 13:45:23 2015
New Revision: 4332
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4332&view=rev
Log:
IDP-594 - Design improvements to the load/save APIs.
Added:
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageServiceOperation.java (with props)
Modified:
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageSaveContext.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageService.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageServiceStore.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/LogLocalStorageSaveResults.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/SaveCookieBackedClientStorageServices.java
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/client/LoadClientStorageServicesTest.java
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContextTest.java
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/client/SaveCookieBackedClientStorageServicesTest.java
Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageSaveContext.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageSaveContext.java?rev=4332&r1=4331&r2=4332&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageSaveContext.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageSaveContext.java Wed Aug 26 13:45:23 2015
@@ -21,7 +21,6 @@
import java.util.Collection;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opensaml.messaging.context.BaseContext;
import org.opensaml.storage.impl.client.ClientStorageService.ClientStorageSource;
@@ -31,8 +30,6 @@
import net.shibboleth.utilities.java.support.annotation.constraint.Live;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
-import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
-import net.shibboleth.utilities.java.support.logic.Constraint;
/**
* A subcontext for driving the saving of data to a client from one or more
@@ -41,7 +38,7 @@
public class ClientStorageSaveContext extends BaseContext {
/** Storage operations to perform. */
- @Nonnull @NonnullElements private Collection<StorageOperation> storageOperations;
+ @Nonnull @NonnullElements private Collection<ClientStorageServiceOperation> storageOperations;
/** Constructor. */
public ClientStorageSaveContext() {
@@ -53,7 +50,7 @@
*
* @return modifiable collection of storage operations
*/
- @Nonnull @NonnullElements @Live public Collection<StorageOperation> getStorageOperations() {
+ @Nonnull @NonnullElements @Live public Collection<ClientStorageServiceOperation> getStorageOperations() {
return storageOperations;
}
@@ -64,81 +61,11 @@
* @return true iff the operations include at least one against the specified source
*/
public boolean isSourceRequired(@Nonnull final ClientStorageSource source) {
- return Iterables.any(storageOperations, new Predicate<StorageOperation>() {
- public boolean apply(StorageOperation input) {
+ return Iterables.any(storageOperations, new Predicate<ClientStorageServiceOperation>() {
+ public boolean apply(ClientStorageServiceOperation input) {
return input.getStorageSource() == source;
}
});
}
-
- /**
- * A wrapper for a storage operation.
- */
- public static class StorageOperation {
-
- /** ID of storage service for tracking/logging. */
- @Nonnull @NotEmpty private final String storageServiceId;
-
- /** Storage key. */
- @Nonnull @NotEmpty private final String storageKey;
-
- /** Storage value. */
- @Nullable @NotEmpty private final String storageValue;
-
- /** Storage source. */
- @Nonnull private final ClientStorageSource storageSource;
-
- /**
- * Constructor.
- *
- * @param id storage service ID
- * @param key storage key to update
- * @param value storage value
- * @param source storage source
- */
- public StorageOperation(@Nonnull @NotEmpty final String id, @Nonnull @NotEmpty final String key,
- @Nullable final String value, @Nonnull final ClientStorageSource source) {
[... 662 lines stripped ...]
More information about the commits
mailing list