### Astah Installation Path Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/project/ProjectAccessor.html Obtain the installation path of the astah* application. ```APIDOC ## getAstahInstallPath ### Description Obtain the installation path of the astah* application. ### Method GET ### Endpoint /api/astah/installpath ### Returns - **string** - The installation path of astah*. ``` -------------------------------- ### GET /api/icon-description/list Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/view/IconDescription.html Returns a list of all available icon constants defined in the system. ```APIDOC ## GET /api/icon-description/list ### Description Returns an array containing all available icon constants in the order they are declared. ### Method GET ### Endpoint /api/icon-description/list ### Response #### Success Response (200) - **constants** (Array) - List of available icon constant names #### Response Example { "constants": ["UML_CLASS_CLASS"] } ``` -------------------------------- ### GET /api/astah/window/parent Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/ui/IWindow.html Retrieves the main window instance from the Astah application. ```APIDOC ## GET /api/astah/window/parent ### Description Retrieves the main window object from the Astah application for use within a plug-in. ### Method GET ### Endpoint /api/astah/window/parent ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **window** (Object) - The main window instance of the Astah application. #### Response Example { "window": "WindowInstance" } ``` -------------------------------- ### Ordering Management Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IObjectNode.html Details on how to get and set the ordering property. ```APIDOC ## Ordering Management ### getOrdering #### Description Gets the ordering of the element. #### Method `String getOrdering()` #### Returns `String` - The ordering, which can be null, "unordered", "ordered", "LIFO", or "FIFO". #### Since 6.8.0 ### setOrdering #### Description Sets the ordering of the element. #### Method `void setOrdering(String ordering)` #### Parameters - **ordering** (String) - The ordering to set. Accepts null, "unordered", "ordered", "LIFO", or "FIFO". #### Throws - `InvalidEditingException` - If the Editing API is used in astah* community, a parameter is not set properly, the model type is illegal, a bad transaction occurs, an exception has occurred, or a read-only element is edited. #### Since 6.8.0 ``` -------------------------------- ### Astah API: Source End Point Constants Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/presentation/PresentationPropertyConstants.Key.html Defines constants for the X and Y coordinates of the starting point for shared styles. These keys are used to get or set the starting point coordinates for generalizations, nests, or subtypes. ```Java static final String SOURCE_END_X = "SOURCE_END_X"; static final String SOURCE_END_Y = "SOURCE_END_Y"; ``` -------------------------------- ### Constructor: PresentationPropertyUtil() Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/presentation/PresentationPropertyUtil.html Initializes a new instance of the PresentationPropertyUtil class. ```APIDOC ## Constructor: PresentationPropertyUtil() ### Description Initializes a new instance of the PresentationPropertyUtil class. ### Method `PresentationPropertyUtil()` ### Parameters None ``` -------------------------------- ### GET openConnection Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/net/NetworkAccessor.html Creates a URLConnection using the current Astah system properties settings. ```APIDOC ## GET openConnection ### Description Creates a URLConnection using the setting of astah* SystemProperties. ### Method GET ### Endpoint openConnection(URL url) ### Parameters #### Path Parameters - **url** (URL) - Required - The target URL to connect to. ### Request Example { "url": "http://example.com" } ### Response #### Success Response (200) - **URLConnection** (Object) - The established connection object. #### Response Example { "status": "success", "connection": "URLConnectionInstance" } ``` -------------------------------- ### Look and Feel Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Methods for retrieving resources with theme-aware look and feel settings. ```APIDOC ## GET /api/lookandfeel/resource ### Description Gets resources with name qualifiers according to the theme of the look and feel. ### Method GET ### Endpoint /api/lookandfeel/resource ### Parameters #### Query Parameters - **classLoader** (ClassLoader) - Required - The class loader to use. - **resourceName** (String) - Required - The name of the resource to retrieve. ### Response #### Success Response (200) - **resource** (object) - The requested resource, potentially themed. #### Response Example ```json { "resource": "/path/to/themed/image.png" } ``` ``` -------------------------------- ### State Management Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IObjectNode.html Provides documentation for methods to get and set the 'InState' property of an element. ```APIDOC ## State Management ### getInState #### Description Gets the InState of the element. #### Method `String getInState()` #### Returns `InState` - The current InState of the element. ### setInState #### Description Sets the InState of the element. #### Method `void setInState(String inState)` #### Parameters - **inState** (String) - The new InState to set. This can be null. #### Throws - `InvalidEditingException` - If the Editing API is used in astah* community, a parameter is not set properly, the model type is illegal, a bad transaction occurs, an exception has occurred, or a read-only element is edited. #### Since 6.8.0 ``` -------------------------------- ### IPartition Interface Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IPartition.html This section details the methods available for the IPartition interface, allowing interaction with partition elements in Astah diagrams. ```APIDOC ## IPartition Interface Interface for Partition. It extends `INamedElement` and inherits methods from `IElement`, `IEntity`, and `IHyperlinkOwner`. ### Methods #### `getActivityNodes()` - **Description**: Get ActivityNodes associated with this partition. - **Returns**: `IActivityNode[]` - An array of ActivityNodes, or an empty array if none exist. #### `getSubPartitions()` - **Description**: Get the sub-partitions of this partition. - **Returns**: `IPartition[]` - An array of sub-partitions, or an empty array if none exist. #### `getSuperPartition()` - **Description**: Get the parent partition of this partition. - **Returns**: `IPartition` - The super-partition, or `null` if this is a top-level partition. #### `getPreviousPartition()` - **Description**: Get the left (for horizontal partitions) or upper (for vertical partitions) partition. - **Returns**: `IPartition` - The previous partition, or `null` if none exists. #### `getNextPartition()` - **Description**: Get the right (for horizontal partitions) or lower (for vertical partitions) partition. - **Returns**: `IPartition` - The next partition, or `null` if none exists. #### `isHorizontal()` - **Description**: Check if the partition is oriented horizontally. - **Returns**: `boolean` - `true` if horizontal, `false` if vertical. ``` -------------------------------- ### Get and Set Upper Bound for Member Elements (Java) Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IObjectNode.html Enables getting or setting the upper bound of a member element. This operation can result in an InvalidEditingException if there are issues with the input parameters or the editing context. ```Java String getUpperBound() void setUpperBound(String upperBound) ``` -------------------------------- ### Retrieve and Create Icons using IIconManager Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/view/IIconManager.html Demonstrates how to use the IIconManager interface to fetch an icon by its description key and create a scalable ImageIcon from a specific URL. These methods are essential for customizing the Astah GUI with external or system-defined imagery. ```java import com.change_vision.jude.api.inf.ui.IIconManager; import com.change_vision.jude.api.inf.ui.IconDescription; import javax.swing.ImageIcon; import java.net.URL; public void example(IIconManager iconManager, IconDescription key, URL imageUrl) { // Retrieve an icon by key javax.swing.Icon icon = iconManager.getIcon(key); // Create a scalable icon from a URL ImageIcon scalableIcon = iconManager.createScalableIcon(imageUrl); } ``` -------------------------------- ### Get and Set Ordering for Member Elements (Java) Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IObjectNode.html Provides functionality to get or set the ordering of a member element. The ordering can be null, 'unordered', 'ordered', 'LIFO', or 'FIFO'. An InvalidEditingException may be thrown. ```Java String getOrdering() void setOrdering(String ordering) ``` -------------------------------- ### Get State Information - Java Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IState.html Retrieves various pieces of information about a state, such as its submachine, entry/do/exit activities, internal transitions, and subvertices. It also provides methods to get the size and specific regions of a state. ```Java IStateMachine getSubmachine() boolean isSubmachineState() String getEntry() String getDoActivity() String getExit() ITransition[] getInternalTransitions() IVertex[] getSubvertexes() List getStateRegions() int getRegionSize() Rectangle2D getRegionRectangle(int regionIndex) IVertex[] getSubvertexes(int regionIndex) ``` -------------------------------- ### POST /createProvidedInterfacePresentation Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/CompositeStructureDiagramEditor.html Creates a provided interface presentation for a port or a part. ```APIDOC ## POST /createProvidedInterfacePresentation ### Description Creates a provided interface for a port or a part, with optional location and interface model parameters. ### Method POST ### Endpoint /createProvidedInterfacePresentation ### Parameters #### Request Body - **endPresentation** (INodePresentation) - Required - Part or port presentation. - **location** (Point2D) - Optional - The position of the provided interface. - **interfaceModel** (IClass) - Optional - The interface model to set. ### Response #### Success Response (200) - **INodePresentation** (Object) - The created provided interface presentation node. #### Error Handling Throws InvalidEditingException if parameters are invalid or transaction fails. ``` -------------------------------- ### GET /lifeline/status Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/ILifeline.html Checks the destruction status of the lifeline. ```APIDOC ## GET /lifeline/status ### Description Checks if the lifeline has a stop (is destroyed). ### Method GET ### Endpoint /lifeline/status ### Response #### Success Response (200) - **isDestroyed** (boolean) - True if the lifeline has a stop, false otherwise. #### Response Example { "isDestroyed": false } ``` -------------------------------- ### Opening and Saving Astah Projects Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/project/ProjectAccessor.html Demonstrates the core lifecycle operations for an Astah project, including opening a file from a path and saving the current modifications. ```java ProjectAccessor projectAccessor = AstahAPI.getAstahAPI().getProjectAccessor(); // Open an existing project projectAccessor.open("path/to/project.asta"); // Perform operations... // Save the project projectAccessor.save(); // Close the project projectAccessor.close(); ``` -------------------------------- ### GET /attribute/multiplicity Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IAttribute.html Retrieves the multiplicity range of an association. ```APIDOC ## GET /attribute/multiplicity ### Description Returns the array of multiplicity ranges for an association. ### Method GET ### Endpoint /attribute/multiplicity ### Response #### Success Response (200) - **multiplicity** (Array) - An array of IMultiplicityRange objects. ``` -------------------------------- ### POST /project/open Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Opens an Astah project file from a given file path or input stream. ```APIDOC ## POST /project/open ### Description Opens an Astah project file using the ProjectAccessor interface. Supports loading from file paths or input streams with optional parameters for read-only or specific loading modes. ### Method POST ### Endpoint /project/open ### Parameters #### Request Body - **path** (String) - Optional - The file path to the .asta project file. - **inputStream** (InputStream) - Optional - The input stream of the project file. - **readOnly** (boolean) - Optional - Whether to open the project in read-only mode. ### Request Example { "path": "C:/projects/my_model.asta", "readOnly": false } ### Response #### Success Response (200) - **status** (String) - Success message indicating the project is open. #### Response Example { "status": "Project opened successfully" } ``` -------------------------------- ### Get Diagram Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/DiagramEditor.html Retrieves the current diagram being edited. ```APIDOC ## GET /api/diagrams/current ### Description Get Diagram in DiagramEditor. ### Method GET ### Endpoint `/api/diagrams/current` ### Response #### Success Response (200) - **IDiagram** (IDiagram) - The current diagram object. #### Response Example ```json { "diagramId": "diag_xyz", "name": "MyDiagram" } ``` ``` -------------------------------- ### Retrieve SystemPropertyAccessor instance Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/system/SystemPropertyAccessorFactory.html Demonstrates how to obtain an instance of the SystemPropertyAccessor using the factory. Note that this class is deprecated and only one instance can be created. ```java import com.change_vision.jude.api.inf.system.SystemPropertyAccessor; import com.change_vision.jude.api.inf.system.SystemPropertyAccessorFactory; // Retrieve the accessor using the default method SystemPropertyAccessor accessor = SystemPropertyAccessorFactory.getSystemPropertyAccessor(); // Alternatively, retrieve using a specific ClassLoader ClassLoader cl = Thread.currentThread().getContextClassLoader(); SystemPropertyAccessor accessorWithLoader = SystemPropertyAccessorFactory.getSystemPropertyAccessor(cl); ``` -------------------------------- ### GET /api/system/properties Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Accesses and manages Astah system properties. ```APIDOC ## GET /api/system/properties ### Description Retrieves the current system property accessor to read or write Astah configuration properties. ### Method GET ### Endpoint /api/system/properties ### Parameters None ### Request Example GET /api/system/properties ### Response #### Success Response (200) - **properties** (object) - A map of current system properties. #### Response Example { "properties": { "astah.version": "11.0.0", "mode": "professional" } } ``` -------------------------------- ### IPartition Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Methods for partition elements. ```APIDOC ## GET getPreviousPartition ### Description Get left partition or upper partition. ### Method GET ### Endpoint N/A (Method within an interface) ### Parameters None ### Request Example None ### Response - **PreviousPartition** (IPartition) - The previous partition. ``` -------------------------------- ### GET /api/astah/window/parameters Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/ui/IWindow.html Retrieves internal parameters for the window object. ```APIDOC ## GET /api/astah/window/parameters ### Description Provides access to internal parameters. Note: This is for internal use only and may change in future versions. ### Method GET ### Endpoint /api/astah/window/parameters ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **parameters** (Map) - A map containing internal configuration parameters. #### Response Example { "parameters": {} } ``` -------------------------------- ### POST /createInstanceSpecificationLink Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/ClassDiagramEditor.html Creates a link presentation between two instance specifications. ```APIDOC ## POST /createInstanceSpecificationLink ### Description Creates a Link Presentation between a source and target node on the diagram. ### Method POST ### Endpoint /createInstanceSpecificationLink ### Parameters #### Request Body - **source** (INodePresentation) - Required - The source node. - **target** (INodePresentation) - Required - The target node. ### Request Example { "source": "node_1", "target": "node_2" } ### Response #### Success Response (200) - **link** (ILinkPresentation) - The created link presentation. #### Response Example { "link": "ILinkPresentation_Instance" } ``` -------------------------------- ### GET /ITimingDiagram/getInteraction Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/ITimingDiagram.html Retrieves the interaction associated with the timing diagram. ```APIDOC ## GET /ITimingDiagram/getInteraction ### Description Retrieves the IInteraction object associated with the current timing diagram instance. ### Method GET ### Endpoint /ITimingDiagram/getInteraction ### Parameters None ### Request Example GET /ITimingDiagram/getInteraction ### Response #### Success Response (200) - **interaction** (IInteraction) - The interaction object associated with the timing diagram. #### Response Example { "interaction": { "id": "interaction_001", "name": "TimingInteraction" } } ``` -------------------------------- ### GET /requirement/text Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IRequirement.html Retrieves the descriptive text content of the requirement. ```APIDOC ## GET /requirement/text ### Description Retrieves the full text description associated with the requirement. ### Method GET ### Endpoint /requirement/text ### Response #### Success Response (200) - **text** (String) - The descriptive text of the requirement. #### Response Example { "text": "The system shall allow users to login." } ``` -------------------------------- ### Create Astah Project (Multiple Overloads) Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/project/ProjectAccessor.html Creates a new Astah project. Supports various overloads to specify project path, template path, and whether to use user-defined tagged values. Throws IOException for I/O errors and ProjectNotFoundException if a template path is invalid. ```java void create(String projectPath, boolean useDefinedTaggedValues) ``` ```java void create(String projectPath) ``` ```java void create() ``` ```java void create(String projectPath, String templatePath, boolean useDefinedTaggedValues) ``` ```java void create(String projectPath, String templatePath) ``` -------------------------------- ### GET /requirement/id Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IRequirement.html Retrieves the unique identifier associated with the requirement. ```APIDOC ## GET /requirement/id ### Description Retrieves the Requirement ID string from the IRequirement object. ### Method GET ### Endpoint /requirement/id ### Response #### Success Response (200) - **id** (String) - The unique identifier of the requirement. #### Response Example { "id": "REQ-001" } ``` -------------------------------- ### POST /createInstanceSpecification Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/ClassDiagramEditor.html Creates an instance specification on the active diagram at a specific location. ```APIDOC ## POST /createInstanceSpecification ### Description Creates an instance specification on the current diagram. Supports specifying the class name via FQCN. ### Method POST ### Endpoint /createInstanceSpecification ### Parameters #### Request Body - **name** (String) - Required - The instance name. - **className** (String) - Optional - The class name or FQCN. - **location** (Point2D) - Required - The coordinate on the diagram. ### Request Example { "name": "instance1", "className": "com.example.MyClass", "location": {"x": 100, "y": 100} } ### Response #### Success Response (200) - **presentation** (INodePresentation) - The created instance presentation. #### Response Example { "presentation": "INodePresentation_Instance" } ``` -------------------------------- ### GET /IProcessBox/getOperator Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IProcessBox.html Retrieves the operator string associated with the ProcessBox. ```APIDOC ## GET /IProcessBox/getOperator ### Description Returns the operator defined for this ProcessBox. ### Method GET ### Endpoint /IProcessBox/getOperator ### Response #### Success Response (200) - **operator** (String) - The operator string. #### Response Example { "operator": "ProcessOperator" } ``` -------------------------------- ### Creating Node Presentations in Astah API Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/StructureDiagramEditor.html Demonstrates how to instantiate a node presentation within a structure diagram. Requires an IElement model and a Point2D location for placement. ```java INodePresentation createNodePresentation(IElement model, Point2D location); INodePresentation createNodePresentation(IElement model, INodePresentation parent, Point2D location); ``` -------------------------------- ### POST /dependencies/verify Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/BasicModelEditor.html Creates a Verify dependency between a TestCase and a Requirement. ```APIDOC ## POST /dependencies/verify ### Description Creates a Verify dependency between a source TestCase and a target Requirement. ### Method POST ### Endpoint /dependencies/verify ### Parameters #### Request Body - **source** (ITestCase) - Required - The source TestCase model. - **target** (IRequirement) - Required - The target Requirement model. - **name** (String) - Required - The name of the Verify dependency. ### Response #### Success Response (200) - **IDependency** - The created Verify dependency object. #### Error Handling - PARAMETER_ERROR_KEY: Parameter not set properly. - ILLEGALMODELTYPE_ERROR_KEY: Illegal model type. - BAD_TRANSACTION_KEY: Bad transaction. - HAS_EXCEPTION_KEY: Exception occurred. ``` -------------------------------- ### GET /IProcessBox/getProcessBoxID Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IProcessBox.html Retrieves the unique identifier for the ProcessBox instance. ```APIDOC ## GET /IProcessBox/getProcessBoxID ### Description Returns the unique ID associated with the ProcessBox. ### Method GET ### Endpoint /IProcessBox/getProcessBoxID ### Response #### Success Response (200) - **id** (String) - The unique identifier of the ProcessBox. #### Response Example { "id": "PB-12345" } ``` -------------------------------- ### POST /project/open Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/project/ProjectAccessor.html Opens an Astah project file. Supports various configurations including model version checking, locking, and read-only modes. ```APIDOC ## POST /project/open ### Description Opens an existing Astah project file. Can be configured to ignore model version mismatches, lock the file, or open in read-only mode. ### Method POST ### Endpoint /project/open ### Parameters #### Request Body - **projectName** (String) - Required - The path or name of the project file. - **isIgnoreModelVersion** (boolean) - Optional - Whether to bypass the model version check. - **lockMode** (boolean) - Optional - Whether to lock the project file upon opening. - **allowReadOnly** (boolean) - Optional - Whether to allow opening in read-only mode if locked. ### Request Example { "projectName": "my_project.asta", "isIgnoreModelVersion": false, "lockMode": true, "allowReadOnly": true } ### Response #### Success Response (200) - **status** (String) - Success message indicating the project is open. #### Response Example { "status": "success" } ``` -------------------------------- ### Get Element Stereotypes Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IElement.html Retrieves all stereotypes applied to the element. ```APIDOC ## GET /element/stereotypes ### Description Get all stereotypes applied to this element. ### Method GET ### Endpoint `/element/stereotypes` ### Parameters None ### Response #### Success Response (200) - **stereotypes** (String[]) - An array of stereotype names. Returns an empty array if no stereotypes are found. #### Response Example ```json { "stereotypes": [ "stereotype1", "stereotype2" ] } ``` ``` -------------------------------- ### Plugin UI Initialization Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Methods related to the initialization of plugin-specific UI components within Astah. ```APIDOC ## Plugin UI Initialization Methods ### `IPluginModelTab.initPanel()` This method is called when the tab is initialized by the application. Implementations should set up the UI for the model tab. ### `IPluginModelTab.Stub.initPanel()` Stub implementation for `IPluginModelTab.initPanel()`. ### `IPluginTabView.initTreeModel()` This method is called when the tab is initialized by the application. Implementations should set up the tree model for the view tab. ### `IPluginTabView.Stub.initTreeModel()` Stub implementation for `IPluginTabView.initTreeModel()`. ``` -------------------------------- ### Get Element Comments Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IElement.html Retrieves all comments associated with the element. ```APIDOC ## GET /element/comments ### Description Get all comments associated with this element. ### Method GET ### Endpoint `/element/comments` ### Parameters None ### Response #### Success Response (200) - **comments** (IComment[]) - An array of comments. Returns an empty array if no comments are found. #### Response Example ```json { "comments": [ { "id": "comment-id-1", "content": "This is the first comment." }, { "id": "comment-id-2", "content": "Another comment here." } ] } ``` ``` -------------------------------- ### Get Element ID Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IElement.html Retrieves the unique identifier for the element. ```APIDOC ## GET /element/id ### Description Get the unique identifier of the element. ### Method GET ### Endpoint `/element/id` ### Parameters None ### Response #### Success Response (200) - **id** (String) - The unique identifier of the element. #### Response Example ```json { "id": "some-unique-id" } ``` ``` -------------------------------- ### POST /diagram/open Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Opens a specific diagram in the Astah Diagram Editor. ```APIDOC ## POST /diagram/open ### Description Opens the specified diagram using the IDiagramViewManager interface. ### Method POST ### Endpoint /diagram/open ### Parameters #### Request Body - **diagramId** (String) - Required - The unique identifier of the diagram to open. ### Request Example { "diagramId": "diagram_001" } ### Response #### Success Response (200) - **message** (String) - Confirmation that the diagram is now visible in the editor. ``` -------------------------------- ### GET /api/astah/extend/extended-case Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IExtend.html Retrieves the extending UseCase from an IExtend object. ```APIDOC ## GET /api/astah/extend/extended-case ### Description Retrieves the UseCase that is performing the extension (the extending UseCase). ### Method GET ### Endpoint /api/astah/extend/extended-case ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the IExtend element. ### Request Example GET /api/astah/extend/extended-case?id=12345 ### Response #### Success Response (200) - **useCase** (Object) - The extending IUseCase object. #### Response Example { "useCase": { "id": "uc_002", "name": "ExtendingUseCase" } } ``` -------------------------------- ### Create Transition Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/StateMachineDiagramEditor.html Creates a transition between two specified source and target presentations. ```APIDOC ## POST /api/transition ### Description Creates a transition between a source and a target presentation. ### Method POST ### Endpoint /api/transition ### Parameters #### Request Body - **source** (INodePresentation) - Required - Source Presentation - **target** (INodePresentation) - Required - Target Presentation ### Response #### Success Response (200) - **ILinkPresentation** - The created transition presentation. #### Response Example ```json { "presentation": "..." } ``` ### Error Handling - **InvalidEditingException**: InvalidEditingException occurs. - **PARAMETER_ERROR_KEY**: if a parameter is not set properly. - **NO_TARGET_DIAGRAM_KEY**: if target Diagram is not set. - **ILLEGAL_DIAGRAM_TYPE_KEY**: if the diagram type is illegal. - **INVALID_DIAGRAM_ERROR_KEY**: if a diagram of an element is not correct. - **READ_ONLY_MESSAGE**: if a read-only element is edited. - **INVALID_SOURCE_KEY**: if a source of a relation is invalid. - **INVALID_TARGET_KEY**: if a target of a relation is invalid. - **SELF_RELATION_KEY**: if the self relationship is not allowed. - **DUPLICATED_OUTGOING_KEY**: if duplicated outgoings are set. - **DUPLICATED_INCOMING_KEY**: if duplicated incomings are set. - **BAD_TRANSACTION_KEY**: Bad Transaction. - **HAS_EXCEPTION_KEY**: if an exception has occurred. ``` -------------------------------- ### Create Structured Class Presentation (with parent and location) Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/CompositeStructureDiagramEditor.html Creates a visual representation of a Structured Class, specifying its parent presentation and location. ```APIDOC ## POST /api/createStructuredClassPresentation ### Description Creates a visual representation (INodePresentation) of a Structured Class, specifying its parent presentation and location. ### Method POST ### Endpoint /api/createStructuredClassPresentation ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **model** (IElement) - Required - The model element representing the Structured Class. - **parent** (INodePresentation) - Required - The parent presentation for this Structured Class. - **location** (Point2D) - Required - The 2D coordinates for the presentation's location. ### Request Example ```json { "model": "com.astah.api.model.Element", "parent": "com.astah.api.view.INodePresentation", "location": {"x": 100, "y": 100} } ``` ### Response #### Success Response (200) - **INodePresentation** - The created INodePresentation for the Structured Class. #### Response Example ```json { "nodePresentation": "com.astah.api.view.INodePresentation" } ``` ### Throws - `InvalidEditingException` - If parameters are invalid, the model type is illegal, the name is empty, a duplicate name exists, a transaction error occurs, or the element is read-only. ``` -------------------------------- ### GET /api/astah/extend/extension Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IExtend.html Retrieves the extended UseCase from an IExtend object. ```APIDOC ## GET /api/astah/extend/extension ### Description Retrieves the UseCase that is being extended by the current IExtend element. ### Method GET ### Endpoint /api/astah/extend/extension ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the IExtend element. ### Request Example GET /api/astah/extend/extension?id=12345 ### Response #### Success Response (200) - **useCase** (Object) - The extended IUseCase object. #### Response Example { "useCase": { "id": "uc_001", "name": "BaseUseCase" } } ``` -------------------------------- ### GET /enumeration-literal/value Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IEnumerationLiteral.html Retrieves the current value assigned to the EnumerationLiteral. ```APIDOC ## GET /enumeration-literal/value ### Description Retrieves the string value associated with the current EnumerationLiteral instance. ### Method GET ### Endpoint /enumeration-literal/value ### Response #### Success Response (200) - **value** (String) - The current value of the enumeration literal. #### Response Example { "value": "ExampleValue" } ``` -------------------------------- ### GET /ierpackage/all-entities Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IERPackage.html Retrieves all entities within the package and its sub-packages. ```APIDOC ## GET /ierpackage/all-entities ### Description Retrieves an array of all IEREntity objects contained within the package, including those nested in sub-packages. ### Method GET ### Endpoint /ierpackage/all-entities ### Response #### Success Response (200) - **entities** (IEREntity[]) - An array of all entities found recursively. Returns an empty array if none exist. #### Response Example [ { "id": "entity_001", "name": "User" }, { "id": "entity_003", "name": "SubPackageEntity" } ] ``` -------------------------------- ### Create Port Presentation (with name, data type, and location) Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/CompositeStructureDiagramEditor.html Creates a port presentation on a specified target presentation (part or structured class) with a given name, data type, and location. ```APIDOC ## POST /api/createPortPresentation ### Description Creates a port presentation on a part or structured class with a specified name, data type, and location. ### Method POST ### Endpoint /api/createPortPresentation ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **targetPresentation** (INodePresentation) - Required - The presentation to which the port will be added (part or structured class). - **name** (String) - Required - The name of the port. - **dataType** (String) - Required - The data type for the port. - **location** (Point2D) - Required - The 2D coordinates for the port's location. ### Request Example ```json { "targetPresentation": "com.astah.api.view.INodePresentation", "name": "PortName", "dataType": "String", "location": {"x": 50, "y": 50} } ``` ### Response #### Success Response (200) - **INodePresentation** - The created INodePresentation for the port. #### Response Example ```json { "nodePresentation": "com.astah.api.view.INodePresentation" } ``` ### Throws - `InvalidEditingException` - If parameters are invalid, the model type is illegal, the name is empty, a transaction error occurs, or the element is read-only. ``` -------------------------------- ### GET /IAssociation/getMemberEnds Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IAssociation.html Retrieves the member ends (attributes) of an association. ```APIDOC ## GET /IAssociation/getMemberEnds ### Description Retrieves an array of IAttribute objects representing the member ends of the association. ### Method GET ### Endpoint /IAssociation/getMemberEnds ### Parameters None ### Request Example N/A (Method call on IAssociation object instance) ### Response #### Success Response (200) - **IAttribute[]** (Array) - An array of attributes representing the association ends. #### Response Example [ { "id": "attr_001", "name": "end1" }, { "id": "attr_002", "name": "end2" } ] ``` -------------------------------- ### ProjectAccessorFactory Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Factory methods for creating ProjectAccessor instances. ```APIDOC ## GET getProjectAccessor (Static) ### Description Deprecated. Create ProjectAccessor. ### Method GET ### Endpoint N/A (Static method) ### Parameters None ### Request Example None ### Response - **ProjectAccessor** (ProjectAccessor) - A new ProjectAccessor instance. ``` -------------------------------- ### PresentationPropertyUtil Class Overview Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/presentation/PresentationPropertyUtil.html Overview of the PresentationPropertyUtil class and its purpose. ```APIDOC ## Class: PresentationPropertyUtil ### Description This is a utility class for creating the property-related keys for Presentations. ### Since 6.8.0 ### See Also * `IPresentation` * `PresentationPropertyConstants.Key` ``` -------------------------------- ### Project Creation API Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Methods for creating new Astah projects with various configurations. ```APIDOC ## Project Creation ### Description Methods for creating Astah projects with different options for loading user-defined tagged values. ### Methods #### `create()` Creates an Astah project without loading user-defined tagged values. #### `create(String name)` Creates an Astah project with the specified name, without loading user-defined tagged values. #### `create(String name, boolean loadTaggedValues)` Creates an Astah project with the specified name and loads user-defined tagged values if `true`. #### `create(String name, String projectPath)` Creates an Astah project with the specified name and path, without loading user-defined tagged values. #### `create(String name, String projectPath, boolean loadTaggedValues)` Creates an Astah project with the specified name, path, and loads user-defined tagged values if `true`. ### Endpoint N/A (These are methods within the `ProjectAccessor` interface) ### Parameters - **name** (String) - Required - The name of the project. - **projectPath** (String) - Optional - The path where the project will be created. - **loadTaggedValues** (boolean) - Optional - Whether to load user-defined tagged values. ### Request Example ```java // Example for create(String name, boolean loadTaggedValues) ProjectAccessor projectAccessor = ...; projectAccessor.create("MyProject", true); ``` ### Response - **Project** - The newly created Astah project object. ``` -------------------------------- ### Implementing a Custom Plugin Tab View Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/ui/IPluginTabView.Stub.html Example of how to extend the IPluginTabView.Stub class to create a custom tab. You must override the abstract methods to define the UI component and metadata for the tab. ```java import com.change_vision.jude.api.inf.ui.IPluginTabView; import java.awt.Component; import javax.swing.JLabel; public class MyCustomTab extends IPluginTabView.Stub { @Override public String getTitle() { return "My Custom Tab"; } @Override public String getDescription() { return "This is a custom tab implementation."; } @Override public Component getComponent() { return new JLabel("Hello, Astah!"); } } ``` -------------------------------- ### GET /api/usage/supplier Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IUsage.html Retrieves the supplier element associated with the usage relationship. ```APIDOC ## GET /api/usage/supplier ### Description Retrieves the supplier INamedElement from the IUsage interface. ### Method GET ### Endpoint /api/usage/supplier ### Parameters None ### Request Example GET /api/usage/supplier ### Response #### Success Response (200) - **supplier** (INamedElement) - The supplier element involved in the usage. #### Response Example { "supplier": { "id": "uuid-5678", "name": "SupplierElement" } } ``` -------------------------------- ### GET /api/usage/client Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IUsage.html Retrieves the client element associated with the usage relationship. ```APIDOC ## GET /api/usage/client ### Description Retrieves the client INamedElement from the IUsage interface. ### Method GET ### Endpoint /api/usage/client ### Parameters None ### Request Example GET /api/usage/client ### Response #### Success Response (200) - **client** (INamedElement) - The client element involved in the usage. #### Response Example { "client": { "id": "uuid-1234", "name": "ClientElement" } } ``` -------------------------------- ### Create ProjectAccessor using ProjectAccessorFactory Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/project/ProjectAccessorFactory.html This method creates a ProjectAccessor instance. It is deprecated and should not be used in new code. Only one ProjectAccessor can be created at a time, and operating on multiple projects simultaneously is not supported. It may throw a ClassNotFoundException if the class path is invalid. ```java public static ProjectAccessor getProjectAccessor() Deprecated. Create ProjectAccessor. ``` ```java public static ProjectAccessor getProjectAccessor(ClassLoader classLoader) Deprecated. Create ProjectAccessor. ``` -------------------------------- ### GET /state/activities Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IState.html Retrieves the entry, exit, and do-activity strings for a state. ```APIDOC ## GET /state/activities ### Description Retrieves the defined entry, exit, and do-activity behaviors for the state. ### Method GET ### Endpoint /state/activities ### Response #### Success Response (200) - **entry** (String) - The entry activity string. - **exit** (String) - The exit activity string. - **doActivity** (String) - The do-activity string. #### Response Example { "entry": "init()", "exit": "cleanup()", "doActivity": "process()" } ``` -------------------------------- ### Project Accessor Methods Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Documentation for methods available through the `ProjectAccessor` interface, specifically for importing project data. ```APIDOC ## Project Accessor Methods ### `importXMI(String filePath)` Opens an Astah* Project's XMI file from the specified file path. ### `importXMI(String filePath, boolean ignoreVersion)` Opens an Astah* Project's XMI file from the specified file path, with an option to ignore version compatibility issues. ``` -------------------------------- ### Create Scalable Icons (Java) Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/index-all.html Method for creating icons that can dynamically scale based on display size, managed by the IIconManager interface. ```Java createScalableIcon(URL) ``` -------------------------------- ### GET /IProcessBox/getDataFlowDiagram Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IProcessBox.html Retrieves the Data Flow Diagram associated with the ProcessBox. ```APIDOC ## GET /IProcessBox/getDataFlowDiagram ### Description Returns the IDataFlowDiagram object linked to the ProcessBox. ### Method GET ### Endpoint /IProcessBox/getDataFlowDiagram ### Response #### Success Response (200) - **diagram** (IDataFlowDiagram) - The associated data flow diagram object. #### Response Example { "diagram": { "name": "Main DFD", "id": "DFD-001" } } ``` -------------------------------- ### GET /lifeline/base Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/ILifeline.html Retrieves or sets the base class associated with the lifeline. ```APIDOC ## GET/PUT /lifeline/base ### Description Retrieves the base class of the lifeline or updates it with a new base class. ### Method GET, PUT ### Endpoint /lifeline/base ### Parameters #### Request Body (PUT) - **base** (IClass) - Required - The base class to assign to the lifeline. ### Response #### Success Response (200) - **base** (IClass) - The current base class object. #### Response Example { "id": "class_001", "name": "User" } ``` -------------------------------- ### Create Transition in Astah API Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/StateMachineDiagramEditor.html Creates a transition link between a source and a target node presentation. Returns an ILinkPresentation object representing the new transition. ```java ILinkPresentation createTransition(INodePresentation source, INodePresentation target); ``` -------------------------------- ### POST /project/xmi Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/project/ProjectAccessor.html Imports or exports project data in XMI format. ```APIDOC ## POST /project/xmi ### Description Handles XMI import and export operations for Astah projects. ### Method POST ### Endpoint /project/xmi ### Parameters #### Request Body - **action** (String) - Required - Either 'import' or 'export'. - **fileName** (String) - Required - The XMI file path. - **isIgnoreModelVersion** (boolean) - Optional - Used during import to bypass version checks. ### Request Example { "action": "import", "fileName": "data.xmi", "isIgnoreModelVersion": true } ### Response #### Success Response (200) - **status** (String) - Success message indicating the XMI operation completed. ``` -------------------------------- ### Get Element Owner Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IElement.html Retrieves the hierarchical parent (namespace) of the element. ```APIDOC ## GET /element/owner ### Description Get the namespace or hierarchical parent of the element. ### Method GET ### Endpoint `/element/owner` ### Parameters None ### Response #### Success Response (200) - **owner** (IElement) - The owner element. Returns null if there is no owner. #### Response Example ```json { "owner": { "id": "parent-element-id", "name": "Parent Element Name" } } ``` ``` -------------------------------- ### Create IMessageDialogHandler using Factory Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/ui/IMessageDialogHandlerFactory.html Demonstrates how to use the IMessageDialogHandlerFactory to create a handler instance. Requires an IMessageProvider and a string path for error logging. ```java IMessageDialogHandlerFactory factory = ...; // Obtained via service lookup IMessageProvider provider = ...; // Your plugin message provider String logPath = "logs/error.log"; IMessageDialogHandler handler = factory.createMessageDialogHandler(provider, logPath); ``` -------------------------------- ### GET /diagram/properties Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IDiagram.html Retrieves or sets properties associated with a diagram element. ```APIDOC ## GET/POST /diagram/properties ### Description Allows retrieval and modification of properties associated with a diagram element. ### Method GET, POST ### Endpoint /diagram/properties ### Parameters #### Query Parameters - **key** (String) - Optional - The specific property key to retrieve. #### Request Body - **key** (String) - Required - The property key. - **value** (String) - Required - The property value to set. ### Response #### Success Response (200) - **properties** (HashMap) - The map of all properties. #### Error Response (400/500) - **InvalidEditingException** - Thrown if editing is restricted (e.g., read-only, bad transaction, or community edition). ``` -------------------------------- ### GET /diagrams/{id}/properties Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/model/IDiagram.html Retrieves the properties associated with a diagram. ```APIDOC ## GET /diagrams/{id}/properties ### Description Returns a map of properties defined for the diagram. ### Method GET ### Endpoint /diagrams/{id}/properties ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the diagram. ### Response #### Success Response (200) - **properties** (object) - A key-value map of diagram properties. #### Response Example { "properties": { "name": "MyDiagram", "version": "1.0" } } ``` -------------------------------- ### Create Provided Interface Presentation - Java Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/CompositeStructureDiagramEditor.html Creates a provided interface for a port or a part. Overloads allow specifying just the end presentation, or the end presentation along with a location or a specific interface model. ```Java INodePresentation createProvidedInterfacePresentation(INodePresentation endPresentation) ``` ```Java INodePresentation createProvidedInterfacePresentation(INodePresentation endPresentation, Point2D location) ``` ```Java INodePresentation createProvidedInterfacePresentation(INodePresentation endPresentation, IClass interfaceModel, Point2D location) ``` -------------------------------- ### GET /api/model-editors/er Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/editor/ModelEditorFactory.html Retrieves an instance of the ERModelEditor for Entity-Relationship diagram manipulation. ```APIDOC ## GET /api/model-editors/er ### Description Creates and returns an ERModelEditor instance specifically for ER model modifications. ### Method GET ### Endpoint /api/model-editors/er ### Response #### Success Response (200) - **editor** (ERModelEditor) - The initialized ERModelEditor instance. #### Error Response (500) - **error** (InvalidEditingException) - Thrown if the community version is used. - **error** (ClassNotFoundException) - Thrown if the required class path is invalid. ``` -------------------------------- ### Instantiate ProjectNotFoundException Source: https://members.change-vision.com/javadoc/astah-api/11_0_0/api/en/doc/javadoc/com/change_vision/jude/api/inf/exception/ProjectNotFoundException.html Demonstrates how to instantiate the ProjectNotFoundException class. This exception is typically thrown by the API when a requested project file path is invalid or inaccessible. ```java try { throw new com.change_vision.jude.api.inf.exception.ProjectNotFoundException(); } catch (com.change_vision.jude.api.inf.exception.ProjectNotFoundException e) { e.printStackTrace(); } ```