Package net.shibboleth.metadata.dom.saml
Class PullUpValidUntilStage
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.AbstractStage<T>
net.shibboleth.metadata.pipeline.AbstractIteratingStage<Element>
net.shibboleth.metadata.dom.saml.PullUpValidUntilStage
- All Implemented Interfaces:
Stage<Element>,net.shibboleth.shared.component.Component,net.shibboleth.shared.component.DestructableComponent,net.shibboleth.shared.component.IdentifiableComponent,net.shibboleth.shared.component.IdentifiedComponent,net.shibboleth.shared.component.InitializableComponent
For each Item collection element that is a SAML EntitiesDescriptor this stage will scan all descendant
EntitiesDescriptors and EntityDescriptors, determine the earliest valid until date, set that on the root
EntitiesDescriptor and remove the valid until dates from all descendants.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidProcesses a givenItem.final DurationGets the maximum amount of time a descriptor may be valid.final DurationGets the minimum amount of time a descriptor may be valid.protected InstantgetNearestValidUntil(Element descriptor) Gets the shortest cache duration for a given entity and entities descriptor and all its descendant descriptors.voidsetMaximumValidityDuration(Duration duration) Sets the maximum amount of time a descriptor may be valid.voidsetMinimumValidityDuration(Duration duration) Sets the minimum amount of time a descriptor may be valid.protected voidsetValidUntil(Element descriptor, Instant validUntil) Sets the valid until instant on the given descriptor.Methods inherited from class net.shibboleth.metadata.pipeline.AbstractIteratingStage
doExecuteMethods inherited from class net.shibboleth.metadata.pipeline.AbstractStage
execute, getCollectionPredicate, setCollectionPredicateMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
minValidityDuration
The minimum amount of time a descriptor may be valid. Default value: 0 -
maxValidityDuration
The maximum amount of time a descriptor may be valid. Default value: 9223372036854775807L
-
-
Constructor Details
-
PullUpValidUntilStage
public PullUpValidUntilStage()
-
-
Method Details
-
getMinimumValidityDuration
Gets the minimum amount of time a descriptor may be valid.- Returns:
- minimum amount of time a descriptor may be valid, always 0 or greater
-
setMinimumValidityDuration
Sets the minimum amount of time a descriptor may be valid.- Parameters:
duration- minimum amount of time a descriptor may be valid
-
getMaximumValidityDuration
Gets the maximum amount of time a descriptor may be valid.- Returns:
- maximum maximum amount of time a descriptor may be valid, always greater than 0
-
setMaximumValidityDuration
Sets the maximum amount of time a descriptor may be valid.- Parameters:
duration- maximum amount of time a descriptor may be valid, must be greater than 0
-
doExecute
Description copied from class:AbstractIteratingStageProcesses a givenItem.- Specified by:
doExecutein classAbstractIteratingStage<Element>- Parameters:
item-Itemon which to operate- Throws:
StageProcessingException- thrown if there is a problem with the stage processing
-
getNearestValidUntil
Gets the shortest cache duration for a given entity and entities descriptor and all its descendant descriptors.- Parameters:
descriptor- descriptor from which to get the shortest cache duration- Returns:
- the shortest cache duration from the descriptor and its descendants or null if the descriptor does not contain a cache duration
-
setValidUntil
Sets the valid until instant on the given descriptor. If the given validUntil is null no instant is set. If the given validUntil is less than now +minValidityDurationthen the instant of now + the minimum duration is set. If the given validUntil is greater than now +maxValidityDurationthen the instant of now + the maximum duration is set. Otherwise the given instant is set.- Parameters:
descriptor- entity or entities descriptor to receive the validUntil, never nullvalidUntil- validUntil time to be set on the given descriptor
-