See: Description
Interface | Description |
---|---|
Command |
A command that is executed on a DOORS client to either create, modify or delete information in the DOORS database.
|
CommandFragment |
A command might be decomposed into multiple fragments,
each one modifying a different portion of the data.
|
EditDiscussionFragment |
A fragment that updates discussions on modules or objects.
|
EditModuleFragment |
A fragment that modifies a portion of a module being edited in exclusive mode.
|
ObjectFragment |
A fragment that creates an object in a DOORS formal module.
|
ShareModuleFragment |
A fragment that modifies a portion of a module being edited in share mode.
|
Class | Description |
---|---|
ArchiveModuleCommand |
Creates a DOORS archive of a specific module.
|
ArchiveProjectCommand |
Creates a DOORS archive of a specific project.
|
BaselineRef |
References a DOORS module baseline.
|
CloseDiscussionFragment |
Closes a DOORS discussion, owned by a module or an object.
|
CloseModuleCommand |
Closes a DOORS module.
|
CommandRunner |
Requests the execution of commands on a DOORS client to either create, modify or delete information in the DOORS database.
|
CommandWrapper |
Internal class that acts as a base implementation for commands.
|
CreateAttributeFragment |
Creates a new attribute definition in a DOORS module.
|
CreateAttributeFragment.Builder |
Builds an instance of
CreateAttributeFragment with detailed properties. |
CreateBaselineCommand |
Creates a baseline for a DOORS module.
|
CreateCommentFragment |
Adds a new comment in a discussion in a DOORS formal module, either on the module itself or on an object.
|
CreateDiscussionFragment |
Adds a new discussion in a DOORS formal module, either on the module itself or on an object.
|
CreateExternalLinkFragment |
Adds a new external link on a DOORS object.
|
CreateFolderCommand |
Creates a new DOORS folder.
|
CreateLinkFragment |
Creates a new link between two DOORS objects.
|
CreateModuleCommand |
Creates a new DOORS module, which can be either a formal module or a link module.
|
CreateObjectFragment |
Creates a new object in a DOORS formal module.
|
CreatePictureFragment |
Adds a new picture object in a DOORS formal module.
|
CreateProjectCommand |
Creates a new DOORS project.
|
CreateTableFragment |
Adds a new table object in a DOORS formal module.
|
CreateTypeFragment |
Creates a new type in a DOORS module.
|
DeleteAttributeFragment |
Deletes a DOORS attribute definition.
|
DeleteDiscussionFragment |
Deletes a discussion in a DOORS formal module, either on the module itself or on an object.
|
DeleteExternalLinkFragment |
Deletes an external link on a DOORS object.
|
DeleteItemCommand |
Deletes a DOORS item, which can be either a module, a folder or a project.
|
DeleteLinkFragment |
Deletes a link between two DOORS objects.
|
DeletePictureFragment |
Deletes the picture contained in a DOORS object.
|
DeleteTypeFragment |
Deletes a DOORS type.
|
DiscussionRef |
References a discussion attached to a DOORS formal module or an object.
|
EditDiscussionCommand |
Edits discussions in a module, either set on the module itself or on its contained objects.
|
EditModuleCommand |
Edits a DOORS module an modifies its content.
|
ExternalLinkRef |
References an external link attached to a DOORS object.
|
FolderRef |
References a DOORS folder or project.
|
GetAttributeValueFragment |
Retrieves the attribute value of a DOORS object or of the edited module.
|
InsertLocation |
Determines the location in a module where a new object should be inserted
or where an existing object should be moved.
|
ItemRef |
References to a DOORS item, which is either a module, a folder or a project.
|
LinkRef |
References a DOORS link.
|
ModuleRef |
References a DOORS module.
|
MoveObjectFragment |
Moves an existing object to another location within the same module.
|
ObjectRef |
References a DOORS object.
|
PictureRef |
References a picture.
|
PurgeItemCommand |
Purges a DOORS deleted item, which can be either a module, a folder or a project.
|
ReopenDiscussionFragment |
Reopens a DOORS discussion, owned by a formal module or an object.
|
ReplacePictureFragment |
Replaces the picture contained in a DOORS object.
|
ResizeTableFragment |
Changes the size of the table (number of rows and of columns).
|
RestoreModuleCommand |
Restores a DOORS module archive.
|
RestoreProjectCommand |
Restores a DOORS project archive.
|
SaveModuleCommand |
Saves a DOORS module.
|
SetAttributeValueFragment |
Updates the attribute value of an object or of the edited module.
|
SetColumnWidthsFragment |
Changes the dimensions of the columns of a DOORs table object.
|
ShareModuleCommand |
Edits in share mode a DOORS formal module an modifies its content.
|
SoftDeleteObjectFragment |
Deletes a DOORS object in a module.
|
UpdateAttributeFragment |
Updates the properties of a DOORS attribute definition.
|
UpdateAttributeFragment.Builder |
Builds an instance of
UpdateAttributeFragment with specified properties to modify. |
UpdateExternalLinkFragment |
Updates the properties of an existing external link on a DOORS object.
|
UpdateTypeFragment |
Updates the properties of a DOORS type.
|
UpdateTypeFragment.Builder |
Builds an instance of
UpdateTypeFragment with specified properties to modify. |
Enum | Description |
---|---|
CreateAttributeFragment.Scope |
Determines on which type of element an attribute is available.
|
EditModuleCommand.TerminationMode |
Determines the behavior of the
EditModuleCommand command when it successfully completes. |
ShareModuleCommand.NoEditableSectionStrategy |
Determines the strategy to apply when one object to be modified cannot be locked
because it is not defined in an editable section
|
A command is a small and direct interaction between the Java program and the DOORS client. When executed, the modification made by the command occurs on the DOORS database itself, not on the DOORS EMF model loaded in memory.
Here are the available commands:
Element | Commands |
---|---|
Folders and Projects | create, delete and purge |
Modules | create, edit, save, close, delete and purge |
Objects | create, move and delete |
Tables | create, move, resize table, change column widths and delete |
Pictures | insert, replace and delete |
Types | create, update and delete |
Attributes | create a definition, update a definition, delete a definition, read value and update value |
Discussions | create, add comments, close, reopen and delete |
Links | create and delete |
External Links | create, update and delete |
Baselines | create a baseline |
Archives | archive and restore a module, archive and restore a project |
A CommandRunner is in charge to execute and monitor commands execution.
A CommandRunner
interacts with one DOORS client and can be used to run multiple commands,
each command being executed sequentially.
Below is a sample code showing how to run a command in DOORS using a batch client:
MDWorkbench workbench = null; DoorsApplication application = null; try { // create DOORS batch client PropertySet properties = new DefaultPropertySet(); properties.setProperty(Common.PREFERENCE_DOORS_IS_SILENT, true); properties.setProperty(Common.PREFERENCE_DOORS_PATH, "C:\\Program Files (x86)\\IBM\\Rational\\DOORS\\9.5\\bin\\doors.exe"); properties.setProperty(Common.PREFERENCE_DOORS_PORTSERVER, "36677@mserver"); properties.setProperty(Common.PREFERENCE_DOORS_USER, "myuser"); properties.setProperty(Common.PREFERENCE_DOORS_PASSWORD, "mypassword"); application = DoorsUtils.createApplication(properties); // Instantiate a command to be executed in DOORS Command command = new CreateFolderCommand(FolderRef.qualifiedName("/MyFolder")); // run the command workbench = MDWorkbenchFactory.create(); CommandRunner runner = new CommandRunner(workbench, application); runner.run(command); } finally { if (application != null) { application.dispose(); } if (workbench != null) { workbench.shutdown(); } }
All commands are used to perform atomic operations in the DOORS database: creating a folder, deleting a module, archiving a project, etc. Editing a module is on the other hand an operation that is sightly more complex. For performance an workflow reasons, one cannot imagine to use the edit/modify/save/close cycle on a module for just each modification to be performed, like changing the attribute value of an object. Therefore the command to edit a module is decomposed into multiple fragments. This design offer to capability to perform multiple modifications during the one edit/modify/save cycle.
Below is a sample showing the composition of fragments into a command to edit a module
ModuleRef module = ModuleRef.qualifiedName("/MyFolder/MyModule"); EditModuleCommand command = new EditModuleCommand(module, TerminationMode.SAVE_AND_CLOSE); command.add(new CreateObjectFragment()); command.add(new CreateTableFragment(2, 2)); command.add(new SetAttributeValueFragment(ObjectRef.absoluteNumber(1), "My Attribute", "My Value")); command.add(new CloseDiscussionFragment(DiscussionRef.summary("My Discussion"), "Closing Comment")); runner.run(command);