Class ProjectCommandLineAction

java.lang.Object
com.nomagic.magicdraw.commandline.ProjectCommandLineAction
All Implemented Interfaces:
CommandLineAction

@OpenApiAll public abstract class ProjectCommandLineAction extends Object implements CommandLineAction
This class contains general methods (open, close project, read command line properties, connect to server, etc) related to project in command line for plugins Override execute(String[], Properties, Project)
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 specified ServerType.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 Details

    • ProjectCommandLineAction

      public ProjectCommandLineAction()
  • Method Details

    • execute

      public final byte execute(String[] args)
      Description copied from interface: CommandLineAction
      Implement this method to execute custom task in running MagicDraw application environment.
      Specified by:
      execute in interface CommandLineAction
      Returns:
      application exit status.
    • execute

      protected abstract byte execute(String[] args, Properties properties, Project project)
      Override this method to execute your custom task(s) in running MagicDraw environment on opened project.
      Parameters:
      args - arguments environment was started with
      properties - parsed arguments for this project
      project - project opened based on provided arguments
      Returns:
      application exit status (default is 0).