Class BaseStringRegexValidator

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.string.BaseStringRegexValidator
All Implemented Interfaces:
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
Direct Known Subclasses:
AcceptStringRegexValidator, RejectStringRegexValidator

@ThreadSafe public abstract class BaseStringRegexValidator extends BaseValidator
A base class for Validators that match String values against a regular expression.
Since:
0.10.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Pattern
    Compiled regular expression to use in match operations.
    private String
    Regular expression to be accepted by this validator.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected final Pattern
    Get the compiled regular expression for use in matching.
    final String
    Returns the regular expression.
    void
    Sets the regular expression to be accepted.

    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

    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.IdentifiedComponent

    getId
  • Field Details

    • regex

      @NonnullAfterInit private String regex
      Regular expression to be accepted by this validator.
    • pattern

      @NonnullAfterInit private Pattern pattern
      Compiled regular expression to use in match operations.
  • Constructor Details

    • BaseStringRegexValidator

      public BaseStringRegexValidator()
  • Method Details

    • getRegex

      @NonnullAfterInit public final String getRegex()
      Returns the regular expression.
      Returns:
      Returns the regular expression.
    • setRegex

      public void setRegex(@Nonnull String r)
      Sets the regular expression to be accepted.
      Parameters:
      r - the regular expression to set.
    • getPattern

      protected final Pattern getPattern()
      Get the compiled regular expression for use in matching.
      Returns:
      the compiled Pattern
    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException