Class Conflict
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.conflict.Conflict
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 Summary
ConstructorsConstructorDescriptionConflict(ConflictType iType, MappingElementList iSource, MappingElementList iTarget) Create a conflict with the conflict type and the involved source and target model elements. -
Method Summary
Modifier and TypeMethodDescriptionGet default solution.Get source elements involved in this conflict.Get first source element.Get target elements involved in this conflict.getType()Get type of conflict.booleanbooleanresolve(FVPMode iFVPMode, FunctionalVariationPointChangeVectors changed) Resolve this conflict with specific source and target elements.booleanresolveForce(FVPMode iFVPMode, FunctionalVariationPointChangeVectors changed) Resolve this conflict with specific source and target elements and use default solution.toString()
-
Constructor Details
-
Conflict
Create a conflict with the conflict type and the involved source and target model elements.- Parameters:
iType- conflict typeiSource- list of source elementsiTarget- 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 updatedchanged- changes done- Returns:
- true, if automatic resolution was possible
- Throws:
M2MExceptionRemoteException
-
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 updatedchanged- changes done- Returns:
- true, if default resolution was possible
- Throws:
M2MExceptionRemoteException
-
isResolved
public boolean isResolved() -
getSolution
Get default solution.- Returns:
- solution of conflict, if there is only one or an already chosen one.
-
getType
Get type of conflict.- Returns:
- conflict type
-
getSource
Get source elements involved in this conflict.- Returns:
- source elements involved in this conflict
-
getSourceElement
Get first source element.- Returns:
- null, if no source associated with conflict, else the first
-
getTarget
Get target elements involved in this conflict.- Returns:
- target elements involved in this conflict
-
toString
-