public abstract class BaseHyphenatedIdentifierValidator extends java.lang.Object implements IdentifierValidator
Constructor and Description |
---|
BaseHyphenatedIdentifierValidator() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAllowedIdentifier(java.lang.String undecoratedIdentifier) |
abstract java.lang.String |
getAllowedCharacters() |
protected abstract int |
getCheckDigit(java.lang.String undecoratedIdentifier) |
abstract java.lang.String |
getName() |
java.lang.String |
getValidIdentifier(java.lang.String undecoratedIdentifier) |
boolean |
isValid(java.lang.String identifier) |
protected abstract int getCheckDigit(java.lang.String undecoratedIdentifier)
public abstract java.lang.String getAllowedCharacters()
getAllowedCharacters
in interface IdentifierValidator
IdentifierValidator.getAllowedCharacters()
public abstract java.lang.String getName()
getName
in interface IdentifierValidator
IdentifierValidator.getName()
public java.lang.String getValidIdentifier(java.lang.String undecoratedIdentifier) throws UnallowedIdentifierException
getValidIdentifier
in interface IdentifierValidator
undecoratedIdentifier
- 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(java.lang.String identifier) throws UnallowedIdentifierException
isValid
in interface IdentifierValidator
identifier
- 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(java.lang.String undecoratedIdentifier) throws UnallowedIdentifierException
undecoratedIdentifier
- UnallowedIdentifierException
- if identifier contains unallowed characters or is
otherwise invalid.Copyright © 2018 OpenMRS Inc.. All Rights Reserved.