public abstract class BaseHyphenatedIdentifierValidator extends Object implements IdentifierValidator
| Constructor and Description |
|---|
BaseHyphenatedIdentifierValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAllowedIdentifier(String undecoratedIdentifier) |
abstract String |
getAllowedCharacters() |
protected abstract int |
getCheckDigit(String undecoratedIdentifier) |
abstract String |
getName() |
String |
getValidIdentifier(String undecoratedIdentifier) |
boolean |
isValid(String identifier) |
protected abstract int getCheckDigit(String undecoratedIdentifier)
public abstract String getAllowedCharacters()
getAllowedCharacters in interface IdentifierValidatorIdentifierValidator.getAllowedCharacters()public abstract String getName()
getName in interface IdentifierValidatorIdentifierValidator.getName()public String getValidIdentifier(String undecoratedIdentifier) throws UnallowedIdentifierException
getValidIdentifier in interface IdentifierValidatorundecoratedIdentifier - The identifier prior to being given a check digit or other form
of validation.UnallowedIdentifierException - if the identifier contains unallowed characters or is
otherwise not appropriate for this validator.IdentifierValidator.getValidIdentifier(java.lang.String)public boolean isValid(String identifier) throws UnallowedIdentifierException
isValid in interface IdentifierValidatoridentifier - The Identifier to check.UnallowedIdentifierException - if the identifier contains unallowed characters or is
otherwise not appropriate for this validator.IdentifierValidator.isValid(java.lang.String)protected void checkAllowedIdentifier(String undecoratedIdentifier) throws UnallowedIdentifierException
undecoratedIdentifier - UnallowedIdentifierException - if identifier contains unallowed characters or is
otherwise invalid.Copyright © 2024 OpenMRS Inc.. All rights reserved.