com.microfocus.awm.core

## Class ValidateMessage

- java.lang.Object
- - com.microfocus.awm.core.ValidateMessage

- All Implemented Interfaces:
    IValidationMessage

      public class ValidateMessage
      extends java.lang.Object
      implements IValidationMessage

  Base implementation of `IValidationMessage`.
  Author:
    Micro Focus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidateMessage(java.lang.String pMsgText, char pSeverity, java.util.List<java.lang.Integer> pPositions)` Constructor for creating a position based validation message.
    `ValidateMessage(java.lang.String pMsgText, char pSeverity, Property pProperty)` Constructor for creating a property based validation message.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getMsgText()` Gets the that will be shown in the dialog.
    `java.util.List<java.lang.Integer>` | `getPositions()` Gets the positions of the dialog fields to which the validate message refers.
    `Property` | `getProperty()` Gets the property to which the validation message is referring to.
    `char` | `getSeverity()` Gets the severity of a validate message.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValidateMessage

          public ValidateMessage(java.lang.String pMsgText,
                                 char pSeverity,
                                 java.util.List<java.lang.Integer> pPositions)

      Constructor for creating a position based validation message.
      Parameters:
        `pMsgText` - contains the validate text that will be shown in the dialog
        `pSeverity` - contains the severity of a validate message. Permitted values are "I" for Information, "W" for Warning and "E" for Error. The default value is "I"
        `pPositions` - contains the position of the dialog field to which the validate message refers. A validate message can correspond to multiple dialog fields. In this case the positions are separated by blank or comma. Dialog fields corresponding to these positions are decorated with a validation message text depending on the severity. The focus is set to the dialog field corresponding to the lowest position value

    - #### ValidateMessage

          public ValidateMessage(java.lang.String pMsgText,
                                 char pSeverity,
                                 Property pProperty)

      Constructor for creating a property based validation message.
      Parameters:
        `pMsgText` - contains the validate text that will be shown in the dialog
        `pSeverity` - contains the severity of a validate message. Permitted values are "I" for Information, "W" for Warning and "E" for Error. The default value is "I"
        `pProperty` - the invalid property. Can be `null` if the message is not aimed at a specific property

  - ### Method Detail

    - #### getMsgText

          public java.lang.String getMsgText()

      Description copied from interface: `IValidationMessage`
      Gets the that will be shown in the dialog.
      Specified by:
        `getMsgText` in interface `IValidationMessage`
      Returns:
        the text of a validate message

    - #### getSeverity

          public char getSeverity()

      Description copied from interface: `IValidationMessage`
      Gets the severity of a validate message.
      Specified by:
        `getSeverity` in interface `IValidationMessage`
      Returns:
        the severity of a validate message

    - #### getPositions

          public java.util.List<java.lang.Integer> getPositions()

      Description copied from interface: `IValidationMessage`
      Gets the positions of the dialog fields to which the validate message refers. Can be empty, if the validate message is not position based.
      Specified by:
        `getPositions` in interface `IValidationMessage`
      Returns:
        the positions of the dialog fields. Can be empty.

    - #### getProperty

          public Property getProperty()

      Description copied from interface: `IValidationMessage`
      Gets the property to which the validation message is referring to. Can be `null`.
      Specified by:
        `getProperty` in interface `IValidationMessage`
      Returns:
        the target property or `null`

Copyright © 2015 Micro Focus GmbH. All rights reserved.