Class ProjectCommandLine
java.lang.Object
com.nomagic.magicdraw.commandline.CommandLine
com.nomagic.magicdraw.commandline.ProjectCommandLine
MagicDraw commandline launcher capable of opening project provided using default project arguments.
Extend it and implement
Arguments are specified as name=value pairs.
Default arguments that will be used to try and open project:
execute(Properties, Project)
.
Specific argument parsing can be done by overriding parseArguments(String[])
Arguments are specified as name=value pairs.
Default arguments that will be used to try and open project:
- project - Project name or path
- projectDescriptor - Project descriptor
- server - Server url
- username - Username on server
- password - Password for provided username
- enableSSL - To use ssl
- serverType - Should be any value of
ServerType
, if not specifiedServerType.TEAMWORK_CLOUD
will be used - encryptPassword - Set true if provided password is in plain text
- properties - Path to properties file containing properties. Multiple properties files can be provided "properties=prop1.properties;prop2.properties"
- projectPassword - Project password
- version - Project version
- branch - Project branch
- useDefaultPropertyValidation - set false to disable validation of default properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final byte
execute()
Override this method to execute your custom task(s) in running MagicDraw environment.protected abstract byte
execute
(Properties properties, Project project) Override this method to execute your custom task(s) in running MagicDraw environment on opened project.protected final void
Override to parse arguments before launching MagicDraw.protected void
parseArguments
(String[] args) Override to parse arguments before launching MagicDraw.Methods inherited from class com.nomagic.magicdraw.commandline.CommandLine
launch
-
Constructor Details
-
ProjectCommandLine
public ProjectCommandLine()
-
-
Method Details
-
parseArgs
Description copied from class:CommandLine
Override to parse arguments before launching MagicDraw.- Overrides:
parseArgs
in classCommandLine
- Parameters:
args
- program arguments- Throws:
Exception
- if arguments are not correct and MagicDraw should not be started
-
parseArguments
Override to parse arguments before launching MagicDraw.- Parameters:
args
- program arguments- Throws:
Exception
- if arguments are not correct and MagicDraw should not be started
-
execute
protected final byte execute()Description copied from class:CommandLine
Override this method to execute your custom task(s) in running MagicDraw environment. Do not explicitly call this method - callCommandLine.launch(String[])
to launch the commandline.- Specified by:
execute
in classCommandLine
- Returns:
- application exit status
-
execute
Override this method to execute your custom task(s) in running MagicDraw environment on opened project.- Parameters:
properties
- parsed arguments for this projectproject
- project opened based on provided arguments- Returns:
- application exit status (default is 0).
-