Class PIInSolrValidator

java.lang.Object
io.goobi.viewer.faces.validators.PIInSolrValidator
All Implemented Interfaces:
jakarta.faces.validator.Validator<String>, EventListener

public class PIInSolrValidator extends Object implements jakarta.faces.validator.Validator<String>
Syntax validator for passwords addresses.
  • Constructor Details

    • PIInSolrValidator

      public PIInSolrValidator()
  • Method Details

    • validate

      public void validate(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, String value) throws jakarta.faces.validator.ValidatorException
      Specified by:
      validate in interface jakarta.faces.validator.Validator<String>
      Throws:
      jakarta.faces.validator.ValidatorException
    • validatePi

      public static boolean validatePi(String pi) throws IndexUnreachableException, PresentationException
      Checks if the given pi matches a known PI in the solr index. If the pi is empty, true is returned to allow not setting any pi
      Parameters:
      pi - a String object.
      Returns:
      false if no current collection is set, the pi does not match any known work
      Throws:
      IndexUnreachableException - if any.
      PresentationException - if any.