| Files |
Description |
| WSTDeployer.bat |
This file can be executed with the following arguments:
- configure Displays a configuration dialog to see and change the configured paths.
- deploy Copies files from the Rhapsody model to the configured paths.
- version Displays the tool's version string.
- debug Generates a more detailed log file, should be first argument.
- setRoot(path) Sets the root path to the specified argument within the brackets and switches custom paths off without displaying a dialog. If the path contains spaces it has to be quoted, e.g. setRoot("C:\Program Files\Dest").
- quitRpy Quits Rhapsody after having executed commands which came first. This can be useful for batch processing and regression tests.
- quitRpySave Quits Rhapsody and saves all changes after having executed commands which came first. This can be useful for batch processing and regression tests.
If the tool is started with the deploy command but paths are not yet configured, the configuration dialog will be displayed once. Correct paths can be configured and saved, afterwards the deploy command is executed.
Please note if you start the WSTDeployer with the commands "configure deploy" and cancel the configuration dialog, the deployment will still be started, as the cancel button only cancels the current configuration command.
Running WSTDeployer always requires access to the Rhapsody COM API, no matter what command is used.
Please make sure Rhapsody is running with a project opened and a correctly stereotyped component.
Running the WSTDeployer requires the Java Runtime Environment (JRE) 6 or Java SE Development Kit (JDK) 6 or higher to be installed on your system. You can download the software from Sun Microsystems, Inc.
|
| WSTDeployer.properties |
Configuration file for the WSTDeployer, which is read every time the WSTDeployer is started. The possible properties are documented via comments within the file. They are grouped following the topics:
- Directories and Files
- Tag names
- Stereotype names
- GUI Settings
- ToolchainGateway Strings
- List of supported destinations
|
| Deployment.java |
This class must implement the following methods:
- void deploy(WSTDeployer commonDeployer, DeployConfiguration dc)
|
Prepares and starts the actual deployment.
This consists of different steps:
- Use the RpyConnector class, which is part of the WSTDeployer, to connect to the Rhapsody API
- If no paths are configured automatically ask for the configuration (using makeSurePathsAreConfigured())
- Set up a FileCopySet list including all RXF, Generated, and environment specific files retrieved using RpyConnector and known directories
- FileCopy's copy() method is used to actually copy the files
Parameters:
- commonDeployer: Reference to the WSTDeployer class which is common for all environments
- dc: DeployConfiguration reference
|
| Usually methods like void logFiles(List<File> files, String descr), void logDeployInfos(DeployConfiguration dc) and List<File> filterImplFiles(List<File> files) etc. are also implemented in that class, but they are private methods used via deploy() and not part of the interface. |
|
| ToolchainGateway.java |
This class must implement the following methods:
- boolean addFilesToProject(List<File> files, File project, String type)
|
Adds a list of files to the specified project or workspace file of a toolchain.
Files that already exist in the project will not be added a second time, but new files will be added. In most implementations this function never removes files from the project.
Parameters:
- files: List of files to add to the toolchain project
- project: Path to the toolchain project file
- type: Type of files to be added (e.g. RXF files). Please see toolchain specific implementation for supported values.
The method must return true, if files could be added successfully or if it was not necessary to add files. False will be returned, if the project file can not be opened or seems to be corrupted.
|
|
|
| Constants.java |
This class has to contain:
- static String constants for all properties that should be read from the WSTDeployer.properties file. This means just the property names like DeployEnvName, which will be looked up, but not the property value itself. These Strings all use a "PRP_" prefix.
- static String constant PRPFILE defining the properties file to use, usually WSTDeployer.properties.
- static String constant LOGFILE defining the log file to use, usually WSTDeployerLog.txt.
- the methods:
| String getDest( String key, int destNumber ) |
Returns the value of a destination property, read from the properties file. Destination properties have property names like "Dest2Name", which coule be queried using getDest( PRP_DEST_NAME, 2 ). |
| int getNumberOfDestinations() |
|
| String get(String prpName) |
Returns the value, read from the properties file, which is assigned to the property name. |
| int getInt(String prpName) |
Returns the Integer value, read from the properties file, which is assigned to the property name. |
| public static Constants getInstance() |
Constants is a Singleton class which makes sure there will only be one instance. Using this function it is easily possible to access the one instance of Constants. The first getInstance() call will read theWSTDeployer.properties file using the constructor. |
|
| build_WSTDeployer.bat |
This file can be executed to recompile the WSTDeployer, if one of the bridge files Constants.java, Deployment.java or ToolchainGateway.java has been changed. To rebuild the sources, the Java SE Development Kit (JDK) 6 or higher needs to be installed on your system. |