[java-opensaml COMMIT] in /trunk: opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageSer...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Sep 29 16:03:30 EDT 2014
Author: scantor
Date: Mon Sep 29 16:03:30 2014
New Revision: 4090
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4090&view=rev
Log:
Change SS update methods to return a boolean.
Modified:
trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java
trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java
trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageService.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/LDAPStorageService.java
Modified: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java?rev=4090&r1=4089&r2=4090&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java Mon Sep 29 16:03:30 2014
@@ -112,10 +112,10 @@
}
/** {@inheritDoc} */
- @Nullable public Long update(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key,
+ @Nullable public boolean update(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key,
@Nonnull @NotEmpty final String value, @Nullable final Long expiration) throws IOException {
try {
- return updateImpl(null, context, key, value, expiration);
+ return updateImpl(null, context, key, value, expiration) != null;
} catch (VersionMismatchException e) {
throw new IOException("Unexpected exception thrown by update.", e);
}
@@ -129,10 +129,10 @@
}
/** {@inheritDoc} */
- @Nullable public Long updateExpiration(@Nonnull @NotEmpty final String context,
+ @Nullable public boolean updateExpiration(@Nonnull @NotEmpty final String context,
@Nonnull @NotEmpty final String key, @Nullable final Long expiration) throws IOException {
try {
- return updateImpl(null, context, key, null, expiration);
+ return updateImpl(null, context, key, null, expiration) != null;
} catch (VersionMismatchException e) {
throw new IOException("Unexpected exception thrown by update.", e);
}
Modified: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java?rev=4090&r1=4089&r2=4090&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java (original)
+++ trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractStorageService.java Mon Sep 29 16:03:30 2014
@@ -236,7 +236,7 @@
}
/** {@inheritDoc} */
- @Override @Nullable public Long update(@Nonnull @NotEmpty final String context,
+ @Override @Nullable public boolean update(@Nonnull @NotEmpty final String context,
@Nonnull @NotEmpty final String key, @Nonnull final Object value,
@Nonnull final StorageSerializer serializer, @Nullable @Positive final Long expiration) throws IOException {
return update(context, key, serializer.serialize(value), expiration);
@@ -254,7 +254,7 @@
// Checkstyle: ParameterNumber ON
/** {@inheritDoc} */
- @Override @Nullable public Long update(@Nonnull final Object value) throws IOException {
+ @Override @Nullable public boolean update(@Nonnull final Object value) throws IOException {
return update(AnnotationSupport.getContext(value), AnnotationSupport.getKey(value),
AnnotationSupport.getValue(value), AnnotationSupport.getExpiration(value));
}
@@ -267,7 +267,7 @@
}
/** {@inheritDoc} */
- @Override @Nullable public Long updateExpiration(@Nonnull final Object value) throws IOException {
+ @Override @Nullable public boolean updateExpiration(@Nonnull final Object value) throws IOException {
return updateExpiration(AnnotationSupport.getContext(value), AnnotationSupport.getKey(value),
AnnotationSupport.getExpiration(value));
}
Modified: trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageService.java?rev=4090&r1=4089&r2=4090&view=diff
==============================================================================
--- trunk/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageService.java (original)
[... 142 lines stripped ...]
More information about the commits
mailing list