java.lang.Object
de.mid.innovator.m2msdk.model.transformation.conflict.Conflict

public class Conflict extends Object
A conflict is a difference between source and target model caused by a modification in both models since the creation of the target model by something else than the model transformation itself. Conflicts can be grouped by the conflict type. All conflicts of a conflict type (see ConflictType ) can be solved in the same way. The occurrence and the resolution of a conflict are defined by its type.
Author:
jmback
  • Constructor Details

    • Conflict

      public Conflict(ConflictType iType, MappingElementList iSource, MappingElementList iTarget)
      Create a conflict with the conflict type and the involved source and target model elements.
      Parameters:
      iType - conflict type
      iSource - list of source elements
      iTarget - list of target elements
  • Method Details

    • resolve

      public boolean resolve(FVPMode iFVPMode, FunctionalVariationPointChangeVectors changed) throws M2MException, RemoteException
      Resolve this conflict with specific source and target elements. Try automatic resolution.
      Parameters:
      iFVPMode - tells whether the conflict resolution should be checked or updated
      changed - changes done
      Returns:
      true, if automatic resolution was possible
      Throws:
      M2MException
      RemoteException
    • resolveForce

      public boolean resolveForce(FVPMode iFVPMode, FunctionalVariationPointChangeVectors changed) throws M2MException, RemoteException
      Resolve this conflict with specific source and target elements and use default solution. Enforce automatic resolution.
      Parameters:
      iFVPMode - tells whether the conflict resolution should be checked or updated
      changed - changes done
      Returns:
      true, if default resolution was possible
      Throws:
      M2MException
      RemoteException
    • isResolved

      public boolean isResolved()
    • getSolution

      public SolutionIF getSolution()
      Get default solution.
      Returns:
      solution of conflict, if there is only one or an already chosen one.
    • getType

      public ConflictType getType()
      Get type of conflict.
      Returns:
      conflict type
    • getSource

      public String getSource()
      Get source elements involved in this conflict.
      Returns:
      source elements involved in this conflict
    • getSourceElement

      public MappingElementIF getSourceElement()
      Get first source element.
      Returns:
      null, if no source associated with conflict, else the first
    • getTarget

      public String getTarget()
      Get target elements involved in this conflict.
      Returns:
      target elements involved in this conflict
    • toString

      public String toString()
      Overrides:
      toString in class Object