ch.qos.cal10n.verifier
Class MessageCodeVerifier

java.lang.Object
  extended by ch.qos.cal10n.verifier.MessageCodeVerifier
All Implemented Interfaces:
IMessageCodeVerifier

public class MessageCodeVerifier
extends Object
implements IMessageCodeVerifier

Given an enum class, verify that the resource bundles corresponding to a given locale contains the correct codes.

Author:
Ceki Gulcu

Constructor Summary
MessageCodeVerifier(Class<? extends Enum<?>> enumClass)
           
MessageCodeVerifier(String enumTypeAsStr)
           
 
Method Summary
 Class<? extends Enum<?>> getEnumType()
          Get the of enum type that this verifier is related to to.
 String getEnumTypeAsStr()
          Get the name of enum type to this verifier is related to to.
 String[] getLocaleNames()
          Get the locales specified in the enumType (via annotations)
 String getResourceBundleName()
          Get the name of the resource bundle specified in the enumType (via annotations)
 List<String> typeIsolatedVerify(Locale locale)
          Same as IMessageCodeVerifier.verify(Locale) except that the return type is List.
 List<Cal10nError> verify(Locale locale)
          Verify that the keys defined in the enumClass match those found in the resource bundle corresponding to a certain locale
 List<Cal10nError> verifyAllLocales()
          Verify all declared locales in one step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageCodeVerifier

public MessageCodeVerifier(Class<? extends Enum<?>> enumClass)

MessageCodeVerifier

public MessageCodeVerifier(String enumTypeAsStr)
Method Detail

getEnumType

public Class<? extends Enum<?>> getEnumType()
Description copied from interface: IMessageCodeVerifier
Get the of enum type that this verifier is related to to.

Specified by:
getEnumType in interface IMessageCodeVerifier
Returns:

getEnumTypeAsStr

public String getEnumTypeAsStr()
Description copied from interface: IMessageCodeVerifier
Get the name of enum type to this verifier is related to to.

Specified by:
getEnumTypeAsStr in interface IMessageCodeVerifier
Returns:

verify

public List<Cal10nError> verify(Locale locale)
Description copied from interface: IMessageCodeVerifier
Verify that the keys defined in the enumClass match those found in the resource bundle corresponding to a certain locale

Specified by:
verify in interface IMessageCodeVerifier
Returns:

typeIsolatedVerify

public List<String> typeIsolatedVerify(Locale locale)
Description copied from interface: IMessageCodeVerifier
Same as IMessageCodeVerifier.verify(Locale) except that the return type is List.

Specified by:
typeIsolatedVerify in interface IMessageCodeVerifier
Returns:

verifyAllLocales

public List<Cal10nError> verifyAllLocales()
Verify all declared locales in one step.

Specified by:
verifyAllLocales in interface IMessageCodeVerifier
Returns:

getLocaleNames

public String[] getLocaleNames()
Description copied from interface: IMessageCodeVerifier
Get the locales specified in the enumType (via annotations)

Specified by:
getLocaleNames in interface IMessageCodeVerifier
Returns:

getResourceBundleName

public String getResourceBundleName()
Description copied from interface: IMessageCodeVerifier
Get the name of the resource bundle specified in the enumType (via annotations)

Specified by:
getResourceBundleName in interface IMessageCodeVerifier
Returns:


Copyright © 2009 QOS.ch. All Rights Reserved.