Harbormaster Model Commands

Table of Contents

Supported Types

Display a list of supported model types

harbormaster model_types_supported

Synopsis

List available model types supported by Harbormaster.

To list supported model formats:

harbormaster model_types_supported

List

Display a list of models

harbormaster model_list [options] [scope]

Synopsis

List available models, includes owned models and publicly available models.

scope: public, private, community. Empty returns all.
options:

-o, --output: [JSON] or pretty for pretty print
-f, --filter: emf, sqlscript, uml, xmi, pojo, json Providing no value returns all.

To display all public models using pretty print:

harbormaster model_list public --output pretty

To display all your public and private models as JSON[default]:

harbormaster model_list

To display all community sql script models as JSON:

harbormaster model_list community -f sqlscript

Validation

Validate a model

harbormaster model_validate [javaRootPackageName]

filepath: location of model file to validate
javaRootPackageName: the root Java package name of the business objects in the event the model file is an EAR, WAR, or JAR file.  Also applies to a GIT Repo containing Java source files.

Synopsis

Validate a model for structure and syntax correctness.

To validate a UML XMI file:

harbormaster model_validate ./models/myuml.xmi

Publishing

Publish a model

harbormaster model_publish [javaRootPackageName] [primaryKeyPattern] [scope]

Synopsis

Publish a model file or use a YAML with appropriate directives.

model_file_location: The absolute or relative path to a model file.  Also, the location could be to a public accessible Git Repo containing Java source files.
name: unique name
javaRootPackageNames: comma delim list of packages to consider, for GIT Repos and JAR/WAR/EAR files only
primaryKeyPattern: POJO pk patttern, defaults to _pojoName_Id
scope: public or private[default]

To publish a model as private:

harbormaster model_publish ./save-my-model.ecore myModel

To publish a model as public:

harbormaster model_publish ./save-my-model.ecore myModel public

Download

Download a model

harbormaster model_download

Synopsis

Download a model file. Only owned or public models can be downloaded.

name: the unique name of the model file used when published
output_file_path: where to download the model to

To download a model with name myModel:

harbormaster model_download myModel ./tmp/archive/mymodel.xmi

Promotion

harbormaster model_promote

Promotes a model

Synopsis

Any owned private model can be promoted to public. Making it public allows it to be accessed by the others.

Promote an owned model from private scope to public. Promotion cannot be undone. Confirmation is required.

name: the unique name of the model file used when published

To promote a model from being private to public, referenced by name myModel:

harbormaster model_promote myModel

Demotion

harbormaster model_demote

Demotes a model

Synopsis

Any owned public model can be promoted to private. 

Demote an owned model from public scope to private. Confirmation is required.

name: the unique name of the model file used when published

To demote a model from being public to private, referenced by name myModel:

harbormaster model_demote myModel

 Deletion

harbormaster model_delete

Delete a model.

Synopsis

Can only delete an owned private model. Deletion cannot be undone.

name: the unique id or name of the model file used when published

To delete a model referenced by name myModel, prompted to confirm:

harbormaster model_delete myModel