public class RequiredValidUntilFilter extends Object implements MetadataFilter
validUntil attribute on the root element of the
metadata document. It can optionally also enforce that the validity period (now minus validUntil date)
is not longer than a specified amount.
A maximum validity interval of less than 1 means the no restriction is placed on the metadata's
validUntil attribute.| Constructor and Description |
|---|
RequiredValidUntilFilter()
Constructor.
|
RequiredValidUntilFilter(long maxValidity)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doFilter(org.opensaml.xml.XMLObject metadata)
Filters the given metadata, perhaps to remove elements that are not wanted.
|
long |
getMaxValidityInterval()
Gets the maximum internal, in milliseconds, between now and the
validUntil date. |
protected org.joda.time.DateTime |
getValidUntil(org.opensaml.xml.XMLObject metadata)
Gets the validUntil time of the metadata, if present.
|
public RequiredValidUntilFilter()
public RequiredValidUntilFilter(long maxValidity)
maxValidity - maximum internal, in seconds, between now and the validUntil datepublic long getMaxValidityInterval()
validUntil date. A value of less than 1
indicates that there is no restriction.validUntil datepublic void doFilter(org.opensaml.xml.XMLObject metadata)
throws FilterException
doFilter in interface MetadataFiltermetadata - the metadata to be filtered.FilterException - thrown if an error occurs during the filtering processprotected org.joda.time.DateTime getValidUntil(org.opensaml.xml.XMLObject metadata)
throws FilterException
metadata - metadata from which to get the validUntil instantFilterException - thrown if the given XML object is not an EntitiesDescriptor or
EntityDescriptorCopyright © 1999–2015. All rights reserved.