net.shibboleth.metadata.dom.saml
Class ValidateValidUntilStage

java.lang.Object
  extended by net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
      extended by net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
          extended by net.shibboleth.metadata.pipeline.BaseStage<ItemType>
              extended by net.shibboleth.metadata.pipeline.BaseIteratingStage<DomElementItem>
                  extended by net.shibboleth.metadata.dom.saml.ValidateValidUntilStage
All Implemented Interfaces:
Stage<DomElementItem>, net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.IdentifiableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent

@ThreadSafe
public class ValidateValidUntilStage
extends BaseIteratingStage<DomElementItem>

Checks that a SAML EntitiesDescriptor or EntityDescriptor's validUntil is (optionally) present and is within a given range. Items which are not a SAML EntitiesDescriptor or EntityDescriptor are ignored.


Field Summary
private  long maxValidityInterval
          Interval, in milliseconds, from now within which the validUntil date must fall.
private  boolean requireValidUntil
          Whether the item is required to have a validUntil attribute.
 
Constructor Summary
ValidateValidUntilStage()
           
 
Method Summary
protected  boolean doExecute(DomElementItem item)
          Processes a given Item.
protected  void doInitialize()
          
 long getMaxValidityInterval()
          Gets the interval, in milliseconds, from now within which the validUntil date must fall.
 boolean isRequireValidUntil()
          Gets whether the item is required to have a validUntil attribute.
 void setMaxValidityInterval(long interval)
          Sets the interval, in milliseconds, from now within which the validUntil date must fall.
 void setRequireValidUntil(boolean isRequired)
          Sets whether the item is required to have a validUntil attribute.
 
Methods inherited from class net.shibboleth.metadata.pipeline.BaseIteratingStage
doExecute
 
Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage
execute, setId
 
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
getId
 
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent
getId
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
 

Field Detail

requireValidUntil

private boolean requireValidUntil
Whether the item is required to have a validUntil attribute. Default value: true


maxValidityInterval

private long maxValidityInterval
Interval, in milliseconds, from now within which the validUntil date must fall. A value of 0 indicates that no maximum interval is checked. Default value: 1 week

Constructor Detail

ValidateValidUntilStage

public ValidateValidUntilStage()
Method Detail

isRequireValidUntil

public boolean isRequireValidUntil()
Gets whether the item is required to have a validUntil attribute.

Returns:
whether the item is required to have a validUntil attribute

setRequireValidUntil

public void setRequireValidUntil(boolean isRequired)
Sets whether the item is required to have a validUntil attribute.

Parameters:
isRequired - whether the item is required to have a validUntil attribute

getMaxValidityInterval

public long getMaxValidityInterval()
Gets the interval, in milliseconds, from now within which the validUntil date must fall.

Returns:
Interval, in milliseconds, from now within which the validUntil date must fall

setMaxValidityInterval

public void setMaxValidityInterval(long interval)
Sets the interval, in milliseconds, from now within which the validUntil date must fall. A value of 0 indicates that there is no check on the upper bound of the validity period.

Parameters:
interval - interval, in milliseconds, from now within which the validUntil date must fall; must be greater than or equal to 0

doExecute

protected boolean doExecute(@Nonnull
                            DomElementItem item)
                     throws StageProcessingException
Processes a given Item.

Specified by:
doExecute in class BaseIteratingStage<DomElementItem>
Parameters:
item - Item on which to operate
Returns:
true if the Item should be retained in the collection, false if not
Throws:
StageProcessingException - thrown if there is a problem with the stage processing

doInitialize

protected void doInitialize()
                     throws net.shibboleth.utilities.java.support.component.ComponentInitializationException

Overrides:
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException


Copyright © 1999-2012. All Rights Reserved.