Class BaseUrlValidator<T extends Annotation>

java.lang.Object
com.atlassian.bitbucket.validation.BaseUrlValidator<T>
All Implemented Interfaces:
javax.validation.ConstraintValidator<T,String>
Direct Known Subclasses:
HttpURLValidator

public abstract class BaseUrlValidator<T extends Annotation> extends Object implements javax.validation.ConstraintValidator<T,String>
Base class to validate the base URL of the HTTP and SSH protocols.
  • Field Details

    • allowPath

      protected final boolean allowPath
    • schemes

      protected final Set<String> schemes
  • Constructor Details

    • BaseUrlValidator

      protected BaseUrlValidator(boolean allowPath, String... schemes)
  • Method Details

    • isValid

      public boolean isValid(String value, javax.validation.ConstraintValidatorContext context)
      Specified by:
      isValid in interface javax.validation.ConstraintValidator<T extends Annotation,String>
    • isValid

      protected boolean isValid(URI uri)