com.corticon.rulesemf.common.util

## Class MessageUtil

- java.lang.Object
- - com.corticon.rulesemf.common.util.MessageUtil

-     public class MessageUtil
      extends java.lang.Object

  This class provides various helpful methods for determining the effective severity of a validation messages, taking into account the possibility of demotion (e.g., an error reduced to a warning).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isError(ValidationMessage aValidationMessage)` Determine whether the specified validation message should be considered an error.
    `static boolean` | `isError(ValidationMessage aValidationMessage, boolean abDemotion)` Determine whether the specified validation message should be treated as an error based on whether demotion is in play.
    `static boolean` | `isSeverity(ValidationMessage aValidationMessage, ValidationMessageSeverity aValidationMessageSeverity)` Determine whether the specified validation message is at the specified severity level.
    `static boolean` | `isSeverity(ValidationMessage aValidationMessage, ValidationMessageSeverity aValidationMessageSeverity, boolean abDemotion)` Determine whether the specified validation message is at the specified severity level.
    `static boolean` | `isWarning(ValidationMessage aValidationMessage)` Determine whether the specified validation message should be considered a warning.
    `static boolean` | `isWarning(ValidationMessage aValidationMessage, boolean abDemotion)` Determine whether the specified validation message should be treated as a warning based on whether demotion is in play.

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

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

- - ### Constructor Detail

    - #### MessageUtil

          public MessageUtil()

  - ### Method Detail

    - #### isError

          public static boolean isError(ValidationMessage aValidationMessage)

      Determine whether the specified validation message should be considered an error.
      Parameters:
        `aValidationMesssage` - Validation message to test
      Returns:
        `true` if message should be considered an error.

    - #### isError

          public static boolean isError(ValidationMessage aValidationMessage,
                        boolean abDemotion)

      Determine whether the specified validation message should be treated as an error based on whether demotion is in play.
      Parameters:
        `aValidationMesssage` - Validation message to test
        `abDemotion` - `true` to take demotion into account.
      Returns:
        `true` if message should be considered an error.

    - #### isWarning

          public static boolean isWarning(ValidationMessage aValidationMessage)

      Determine whether the specified validation message should be considered a warning.
      Parameters:
        `aValidationMesssage` - Validation message to test
      Returns:
        `true` if message should be considered a warning.

    - #### isWarning

          public static boolean isWarning(ValidationMessage aValidationMessage,
                          boolean abDemotion)

      Determine whether the specified validation message should be treated as a warning based on whether demotion is in play.
      Parameters:
        `aValidationMesssage` - Validation message to test
        `abDemotion` - `true` to take demotion into account.
      Returns:
        `true` if message should be considered a warning.

    - #### isSeverity

          public static boolean isSeverity(ValidationMessage aValidationMessage,
                           ValidationMessageSeverity aValidationMessageSeverity)

      Determine whether the specified validation message is at the specified severity level.
      Parameters:
        `aValidationMessage` - Message
        `aValidationMessageSeverity` - Severity.
      Returns:
        `true` if message is at the specified severity level.

    - #### isSeverity

          public static boolean isSeverity(ValidationMessage aValidationMessage,
                           ValidationMessageSeverity aValidationMessageSeverity,
                           boolean abDemotion)

      Determine whether the specified validation message is at the specified severity level.
      Parameters:
        `aValidationMessage` - Message
        `aValidationMessageSeverity` - Severity.
        `abDemotion` - `true` to take demotion into account.
      Returns:
        `true` if message is at the specified severity level.

Copyright © 2005-2013 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.