[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynam...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Nov 7 19:47:37 EST 2014
Author: putmanb
Date: Fri Nov 7 19:47:36 2014
New Revision: 4139
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4139&view=rev
Log:
Track the metadata last update time, in case we want to use it for something later.
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java?rev=4139&r1=4138&r2=4139&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicMetadataResolver.java Fri Nov 7 19:47:36 2014
@@ -435,7 +435,9 @@
EntityManagementData mgmtData = dynamicBackingStore.getManagementData(entityID);
DateTime now = new DateTime(ISOChronology.getInstanceUTC());
- log.debug("For metadata expiration and refresh, computation 'now' is : {}", now);
+ log.debug("For metadata expiration and refresh computation, 'now' is : {}", now);
+
+ mgmtData.setLastUpdateTime(now);
mgmtData.setExpirationTime(computeExpirationTime(entityDescriptor, now));
log.debug("Computed metadata expiration time: {}", mgmtData.getExpirationTime());
@@ -602,6 +604,9 @@
/** The entity ID managed by this instance. */
private String entityID;
+ /** Last update time of the associated metadata. */
+ private DateTime lastUpdateTime;
+
/** Expiration time of the associated metadata. */
private DateTime expirationTime;
@@ -633,6 +638,24 @@
*/
@Nonnull public String getEntityID() {
return entityID;
+ }
+
+ /**
+ * Get the last update time of the metadata.
+ *
+ * @return the last update time, or null if no metadata is yet loaded for the entity
+ */
+ @Nullable public DateTime getLastUpdateTime() {
+ return lastUpdateTime;
+ }
+
+ /**
+ * Set the last update time of the metadata.
+ *
+ * @param dateTime the last update time
+ */
+ public void setLastUpdateTime(@Nonnull final DateTime dateTime) {
+ lastUpdateTime = dateTime;
}
/**
More information about the commits
mailing list