@backbase/portal-model

1.0.0-alpha.4 • Public • Published

Backbase Portal Model

Warning: This library is in alpha.

Utilities and classes for representing and parsing portal models.

Usage

.ItemModel

new .ItemModel()

Create a new ItemModel instance

ItemModel.read(filePath)

filePath Type: string

Read the model.xml at filePath and initialise the instance's model.

Returns a Promise that will resolve to a JS Object that represents the model.

ItemModel.createFeature(name)

name Type: string

Initialse the instance's model as a CXP Shared Feature with name.

Returns a Promise that will resolve to a JS Object that represents the model.

ItemModel.isEmpty

Returns true if the model hasn't been initialised.

ItemModel.getXml

Return XML string of the instance's model (which can be used in a package.zip).

ItemModel.getProperty(name)

name Type: string

Returns the value of the property matching name. getProperty: function(name) {

ItemModel.addProperty(name, value)

name Type: string

value Type: string

Adds a string type property to the model with name and value.

ItemModel.getType()

Returns one of template/container/feature/widget.

Readme

Keywords

none

Package Sidebar

Install

npm i @backbase/portal-model

Weekly Downloads

8

Version

1.0.0-alpha.4

License

ISC

Last publish

Collaborators

  • backbase-admin
  • bb-cli