com.independentsoft.exchange

## Class Rule

- java.lang.Object
- - com.independentsoft.exchange.Rule

-     public class Rule
      extends java.lang.Object

  Contains a single rule and represents a rule in a user's mailbox.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Rule()` Initializes a new instance of the Rule class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RuleActions` | `getActions()` Gets the actions to be taken on a message when the conditions are fulfilled.
    `RuleConditions` | `getConditions()` Gets the conditions that, when fulfilled, will trigger the rule actions for a rule.
    `java.lang.String` | `getDisplayName()` Gets the display name of a rule.
    `RuleExceptions` | `getExceptions()` Gets the exceptions that represent all the available rule exception conditions for the inbox rule.
    `java.lang.String` | `getId()` Gets a rule identifier.
    `int` | `getPriority()` Gets the order in which a rule is to be run.
    `boolean` | `isEnabled()` Gets whether the rule is enabled.
    `boolean` | `isInError()` Gets whether the rule is in an error condition.
    `boolean` | `isNotSupported()` Checks if is not supported.
    `void` | `setActions(RuleActions actions)` Sets the actions to be taken on a message when the conditions are fulfilled.
    `void` | `setAsEnabled(boolean isEnabled)` Sets whether the rule is enabled.
    `void` | `setAsInError(boolean isInError)` Sets whether the rule is in an error condition.
    `void` | `setAsNotSupported(boolean isNotSupported)` Sets the as not supported.
    `void` | `setConditions(RuleConditions conditions)` Sets the conditions that, when fulfilled, will trigger the rule actions for a rule.
    `void` | `setDisplayName(java.lang.String displayName)` Sets the display name of a rule.
    `void` | `setExceptions(RuleExceptions exceptions)` Sets the exceptions that represent all the available rule exception conditions for the inbox rule.
    `void` | `setId(java.lang.String id)` Sets a rule identifier.
    `void` | `setPriority(int priority)` Sets the order in which a rule is to be run.

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

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

- - ### Constructor Detail

    - #### Rule

          public Rule()

      Initializes a new instance of the Rule class.

  - ### Method Detail

    - #### getId

          public java.lang.String getId()

      Gets a rule identifier.
      Returns:
        the id

    - #### setId

          public void setId(java.lang.String id)

      Sets a rule identifier.
      Parameters:
        `id` - the new id

    - #### getDisplayName

          public java.lang.String getDisplayName()

      Gets the display name of a rule.
      Returns:
        the display name

    - #### setDisplayName

          public void setDisplayName(java.lang.String displayName)

      Sets the display name of a rule.
      Parameters:
        `displayName` - the new display name

    - #### getPriority

          public int getPriority()

      Gets the order in which a rule is to be run.
      Returns:
        the priority

    - #### setPriority

          public void setPriority(int priority)

      Sets the order in which a rule is to be run.
      Parameters:
        `priority` - the new priority

    - #### isEnabled

          public boolean isEnabled()

      Gets whether the rule is enabled.
      Returns:
        true, if is enabled

    - #### setAsEnabled

          public void setAsEnabled(boolean isEnabled)

      Sets whether the rule is enabled.
      Parameters:
        `isEnabled` - the new as enabled

    - #### isNotSupported

          public boolean isNotSupported()

      Checks if is not supported.
      Returns:
        true, if is not supported

    - #### setAsNotSupported

          public void setAsNotSupported(boolean isNotSupported)

      Sets the as not supported.
      Parameters:
        `isNotSupported` - the new as not supported

    - #### isInError

          public boolean isInError()

      Gets whether the rule is in an error condition.
      Returns:
        true, if is in error

    - #### setAsInError

          public void setAsInError(boolean isInError)

      Sets whether the rule is in an error condition.
      Parameters:
        `isInError` - the new as in error

    - #### getConditions

          public RuleConditions getConditions()

      Gets the conditions that, when fulfilled, will trigger the rule actions for a rule.
      Returns:
        the conditions

    - #### setConditions

          public void setConditions(RuleConditions conditions)

      Sets the conditions that, when fulfilled, will trigger the rule actions for a rule.
      Parameters:
        `conditions` - the new conditions

    - #### getExceptions

          public RuleExceptions getExceptions()

      Gets the exceptions that represent all the available rule exception conditions for the inbox rule.
      Returns:
        the exceptions

    - #### setExceptions

          public void setExceptions(RuleExceptions exceptions)

      Sets the exceptions that represent all the available rule exception conditions for the inbox rule.
      Parameters:
        `exceptions` - the new exceptions

    - #### getActions

          public RuleActions getActions()

      Gets the actions to be taken on a message when the conditions are fulfilled.
      Returns:
        the actions

    - #### setActions

          public void setActions(RuleActions actions)

      Sets the actions to be taken on a message when the conditions are fulfilled.
      Parameters:
        `actions` - the new actions