Package net.codecrete.qrbill.generator
Class ValidationMessage
java.lang.Object
net.codecrete.qrbill.generator.ValidationMessage
- All Implemented Interfaces:
Serializable
QR bill validation message.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new validation message.ValidationMessage
(ValidationMessage.Type type, String field, String messageKey) Constructs a new validation message with the given values.ValidationMessage
(ValidationMessage.Type type, String field, String messageKey, String[] messageParameters) Constructs a new validation message with the given values. -
Method Summary
Modifier and TypeMethodDescriptiongetField()
Gets the name of the affected field.Gets the language neutral key of the message.String[]
Gets additional message parameters (text) that are inserted into the localized message.getType()
Gets the type of messagevoid
Sets the name of the affected field.void
setMessageKey
(String messageKey) Sets the language neutral key of the message.void
setMessageParameters
(String[] messageParameters) Sets additional message parameters (text) that are inserted into the localized message.void
Sets the type of message
-
Constructor Details
-
ValidationMessage
public ValidationMessage()Constructs a new validation message. -
ValidationMessage
Constructs a new validation message with the given values.- Parameters:
type
- the message typefield
- the affect fieldmessageKey
- the language-neutral key of the message
-
ValidationMessage
public ValidationMessage(ValidationMessage.Type type, String field, String messageKey, String[] messageParameters) Constructs a new validation message with the given values.- Parameters:
type
- the message typefield
- the affect fieldmessageKey
- the language-neutral key of the messagemessageParameters
- variable text parts that will be inserted into the localized message
-
-
Method Details
-
getType
Gets the type of message- Returns:
- the message type
-
setType
Sets the type of message- Parameters:
type
- message type
-
getField
Gets the name of the affected field.All field names are available as constants in
Bill
. Examples are: "account", "creditor.street"- Returns:
- the field name
-
setField
Sets the name of the affected field.All field names are available as constants in
Bill
. Examples are: "account", "creditor.street"- Parameters:
field
- the field name
-
getMessageKey
Gets the language neutral key of the message.- Returns:
- the message key
-
setMessageKey
Sets the language neutral key of the message.- Parameters:
messageKey
- the message key
-
getMessageParameters
Gets additional message parameters (text) that are inserted into the localized message.- Returns:
- the additional message parameters
-
setMessageParameters
Sets additional message parameters (text) that are inserted into the localized message.- Parameters:
messageParameters
- the additional message parameters
-