com.dlsc.flexgantt.model.scheduling

## Class ConstraintViolationMessage

- java.lang.Object
- - com.dlsc.flexgantt.swing.Message
  - - com.dlsc.flexgantt.swing.TimelineObjectPathMessage
    - - com.dlsc.flexgantt.model.scheduling.ConstraintViolationMessage

- All Implemented Interfaces:
    IMessage, ITimelineObjectPathMessage

      public class ConstraintViolationMessage
      extends TimelineObjectPathMessage

  A specialization of `TimelineObjectPathMessage`, which takes a constraint and its violation as input.
  Since:
    2.1
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintViolationMessage(IConstraint constraint, Violation violation, IModelValidator modelValidator, String text, Object details, TimelineObjectPath path)` Constructs a new constraint violation message.
    `ConstraintViolationMessage(IConstraint constraint, Violation violation, IModelValidator modelValidator, String text, TimelineObjectPath path)` Constructs a new constraint violation message.
    `ConstraintViolationMessage(IConstraint constraint, Violation violation, MessageTypeId id, IModelValidator modelValidator, String text, Date time, TimelineObjectPath path)` Constructs a new constraint violation message.
    `ConstraintViolationMessage(IConstraint constraint, Violation violation, MessageTypeId id, IModelValidator modelValidator, String text, Object details, Date time, TimelineObjectPath path)` Constructs a new constraint violation message.
    `ConstraintViolationMessage(IConstraint constraint, Violation violation, MessageTypeId id, IModelValidator modelValidator, String text, Object details, TimelineObjectPath path)` Constructs a new constraint violation message.
    `ConstraintViolationMessage(IConstraint constraint, Violation violation, MessageTypeId id, IModelValidator modelValidator, String text, TimelineObjectPath path)` Constructs a new constraint violation message.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IConstraint` | `getConstraint()` Returns the violated constraint.
    `IModelValidator` | `getModelValidator()` Returns the model validator that was used to create the message.
    `Violation` | `getViolation()` Returns the violation.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.TimelineObjectPathMessage

      `getTimelineObjectPath`

    - ### Methods inherited from class com.dlsc.flexgantt.swing.Message

      `getMessageDetails, getMessageText, getMessageTime, getMessageTypeId, toString`

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

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

    - ### Methods inherited from interface com.dlsc.flexgantt.swing.IMessage

      `getMessageDetails, getMessageText, getMessageTime, getMessageTypeId`

- - ### Constructor Detail

    - #### ConstraintViolationMessage

          public ConstraintViolationMessage(IConstraint constraint,
                                            Violation violation,
                                            MessageTypeId id,
                                            IModelValidator modelValidator,
                                            String text,
                                            Date time,
                                            TimelineObjectPath path)

      Constructs a new constraint violation message.
      Parameters:
        `constraint` - the violated constraint
        `violation` - the violation
        `id` - a message type identifier used to distinguish between plain information messages or warning and error messages
        `modelValidator` - the model validator used for creating this message
        `text` - the message that will be shown to the user
        `time` - a message time stamp
        `path` - a timeline object path to the tree node and the timeline object
      Since:
        2.1
      See Also:
        `Message`, `TimelineObjectPathMessage`

    - #### ConstraintViolationMessage

          public ConstraintViolationMessage(IConstraint constraint,
                                            Violation violation,
                                            MessageTypeId id,
                                            IModelValidator modelValidator,
                                            String text,
                                            Object details,
                                            Date time,
                                            TimelineObjectPath path)

      Constructs a new constraint violation message.
      Parameters:
        `constraint` - the violated constraint
        `violation` - the violation
        `id` - a message type identifier used to distinguish between plain information messages or warning and error messages
        `modelValidator` - the model validator used for creating this message
        `text` - the message that will be shown to the user
        `details` - an object storing additional information about the cause of the message
        `time` - a message time stamp
        `path` - a timeline object path to the tree node and the timeline object
      Since:
        2.1
      See Also:
        `Message`, `TimelineObjectPathMessage`

    - #### ConstraintViolationMessage

          public ConstraintViolationMessage(IConstraint constraint,
                                            Violation violation,
                                            MessageTypeId id,
                                            IModelValidator modelValidator,
                                            String text,
                                            Object details,
                                            TimelineObjectPath path)

      Constructs a new constraint violation message.
      Parameters:
        `constraint` - the violated constraint
        `violation` - the violation
        `id` - a message type identifier used to distinguish between plain information messages or warning and error messages
        `modelValidator` - the model validator used for creating this message
        `text` - the message that will be shown to the user
        `details` - an object storing additional information about the cause of the message
        `path` - a timeline object path to the tree node and the timeline object
      Since:
        2.1
      See Also:
        `Message`, `TimelineObjectPathMessage`

    - #### ConstraintViolationMessage

          public ConstraintViolationMessage(IConstraint constraint,
                                            Violation violation,
                                            MessageTypeId id,
                                            IModelValidator modelValidator,
                                            String text,
                                            TimelineObjectPath path)

      Constructs a new constraint violation message.
      Parameters:
        `constraint` - the violated constraint
        `violation` - the violation
        `id` - a message type identifier used to distinguish between plain information messages or warning and error messages
        `modelValidator` - the model validator used for creating this message
        `text` - the message that will be shown to the user
        `path` - a timeline object path to the tree node and the timeline object
      Since:
        2.1
      See Also:
        `Message`, `TimelineObjectPathMessage`

    - #### ConstraintViolationMessage

          public ConstraintViolationMessage(IConstraint constraint,
                                            Violation violation,
                                            IModelValidator modelValidator,
                                            String text,
                                            Object details,
                                            TimelineObjectPath path)

      Constructs a new constraint violation message.
      Parameters:
        `constraint` - the violated constraint
        `violation` - the violation
        `modelValidator` - the model validator used for creating this message
        `text` - the message that will be shown to the user
        `details` - an object storing additional information about the cause of the message
        `path` - a timeline object path to the tree node and the timeline object
      Since:
        2.1
      See Also:
        `Message`, `TimelineObjectPathMessage`

    - #### ConstraintViolationMessage

          public ConstraintViolationMessage(IConstraint constraint,
                                            Violation violation,
                                            IModelValidator modelValidator,
                                            String text,
                                            TimelineObjectPath path)

      Constructs a new constraint violation message.
      Parameters:
        `constraint` - the violated constraint
        `violation` - the violation
        `modelValidator` - the model validator used for creating this message
        `text` - the message that will be shown to the user
        `path` - a timeline object path to the tree node and the timeline object
      Since:
        2.1
      See Also:
        `Message`, `TimelineObjectPathMessage`

  - ### Method Detail

    - #### getConstraint

          public IConstraint getConstraint()

      Returns the violated constraint.
      Returns:
        the violated constraint
      Since:
        2.1

    - #### getViolation

          public Violation getViolation()

      Returns the violation.
      Returns:
        the violation
      Since:
        2.1

    - #### getModelValidator

          public IModelValidator getModelValidator()

      Returns the model validator that was used to create the message. The same validator will be used for recursive problem solving.
      Returns:
        the model validator
      Since:
        2.1

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.