|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.internal.parser.message.ResourceBundleMessageFactory
public class ResourceBundleMessageFactory
Constructor Summary | |
---|---|
ResourceBundleMessageFactory()
|
Method Summary | |
---|---|
String |
getFieldErrorMessage(String recordName,
String fieldName,
String rule)
Returns a field level error message. |
String |
getFieldLabel(String recordName,
String fieldName)
Returns the localized label for a field. |
protected String |
getLabel(String key)
Returns a label from the configured resource bundle. |
String |
getRecordErrorMessage(String recordName,
String rule)
Returns a record level error message. |
String |
getRecordLabel(String recordName)
Returns the localized label for a record. |
void |
setDefaultResourceBundle(ResourceBundle defaultResourceBundle)
Sets the default resource bundle to check of messages not found in the primary resource bundle. |
void |
setResourceBundle(ResourceBundle resourceBundle)
Sets the primary resource bundle to check for messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBundleMessageFactory()
Method Detail |
---|
public String getRecordLabel(String recordName)
MessageFactory
getRecordLabel
in interface MessageFactory
recordName
- the name of the record
public String getFieldLabel(String recordName, String fieldName)
MessageFactory
getFieldLabel
in interface MessageFactory
recordName
- the name of the record the field belongs tofieldName
- the name of the field
protected String getLabel(String key)
key
- the resource bundle key
public String getFieldErrorMessage(String recordName, String fieldName, String rule)
MessageFactory
getFieldErrorMessage
in interface MessageFactory
recordName
- the name of the recordfieldName
- the name of the fieldrule
- the name of the validation rule
public String getRecordErrorMessage(String recordName, String rule)
MessageFactory
getRecordErrorMessage
in interface MessageFactory
recordName
- the name of the recordrule
- the name of the validation rule
public void setResourceBundle(ResourceBundle resourceBundle)
resourceBundle
- the resource bundlepublic void setDefaultResourceBundle(ResourceBundle defaultResourceBundle)
defaultResourceBundle
- the default resource bundle
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |