Package com.orchestranetworks.service

# Interface ValidationReportItem

public interface ValidationReportItem
Represents an element of a validation report.

A validation item holds a user message, has a severity (usually an error) and has a subject that specifies with which entity (or entities) the message is associated.

See Also:
  - `ValidationReport.getItemsOfSeverity(Severity)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SchemaFacetBlocksCommit`
  `getBlocksCommit()`
  Returns the blocking policy associated with this item.
  `SchemaFacet`
  `getFacet()`
  Returns the facet that is associated with this item, `null` if no facet is associated with this item.
  `UserMessage`
  `getMessage()`
  Returns a user-friendly message.
  `Severity`
  `getSeverity()`
  Returns the severity of this item, which is the severity of the user message.
  `ValidationReportItemSubject`
  `getSubject()`
  Returns the object that is associated with this item, `null` if no subject is associated with this item.
  `ValidationReportItemSubjectForAdaptation`
  `getSubjectForAdaptation()`
  Returns the dataset or record object associated with this item, `null` if this item is not associated with a node in a dataset or record.
  `ValidationReportItemSubjectForTable`
  `getSubjectForTable()`
  Returns the table object associated with this item, `null` if this item is not associated with a table.
  `boolean`
  `isError()`
  Returns `true` if this item is an error.
  `boolean`
  `isFatal()`
  Returns `true` if this item is a "fatal error".
  `boolean`
  `isInfo()`
  Returns `true` if this item is an informational message.
  `boolean`
  `isOfSeverity(Severity aSeverity)`
  Returns `true` if this item is of the specified severity.
  `boolean`
  `isValidationMessageThresholdItem()`
  Returns `true` if this item is related to the maximum number of validation messages to consider per constraint when performing a validation.
  `boolean`
  `isWarning()`
  Returns `true` if this item is a warning.

- ## Method Details

  - ### getMessage

    UserMessage getMessage()
    Returns a user-friendly message.

  - ### getSubject

    ValidationReportItemSubject getSubject()
    Returns the object that is associated with this item, `null` if no subject is associated with this item.
    See Also:
      - `getSubjectForAdaptation()`
      - `getSubjectForTable()`

  - ### getSubjectForAdaptation

    ValidationReportItemSubjectForAdaptation getSubjectForAdaptation()
    Returns the dataset or record object associated with this item, `null` if this item is not associated with a node in a dataset or record.
    See Also:
      - `getSubject()`

  - ### getSubjectForTable

    ValidationReportItemSubjectForTable getSubjectForTable()
    Returns the table object associated with this item, `null` if this item is not associated with a table.
    See Also:
      - `getSubject()`

  - ### getFacet

    SchemaFacet getFacet()
    Returns the facet that is associated with this item, `null` if no facet is associated with this item.
    Since:
      6.0.0
    See Also:
      - `getSubjectForAdaptation()`
      - `getSubjectForTable()`

  - ### getSeverity

    Severity getSeverity()
    Returns the severity of this item, which is the severity of the user message.
    See Also:
      - `UserMessage.getSeverity()`

  - ### isFatal

    boolean isFatal()
    Returns `true` if this item is a "fatal error".

  - ### isError

    boolean isError()
    Returns `true` if this item is an error.

  - ### isWarning

    boolean isWarning()
    Returns `true` if this item is a warning.

  - ### isInfo

    boolean isInfo()
    Returns `true` if this item is an informational message.

  - ### isOfSeverity

    boolean isOfSeverity(Severity aSeverity)
    Returns `true` if this item is of the specified severity.

  - ### isValidationMessageThresholdItem

    boolean isValidationMessageThresholdItem()
    Returns `true` if this item is related to the maximum number of validation messages to consider per constraint when performing a validation. That is, if `true` this item indicates that the maximum number of validation messages has been reached by a constraint.
    Since:
      5.9.0
    See Also:
      - `ValidationReport.getTooManyMessagesItems()`

  - ### getBlocksCommit

    SchemaFacetBlocksCommit getBlocksCommit()
    Returns the blocking policy associated with this item.

    When this item is not related to a facet then it returns `SchemaFacetBlocksCommit.ON_INSERT_UPDATE_DELETE` if the severity of this item is `Severity.FATAL` otherwise it returns `SchemaFacetBlocksCommit.NEVER` for other severities.

    If the associated facet does not define a blocking policy, then a default one is returned according to the default validation policy of EBX®. That is, this method returns:

    - `SchemaFacetBlocksCommit.ON_INSERT_UPDATE_DELETE` if the severity of this item is `Severity.FATAL`.
    - `SchemaFacetBlocksCommit.USER_SUBMIT_CHECK_MODIFIED_VALUES` if the severity of this item is `Severity.ERROR` or if this item is related to a mandatory field that defines the property `osd:checkNullInput=true`.
    - `SchemaFacetBlocksCommit.NEVER` if the severity of this item is `Severity.WARNING` or `Severity.INFO`, or if this item is related to a mandatory field that does not define the property `osd:checkNullInput=true`.
    Since:
      6.0.0
    See Also:
      - `getFacet()`