public abstract class AbstractMessageKeyVerifier extends java.lang.Object implements IMessageKeyVerifier
This class contains the bundle verification logic. Logic for extracting locate and key information should be provided by derived classes.
Modifier and Type | Field and Description |
---|---|
(package private) AnnotationExtractor |
annotationExtractor |
(package private) java.lang.String |
enumTypeAsStr |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMessageKeyVerifier(java.lang.String enumTypeAsStr,
AnnotationExtractor annotationExtractor) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<java.lang.String> |
buildKeySetFromEnumeration(java.util.Enumeration<java.lang.String> e) |
protected java.lang.String |
extractCharsetForLocale(java.util.Locale locale) |
protected abstract java.util.List<java.lang.String> |
extractKeysInEnum() |
java.lang.String |
getBaseName()
Get the base name for the resource bundle family as specified in the enumType (via
annotations)
|
java.lang.String |
getEnumTypeAsStr()
Get the name of enum type to this verifier is related to to.
|
java.lang.String[] |
getLocaleNames()
Get the locales specified in the enumType (via annotations)
|
protected abstract CAL10NBundleFinder |
getResourceBundleFinder() |
java.util.List<java.lang.String> |
typeIsolatedVerify(java.util.Locale locale)
Same as
IMessageKeyVerifier.verify(Locale) except that the return type is
List |
java.util.List<Cal10nError> |
verify(java.util.Locale locale)
Verify that the keys defined in the enumClass match those found in the
resource bundle corresponding to a certain locale
|
java.util.List<Cal10nError> |
verifyAllLocales()
Verify all declared locales in one step.
|
final java.lang.String enumTypeAsStr
final AnnotationExtractor annotationExtractor
protected AbstractMessageKeyVerifier(java.lang.String enumTypeAsStr, AnnotationExtractor annotationExtractor)
public java.lang.String getEnumTypeAsStr()
IMessageKeyVerifier
getEnumTypeAsStr
in interface IMessageKeyVerifier
protected java.lang.String extractCharsetForLocale(java.util.Locale locale)
protected abstract java.util.List<java.lang.String> extractKeysInEnum()
public java.lang.String[] getLocaleNames()
IMessageKeyVerifier
getLocaleNames
in interface IMessageKeyVerifier
public java.lang.String getBaseName()
IMessageKeyVerifier
getBaseName
in interface IMessageKeyVerifier
public java.util.List<Cal10nError> verify(java.util.Locale locale)
IMessageKeyVerifier
verify
in interface IMessageKeyVerifier
protected abstract CAL10NBundleFinder getResourceBundleFinder()
public java.util.List<java.lang.String> typeIsolatedVerify(java.util.Locale locale)
IMessageKeyVerifier
IMessageKeyVerifier.verify(Locale)
except that the return type is
ListtypeIsolatedVerify
in interface IMessageKeyVerifier
protected java.util.Set<java.lang.String> buildKeySetFromEnumeration(java.util.Enumeration<java.lang.String> e)
public java.util.List<Cal10nError> verifyAllLocales()
verifyAllLocales
in interface IMessageKeyVerifier