public class PatternMetaDataTransformer extends AbstractValidationParameterAwareTransformer
{
protected Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
{
Map<String, Object> results = new HashMap<String, Object>();
Pattern annotation = metaDataEntry.getValue(Pattern.class);
results.put(CommonMetaDataKeys.PATTERN, (annotation).value());
String validationErrorMsgKey = (annotation).validationErrorMsgKey();
Locale currentLocale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
ValidationStrategy validationStrategy =
ExtValUtils.getValidationStrategyForMetaData(annotation.annotationType().getName());
String validationErrorMsg = ExtValUtils.getMessageResolverForValidationStrategy(validationStrategy)
.getMessage(validationErrorMsgKey, currentLocale);
results.put(CommonMetaDataKeys.PATTERN_VALIDATION_ERROR_MESSAGE, validationErrorMsg);