[java-opensaml COMMIT] in /trunk: opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/BasicSAML...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jun 12 23:21:58 EDT 2013
Author: scantor
Date: Wed Jun 12 23:21:58 2013
New Revision: 3370
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3370&view=rev
Log:
Partially reworking expiring object base classes. May get rid of it later.
Modified:
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMap.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapEntryTest.java
trunk/opensaml-util/src/main/java/org/opensaml/util/storage/AbstractExpiringObject.java
trunk/opensaml-util/src/main/java/org/opensaml/util/storage/ExpiringObject.java
trunk/opensaml-util/src/main/java/org/opensaml/util/storage/StorageSerializer.java
Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMap.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMap.java?rev=3370&r1=3369&r2=3370&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMap.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMap.java Wed Jun 12 23:21:58 2013
@@ -97,7 +97,7 @@
if (log.isDebugEnabled()) {
log.debug("Storing new artifact entry '{}' for relying party '{}', expiring at '{}'", new Object[] {
- artifact, relyingPartyId, artifactEntry.getExpirationTime()});
+ artifact, relyingPartyId, artifactEntry.getExpirationDateTime()});
}
artifactStore.put(artifact, artifactEntry);
Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapEntryTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapEntryTest.java?rev=3370&r1=3369&r2=3370&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapEntryTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapEntryTest.java Wed Jun 12 23:21:58 2013
@@ -65,7 +65,7 @@
BasicSAMLArtifactMapEntry origEntry =
new BasicSAMLArtifactMapEntry(artifact, issuerId, rpId, samlObject, lifetime);
- DateTime expectedExpiration = origEntry.getExpirationTime();
+ DateTime expectedExpiration = origEntry.getExpirationDateTime();
Object newObject = serializeAndDeserialize(origEntry);
Assert.assertNotNull(newObject, "Deserialized object was null");
@@ -77,7 +77,7 @@
Assert.assertEquals(newEntry.getArtifact(), artifact, "Invalid value for artifact");
Assert.assertEquals(newEntry.getIssuerId(), issuerId, "Invalid value for issuer ID");
Assert.assertEquals(newEntry.getRelyingPartyId(), rpId, "Invalid value for relying party ID");
- Assert.assertEquals(newEntry.getExpirationTime(), expectedExpiration, "Invalid value for expiration time");
+ Assert.assertEquals(newEntry.getExpirationDateTime(), expectedExpiration, "Invalid value for expiration time");
// Test SAMLObject reconstitution
// It will be unmarshalled and so should already have a DOM
Modified: trunk/opensaml-util/src/main/java/org/opensaml/util/storage/AbstractExpiringObject.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-util/src/main/java/org/opensaml/util/storage/AbstractExpiringObject.java?rev=3370&r1=3369&r2=3370&view=diff
==============================================================================
--- trunk/opensaml-util/src/main/java/org/opensaml/util/storage/AbstractExpiringObject.java (original)
+++ trunk/opensaml-util/src/main/java/org/opensaml/util/storage/AbstractExpiringObject.java Wed Jun 12 23:21:58 2013
@@ -17,42 +17,89 @@
package org.opensaml.util.storage;
-import java.io.Serializable;
+import javax.annotation.Nonnull;
+
+import net.shibboleth.utilities.java.support.logic.Constraint;
import org.joda.time.DateTime;
import org.joda.time.chrono.ISOChronology;
+import org.opensaml.util.storage.annotation.Expiration;
-/** Base implementation for {@link ExpiringObject}. */
- at Deprecated
-public abstract class AbstractExpiringObject implements ExpiringObject, Serializable {
-
- /** Serial version UID. */
- private static final long serialVersionUID = -5862358212935797056L;
+/**
+ * A base class for objects that have a built-in expiration, suitably annotated for use with
+ * a {@link StorageService}.
+ */
+ at Expiration("expiration")
+public abstract class AbstractExpiringObject implements ExpiringObject {
- /** Moment of expiration in UTC. */
- private long expiration;
[... 130 lines stripped ...]
More information about the commits
mailing list