Package io.goobi.viewer.faces.validators
Class PIInSolrValidator
java.lang.Object
io.goobi.viewer.faces.validators.PIInSolrValidator
- All Implemented Interfaces:
Validator<String>,EventListener
Syntax validator for passwords addresses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(FacesContext context, UIComponent component, String value) static booleanvalidatePi(String pi) Checks if the given pi matches a known PI in the solr index.
-
Constructor Details
-
PIInSolrValidator
public PIInSolrValidator()
-
-
Method Details
-
validate
public void validate(FacesContext context, UIComponent component, String value) throws ValidatorException - Specified by:
validatein interfaceValidator<String>- Throws:
ValidatorException
-
validatePi
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- persistent identifier to look up in the Solr index- Returns:
- false if no current collection is set, the pi does not match any known work
- Throws:
IndexUnreachableException- if any.PresentationException- if any.
-