Class ProjectCommandLine
- java.lang.Object
-
- com.nomagic.magicdraw.commandline.CommandLine
-
- com.nomagic.magicdraw.commandline.ProjectCommandLine
-
@OpenApiAll public abstract class ProjectCommandLine extends CommandLine
MagicDraw commandline launcher capable of opening project provided using default project arguments. Extend it and implementexecute(Properties, Project)
. Specific argument parsing can be done by overridingparseArguments(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
- 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
Constructors Constructor Description ProjectCommandLine()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected byte
execute()
Override this method to execute your custom task(s) in running MagicDraw environment.protected abstract byte
execute(java.util.Properties properties, Project project)
Override this method to execute your custom task(s) in running MagicDraw environment on opened project.protected void
parseArgs(java.lang.String[] args)
Override to parse arguments before launching MagicDraw.protected void
parseArguments(java.lang.String[] args)
Override to parse arguments before launching MagicDraw.-
Methods inherited from class com.nomagic.magicdraw.commandline.CommandLine
launch
-
-
-
-
Method Detail
-
parseArgs
protected final void parseArgs(java.lang.String[] args) throws java.lang.Exception
Description copied from class:CommandLine
Override to parse arguments before launching MagicDraw.- Overrides:
parseArgs
in classCommandLine
- Parameters:
args
- program arguments- Throws:
java.lang.Exception
- if arguments are not correct and MagicDraw should not be started
-
parseArguments
protected void parseArguments(java.lang.String[] args) throws java.lang.Exception
Override to parse arguments before launching MagicDraw.- Parameters:
args
- program arguments- Throws:
java.lang.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
protected abstract byte execute(java.util.Properties properties, Project project)
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).
-
-