- Workspace
Class that represents a workspace
- twx-parser :
object
Entry point for the library
- AppSnapshot :
Object
- ObjectVersion :
Object
- SnapshotCriteria :
Object
- ObjectCriteria :
Object
Class that represents a workspace
Kind: global class
- Workspace
- new Workspace(name)
- .addFile(filePath) ⇒
Promise.<(undefined|Error)>
- .removeFile(filePath) ⇒
Promise.<(undefined|Error)>
- .getSnapshots(criteria) ⇒
Promise.<(Array.<AppSnapshot>|Error)>
- .getSnapshotDependencies(inputData) ⇒
Promise.<(Array.<AppSnapshot>|Error)>
- .getSnapshotWhereUsed(inputData) ⇒
Promise.<(Array.<AppSnapshot>|Error)>
- .getSnapshotObjects(inputData) ⇒
Promise.<(Array.<ObjectVersion>|Error)>
- .getObjects(objectCriteria, snapshotCriteria) ⇒
Promise.<(Array.<ObjectVersion>|Error)>
- .getObjectDependencies(inputData, snapshotCriteria) ⇒
Promise.<(Array.<ObjectVersion>|Error)>
- .getObjectWhereUsed(inputData, snapshotCriteria) ⇒
Promise.<(Array.<ObjectVersion>|Error)>
- .getObjectSnapshots(inputData) ⇒
Promise.<(Array.<AppSnapshot>|Error)>
- .getLeafNodes() ⇒
Promise.<(Array.<object>|Error)>
- .getTopLevelNodes() ⇒
Promise.<(Array.<object>|Error)>
Create a workspace.
Param | Type | Description |
---|---|---|
name | string |
The workspace name |
Add a file to the workspace.
Kind: instance method of Workspace
Returns: Promise.<(undefined|Error)>
- a Promise
that will be resolved if the file is successfully parsed and added, or rejected with an Error
instance if any error occurs.
Param | Type | Description |
---|---|---|
filePath | string |
path to the TWX file to be added |
Remove a file from the workspace.
Kind: instance method of Workspace
Returns: Promise.<(undefined|Error)>
- a Promise
that will be resolved if the file is successfully parsed and removed, or rejected with an Error
instance if any error occurs.
Param | Type | Description |
---|---|---|
filePath | string |
path to the TWX file to be removed |
Query snapshots from the workspace.
Kind: instance method of Workspace
Returns: Promise.<(Array.<AppSnapshot>|Error)>
- a Promise
that will be resolved with an array of AppSnapshot
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
criteria | SnapshotCriteria |
search criteria |
Retrieve snapshots that are direct children of the snapshot(s) passed as input.
Kind: instance method of Workspace
Returns: Promise.<(Array.<AppSnapshot>|Error)>
- a Promise
that will be resolved with an array of AppSnapshot
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
inputData | AppSnapshot | Array.<AppSnapshot> |
snapshot(s) for which we want to retrieve children |
Retrieve snapshots that are direct parents of the snapshot(s) passed as input.
Kind: instance method of Workspace
Returns: Promise.<(Array.<AppSnapshot>|Error)>
- a Promise
that will be resolved with an array of AppSnapshot
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
inputData | AppSnapshot | Array.<AppSnapshot> |
snapshot(s) for which we want to retrieve parents |
Retrieve objects that belong to the snapshot(s) passed as input.
Kind: instance method of Workspace
Returns: Promise.<(Array.<ObjectVersion>|Error)>
- a Promise
that will be resolved with an array of ObjectVersion
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
inputData | AppSnapshot | Array.<AppSnapshot> |
snapshot(s) for which we want to retrieve objects |
Query objects from the workspace. Optionally, you can restrict results that belong to snapshot(s) that match the given criteria.
Kind: instance method of Workspace
Returns: Promise.<(Array.<ObjectVersion>|Error)>
- a Promise
that will be resolved with an array of ObjectVersion
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
objectCriteria | ObjectCriteria |
search criteria |
snapshotCriteria | SnapshotCriteria |
snapshot search criteria to restrict results |
workspace.getObjectDependencies(inputData, snapshotCriteria) ⇒ Promise.<(Array.<ObjectVersion>|Error)>
Retrieve objects that are direct children of the objects(s) passed as input. Optionally, you can restrict results that belong to snapshot(s) that match the given criteria.
Kind: instance method of Workspace
Returns: Promise.<(Array.<ObjectVersion>|Error)>
- a Promise
that will be resolved with an array of ObjectVersion
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
inputData | ObjectVersion | Array.<ObjectVersion> |
object(s) for which we want to retrieve direct children |
snapshotCriteria | SnapshotCriteria |
snapshot search criteria to restrict results |
Retrieve objects that are direct parents of the objects(s) passed as input. Optionally, you can restrict results that belong to snapshot(s) that match the given criteria.
Kind: instance method of Workspace
Returns: Promise.<(Array.<ObjectVersion>|Error)>
- a Promise
that will be resolved with an array of ObjectVersion
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
inputData | ObjectVersion | Array.<ObjectVersion> |
object(s) for which we want to retrieve direct parents |
snapshotCriteria | SnapshotCriteria |
snapshot search criteria to restrict results |
Retrieve snapshots whose object(s) passed as input belong to.
Kind: instance method of Workspace
Returns: Promise.<(Array.<AppSnapshot>|Error)>
- a Promise
that will be resolved with an array of AppSnapshot
instances with the results that match the given criteria, or rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
inputData | ObjectVersion | Array.<ObjectVersion> |
object(s) for which we want to retrieve snapshots |
Retrieve snapshots that do not depend on any other snapshots.
Kind: instance method of Workspace
Returns: Promise.<(Array.<object>|Error)>
- a Promise
that will be resolved with an array of results that match the given criteria, or rejected with an Error
instance if any error occurs. The result has a getNextLevel
method to retrieve the next level on the dependency tree.
Retrieve snapshots that are not a dependency to any other snapshots.
Kind: instance method of Workspace
Returns: Promise.<(Array.<object>|Error)>
- a Promise
that will be resolved with an array of results that match the given criteria, or rejected with an Error
instance if any error occurs. The result has a getNextLevel
method to retrieve the next level on the dependency tree.
Entry point for the library
Method to get or create a workspace
Kind: static method of twx-parser
Returns: Promise.<(Workspace|Error)>
- Promise that will be resolved with a Workspace
instance, or be rejected with an Error
instance if any error occurs
Param | Type | Description |
---|---|---|
name | string |
Name of the workspace. If a workspace with this name already exists, it is retrieved. Otherwise, a new workspace is created. |
password | string |
Password to open the workspace. If the workspace is new, the given password will be the workspace's password. If the workspace already exists, this password will be compared with the password used to create the workspace |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
snapshotId | string |
Snapshot ID |
appId | string |
Application ID |
branchId | string |
Branch ID |
snapshotName | string |
Snapshot Name |
branchName | string |
Branch Name |
appShortName | string |
Application Acronym |
appName | string |
Application Name |
description | string |
Application Description |
buildVersion | string |
Application Build Version |
isToolkit | boolean |
True if the snapshot is from a toolkit, and false otherwise |
isSystem | boolean |
True if the snapshot is made by IBM, and false otherwise |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
objectVersionId | string |
Object Version ID |
objectId | string |
Object ID |
name | string |
Object Name |
type | string |
Object Type |
subtype | string |
Object Subtype |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
snapshotId | string | Array.<string> |
use this property to query by one or more snapshot IDs |
appId | string | Array.<string> |
use this property to query by one or more application IDs |
branchId | string | Array.<string> |
use this property to query by one or more branch IDs |
snapshotName | string | Array.<string> |
use this property to query by one or more snapshot names |
branchName | string | Array.<string> |
use this property to query by one or more branch names |
appShortName | string | Array.<string> |
use this property to query by one or more application acronyms |
appName | string | Array.<string> |
use this property to query by one or more application names |
description | string | Array.<string> |
use this property to query by one or more application descriptions |
buildVersion | string | Array.<string> |
use this property to query by one or more application build versions |
isToolkit | string | Array.<boolean> |
use this property to query by toolkits or process applications |
isSystem | string | Array.<boolean> |
use this property to query by system toolkits or applications |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
objectVersionId | string | Array.<string> |
use this property to query by one or more object version IDs |
objectId | string | Array.<string> |
use this property to query by one or more object IDs |
name | string | Array.<string> |
use this property to query by one or more object names |
type | string | Array.<string> |
use this property to query by one or more object types |
subtype | string | Array.<string> |
use this property to query by one or more object sub types |