Class HTTPSProtocolURLValidator

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.validate.BaseValidator
net.shibboleth.metadata.validate.url.HTTPSProtocolURLValidator
All Implemented Interfaces:
Validator<URL>, 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

public class HTTPSProtocolURLValidator extends BaseValidator implements Validator<URL>
Validates that a URL has the https protocol.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.shibboleth.metadata.validate.Validator

    Validator.Action
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(URL url, Item<?> item, String callerId, String valueContext)
    Apply the validator to a value in the context of the given Item.

    Methods inherited from class net.shibboleth.metadata.validate.BaseValidator

    addError, addErrorMessage, addErrorMessage, addErrorMessage, addStatus, addWarning, getMessage, makeComponentId, setMessage

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, 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.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.IdentifiableComponent

    setId

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized

    Methods inherited from interface net.shibboleth.metadata.validate.Validator

    validate
  • Constructor Details

    • HTTPSProtocolURLValidator

      public HTTPSProtocolURLValidator()
      Constructor.
  • Method Details

    • validate

      @Nonnull public Validator.Action validate(@Nonnull URL url, @Nonnull Item<?> item, @Nonnull String callerId, @Nullable String valueContext) throws StageProcessingException
      Description copied from interface: Validator
      Apply the validator to a value in the context of the given Item.

      The validator influences future processing by adding item metadata to the Item.

      A common case is that the validator will add a StatusMetadata to the Item, for example a ErrorStatus. In this case, the convention is that the componentId of the ErrorStatus would be created by combining the callerId with a / and the validator's own identifier. For example, a validator val called by a stage stage would normally use a componentId of stage/val.

      The valueContext makes the original context of the value available to help in constructing meaningful error messages. For example, the validation of a complex structured value such as a URI might be broken down into multiple sub-validations of its components: scheme, for example. When relevant, the valueContext provides a representation of the original complex value while value is the component currently being validated.

      Specified by:
      validate in interface Validator<URL>
      Parameters:
      url - the value to be validated
      item - the Item context for the validation
      callerId - a String identifying the caller
      valueContext - an additional String indicating the value context, or null
      Returns:
      an indication of whether to process additional validators
      Throws:
      StageProcessingException - if an error occurs during validation