com.dlsc.flexgantt.policy.layer

## Class DefaultConstraintPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy
  - - com.dlsc.flexgantt.policy.layer.DefaultRelationshipPolicy
    - - com.dlsc.flexgantt.policy.layer.DefaultConstraintPolicy

- All Implemented Interfaces:
    IPolicy, IRelationshipPolicy

      public class DefaultConstraintPolicy
      extends DefaultRelationshipPolicy

  The default implementation of the `IRelationshipPolicy` allows all timeline objects to be linked with each other and returns a `DefaultCreateRelationshipCommand` command object for performing the actual linking.
  Since:
    1.0
  Version:
    $Revision: 1.5 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultConstraintPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICommand` | `getCreateRelationshipCommand(TimelineObjectPath sourcePath, TimelineObjectPath targetPath, RelationshipType type, IGanttChartModel model)` Returns a command object that will perform the actual linking of the source and target timeline objects by making the appropriate changes in the model.

    - ### Methods inherited from class com.dlsc.flexgantt.policy.layer.DefaultRelationshipPolicy

      `getDeleteRelationshipsCommand, getSupportedRelationshipTypes, isDeletable, isRelationshipSource, isRelationshipTarget`

    - ### Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy

      `assertClass`

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

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

- - ### Constructor Detail

    - #### DefaultConstraintPolicy

          public DefaultConstraintPolicy()

  - ### Method Detail

    - #### getCreateRelationshipCommand

          public ICommand getCreateRelationshipCommand(TimelineObjectPath sourcePath,
                                                       TimelineObjectPath targetPath,
                                                       RelationshipType type,
                                                       IGanttChartModel model)

      Description copied from interface: `IRelationshipPolicy`
      Returns a command object that will perform the actual linking of the source and target timeline objects by making the appropriate changes in the model.
      Specified by:
        `getCreateRelationshipCommand` in interface `IRelationshipPolicy`
      Overrides:
        `getCreateRelationshipCommand` in class `DefaultRelationshipPolicy`
      Parameters:
        `sourcePath` - the path to the source timeline object
        `targetPath` - the path to the target timeline object
        `type` - the type of relationship that the user wants to create (end to start, start to end, start to start, end to end)
        `model` - the source model of the node and timeline object
      Returns:
        a command that will create a relationship between the timeline objects
      See Also:
        `IRelationship`, `DefaultCreateRelationshipCommand`

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