Interface ExtractTarget
@OpenApiAll
public interface ExtractTarget
Controls extract refactoring result: target diagram type, target namespace,
references from extract source to the target.
-
Method Summary
Modifier and TypeMethodDescriptionGets allowed target diagram types for extract refactoring.Gets target diagram which was created during refactoring.Gets element which was created in the extract refactor target after refactoring.List<? extends ExtractReference>
Gets source to target references.void
setElementName
(String elementName) Sets name of the refactored target element.void
setTargetDiagramType
(String targetDiagramType) Sets type of diagram to create the target diagram.void
setTargetNamespace
(Namespace targetNamespace) Sets namespace in which target elements have to be created.
-
Method Details
-
setTargetDiagramType
Sets type of diagram to create the target diagram. Target diagram type must be among allowed target diagram types for a specific extract refactoring. If target diagram type is not among allowed types,IllegalArgumentException
is thrown.- Parameters:
targetDiagramType
- target diagram type to set.
-
getAllowedTargetDiagramTypes
Gets allowed target diagram types for extract refactoring.- Returns:
- allowed target diagram types.
-
setTargetNamespace
Sets namespace in which target elements have to be created.- Parameters:
targetNamespace
- namespace for target elements.
-
getReferences
List<? extends ExtractReference> getReferences()Gets source to target references. Reference represents logical model relation from the extract source to the extract target. In the concrete refactoring this reference can be represented as connector (composite structures), object flow (activities), transition (states), message (interactions).- Returns:
- source to target references.
-
setElementName
Sets name of the refactored target element.- Parameters:
elementName
- refactored element name.
-
getElement
Element getElement()Gets element which was created in the extract refactor target after refactoring.- Returns:
- target refactored element if called after refactoring, null if called before refactoring.
-
getDiagram
DiagramPresentationElement getDiagram()Gets target diagram which was created during refactoring.- Returns:
- target diagram.
-