Class PIInSolrValidator

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

public class PIInSolrValidator extends Object implements javax.faces.validator.Validator<String>
Syntax validator for passwords addresses.
  • Field Summary

    Fields inherited from interface javax.faces.validator.Validator

    NOT_IN_RANGE_MESSAGE_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
    static boolean
    Checks if the given pi matches a known PI in the solr index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PIInSolrValidator

      public PIInSolrValidator()
  • Method Details

    • validate

      public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value) throws javax.faces.validator.ValidatorException
      Specified by:
      validate in interface javax.faces.validator.Validator<String>
      Throws:
      javax.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.