BeanIO 1.2.3

org.beanio.parser
Interface MessageFactory

All Known Implementing Classes:
CsvStreamDefinition, DelimitedStreamDefinition, FixedLengthStreamDefinition, StreamDefinition, XmlStreamDefinition

public interface MessageFactory

A MessageFactory implementation is used to generate localized error messages for record and field level errors.

Since:
1.0
Author:
Kevin Seim

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.
 String getRecordErrorMessage(String recordName, String rule)
          Returns a record level error message.
 String getRecordLabel(String recordName)
          Returns the localized label for a record.
 

Method Detail

getRecordLabel

String getRecordLabel(String recordName)
Returns the localized label for a record.

Parameters:
recordName - the name of the record
Returns:
the record label, or null if no label was found

getFieldLabel

String getFieldLabel(String recordName,
                     String fieldName)
Returns the localized label for a field.

Parameters:
recordName - the name of the record the field belongs to
fieldName - the name of the field
Returns:
the field label, or null if no label was found

getFieldErrorMessage

String getFieldErrorMessage(String recordName,
                            String fieldName,
                            String rule)
Returns a field level error message.

Parameters:
recordName - the name of the record
fieldName - the name of the field
rule - the name of the validation rule
Returns:
the error message, or null if no message was configured

getRecordErrorMessage

String getRecordErrorMessage(String recordName,
                             String rule)
Returns a record level error message.

Parameters:
recordName - the name of the record
rule - the name of the validation rule
Returns:
the error message, or null if no message was configured

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim