T
- the contained typepublic interface MetadataContainer<T extends TimeBoundSAMLObject & SignableSAMLObject & CacheableSAMLObject>
EntityDescriptor
or EntitiesDescriptor
in a container and defines
useful method - mainly for publishing the metadata for an entity or a federation.Modifier and Type | Method and Description |
---|---|
T |
cloneDescriptor()
Returns a deep clone of the descriptor element that is encapsulated by this object.
|
T |
getDescriptor()
Returns the metadata element that is encapsulated by this object.
|
float |
getUpdateFactor()
Returns the factor (between 0 and 1) that is used to compute whether it is time to update the contained
descriptor.
|
Duration |
getValidity()
Returns the duration of the validity that the encapsulated descriptor has.
|
Element |
marshall()
Marshals the encapsulated descriptor into its XML representation.
|
T |
sign()
Signs the encapsulated descriptor using the signature credentials configured for this object.
|
T |
update(boolean sign)
Updates the encapsulated descriptor with a newly generated ID, a validity time according to this
object's configuration, and then optionally signs the record.
|
boolean |
updateRequired(boolean signatureRequired)
Predicate that returns
true if the contained descriptor needs to be updated regarding its signature
status and validity. |
T getDescriptor()
T cloneDescriptor() throws MarshallingException, UnmarshallingException
MarshallingException
- for marshalling errors of the objectUnmarshallingException
- for unmarshalling errors of the objectboolean updateRequired(boolean signatureRequired)
true
if the contained descriptor needs to be updated regarding its signature
status and validity. The method will also take into account the update interval configured for this instance of the
container.signatureRequired
- should be set if signatures are required for a entry to be regarded validtrue
is returned, otherwise
false
T update(boolean sign) throws SignatureException, MarshallingException
sign
- flag that should be set if the metadata is to be signedSignatureException
- for signature errorsMarshallingException
- for marshalling errorssign()
T sign() throws SignatureException, MarshallingException
SignatureException
- for signature errorsMarshallingException
- for marshalling errorsupdate(boolean)
Element marshall() throws MarshallingException
MarshallingException
- for marshalling errorsDuration getValidity()
float getUpdateFactor()
if (expireInstant > now) {
return <update-required>
}
else {
return (updateFactor * getValidity()) > (expireInstant - now) ? <update-required> : <no-update-required>
}
The easiest way to get the meaning of the update factor is perhaps using words. Suppose the update factor is 0,5,
then the meaning is: "update the metadata when less than 50% of its original validity time remains".Copyright © 2018 Litsec AB. All rights reserved.