Interface ValueContextForValidationOnTable
-
public interface ValueContextForValidationOnTableThis interface provides the services for accessing the content of a table and for adding validation messages in the context of a validation process.Those messages are then accessed as
validation report itemsin the context of a validation report.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMessage(Adaptation aRecord, UserMessage aMessage)Adds the specified validation message concerning a single record.voidaddMessage(Adaptation aRecord, SchemaNode aNode, UserMessage aMessage)Adds the specified validation message concerning a node in a single record.voidaddMessage(UserMessage aMessage)This method creates a newvalidation itemwhosesubjectis the table that is currently being validated.voidaddMessage(String xpathPredicateOfRecords, UserMessage aMessage)Adds the specified validation message concerning the result of an XPath predicate.voidaddMessage(List<Adaptation> records, UserMessage aMessage)Adds the specified validation message concerning a set of records.AdaptationHomegetFunctionalDataspace()Returns the dataspace that contains the table for which the validation has been requested.AdaptationTablegetTable()Returns the table that is currently being validated.
-
-
-
Method Detail
-
getTable
AdaptationTable getTable()
Returns the table that is currently being validated.Important: this table belongs to a technical snapshot used by the validation framework.
Method
getFunctionalDataspace()can be used to retrieve the functional dataspace that contains the original table.
-
getFunctionalDataspace
AdaptationHome getFunctionalDataspace()
Returns the dataspace that contains the table for which the validation has been requested.- Since:
- 6.0.6
-
addMessage
void addMessage(String xpathPredicateOfRecords, UserMessage aMessage)
Adds the specified validation message concerning the result of an XPath predicate.The added message will be contained by the table that is currently being validated, (see
AdaptationTable.getValidationReport()).Concretely, this method creates a new validation item whose subject is a
ValidationReportItemSubjectForTable. The specified XPath can be accessed using the methodValidationReportItemSubjectForTable.getXPathPredicateOfRecords().- Parameters:
xpathPredicateOfRecords- specifies the records with which the new validation item is associated. For a single record, the methodAdaptation.toXPathPredicateString()can be invoked.aMessage- the validation message- Throws:
IllegalArgumentException- if the result of the XPath predicate is not consistent with the table node.
-
addMessage
void addMessage(List<Adaptation> records, UserMessage aMessage)
Adds the specified validation message concerning a set of records.This method is equivalent to
addMessage(String, UserMessage).- Throws:
IllegalArgumentException- if specified records are not consistent with the current context.
-
addMessage
void addMessage(Adaptation aRecord, UserMessage aMessage)
Adds the specified validation message concerning a single record.This method is equivalent to
addMessage(String, UserMessage).- Throws:
IllegalArgumentException- if the specified record is not consistent with the current context.- See Also:
addMessage(String, UserMessage)
-
addMessage
void addMessage(Adaptation aRecord, SchemaNode aNode, UserMessage aMessage)
Adds the specified validation message concerning a node in a single record.- Throws:
IllegalArgumentException- if the specified node or record is not consistent with the current context.- See Also:
addMessage(String, UserMessage)
-
addMessage
void addMessage(UserMessage aMessage)
This method creates a new
validation itemwhosesubjectis the table that is currently being validated. The item is also contained by the same table, so that it can be accessed using the methodAdaptationTable.getValidationReport(boolean).When displaying the message, EBX® usually adds information about the subject (for example, the validation report in EBX® user interface displays the subject as a hyperlink). Consequently, it is not required to repeat this contextual information in the message argument.
-
-