1 package ch.qos.cal10n.verifier; 2 3 import java.util.List; 4 import java.util.Locale; 5 6 /** 7 * An interface for verifying that given an enum type, the keys match those 8 * found in the corresponding resource bundles. 9 * 10 * <p> 11 * See also {@link MessageKeyVerifier} for a concrete implementation. 12 * 13 * @author Ceki Gülcü 14 * 15 */ 16 public interface IMessageKeyVerifier { 17 18 // WARNING: 19 // WARNING: The name of this class is referenced in String form 20 // to do class loader tricks. Do not change the name of this class 21 // without looking at the maven-cal10n-plugin. 22 23 /** 24 * Get the of enum type that this verifier is related to to. 25 * 26 * @return 27 */ 28 public Class<? extends Enum<?>> getEnumType(); 29 30 /** 31 * Get the name of enum type to this verifier is related to to. 32 * 33 * @return 34 */ 35 public String getEnumTypeAsStr(); 36 37 /** 38 * Verify that the keys defined in the enumClass match those found in the 39 * resource bundle corresponding to a certain locale 40 * 41 * @param locale 42 * @return 43 */ 44 public List<Cal10nError> verify(Locale locale); 45 46 /** 47 * Verify that the keys defined in the enumClass match those found in the 48 * corresponding resource bundle for all locales declared in the enum type 49 * via the @{@link LocaleData} annotation. 50 * 51 * @param locale 52 * @return 53 */ 54 public List<Cal10nError> verifyAllLocales(); 55 56 /** 57 * Same as {@link #verify(Locale)} except that the return type is 58 * List<String>. 59 * 60 * @param locale 61 * @return 62 */ 63 public List<String> typeIsolatedVerify(Locale locale); 64 65 /** 66 * Get the locales specified in the enumType (via annotations) 67 * 68 * @return 69 */ 70 public String[] getLocaleNames(); 71 72 /** 73 * Get the base name for the resource bundle family as specified in the enumType (via 74 * annotations) 75 * 76 * @return 77 */ 78 public String getBaseName(); 79 }