org.apache.tapestry5.internal.translator
Class AbstractTranslator<T>
java.lang.Object
org.apache.tapestry5.internal.translator.AbstractTranslator<T>
- All Implemented Interfaces:
- Translator<T>
- Direct Known Subclasses:
- NumericTranslator, StringTranslator
public abstract class AbstractTranslator<T>
- extends Object
- implements Translator<T>
|
Method Summary |
String |
getMessageKey()
Returns the message key, within the validation messages, normally used by this validator. |
String |
getName()
Returns a unique name for the translator. |
Class<T> |
getType()
Returns the type of the server-side value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTranslator
protected AbstractTranslator(String name,
Class<T> type,
String messageKey)
getMessageKey
public String getMessageKey()
- Description copied from interface:
Translator
- Returns the message key, within the validation messages, normally used by this validator. This is used to provide
the formatted message to
Translator.parseClient(Field, String, String) or Translator.render(Field, String,
MarkupWriter, org.apache.tapestry5.services.FormSupport).
- Specified by:
getMessageKey in interface Translator<T>
- Returns:
- a message key
- See Also:
ValidationMessagesSource
getType
public Class<T> getType()
- Description copied from interface:
Translator
- Returns the type of the server-side value.
- Specified by:
getType in interface Translator<T>
- Returns:
- a type
getName
public String getName()
- Description copied from interface:
Translator
- Returns a unique name for the translator. This is used to identify the translator by name, but is also used when
locating override messages for the translator.
- Specified by:
getName in interface Translator<T>
- Returns:
- unique name for the translator
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.