public interface ValueContextForValidationOnRecord
Modifier and Type | Method and Description |
---|---|
void |
addMessage(SchemaNode aNode,
UserMessage aMessage)
Adds the specified validation message concerning a node in the current record.
|
void |
addMessage(UserMessage aMessage)
Adds the specified validation message to the current validation context.
|
ValueContext |
getRecord()
Returns the record currently being created or modified.
|
AdaptationTable |
getTable()
Returns the table that contains the record currently being created or modified.
|
boolean |
isCheckOnUserInput()
Returns
true if the associated constraint
validates the value at user input. |
void |
removeRecordFromMessages(ValueContext aRecord)
Removes the specified record from existing validation messages that were
previously added by this constraint during the validation of its container table
using the method
ConstraintOnTable.checkTable(ValueContextForValidationOnTable) ,
or during the validation of a single record using
ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord) . |
AdaptationTable getTable()
ValueContext getRecord()
void addMessage(SchemaNode aNode, UserMessage aMessage)
ValueContextForValidationOnTable.addMessage(Adaptation, SchemaNode, UserMessage)
.IllegalArgumentException
- if the specified message is null
.IllegalArgumentException
- if the specified node is null
.IllegalArgumentException
- if the specified node is not consistent with the current context.
That is, specified node must be in the same record that is currently being
created or modified.addMessage(UserMessage)
,
removeRecordFromMessages(ValueContext)
void addMessage(UserMessage aMessage)
Adds the specified validation message to the current validation context.
This method is equivalent to ValueContextForValidationOnTable.addMessage(Adaptation, UserMessage)
.
IllegalArgumentException
- if the specified message is null
.addMessage(SchemaNode, UserMessage)
,
removeRecordFromMessages(ValueContext)
void removeRecordFromMessages(ValueContext aRecord)
Removes the specified record from existing validation messages that were
previously added by this constraint during the validation of its container table
using the method ConstraintOnTable.checkTable(ValueContextForValidationOnTable)
,
or during the validation of a single record using
ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord)
.
This method should be used to avoid duplicated validation messages between the
ones added by the method ConstraintOnTable.checkTable(ValueContextForValidationOnTable)
and the ones added by the method
ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord)
.
This means that it is the responsibility of this constraint to correctly manage the validation messages
related to the specified record.
IllegalArgumentException
- if the specified record is null
.addMessage(SchemaNode, UserMessage)
boolean isCheckOnUserInput()
true
if the associated constraint
validates the value at user input.ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord)