bpmn-server / ModelsDatastore
Class: ModelsDatastore#
super class for various objects that are part of the server
Hierarchy#
↳ ModelsDatastore
Implements#
Table of contents#
Constructors#
Properties#
Accessors#
Methods#
- import
- getList
- load
- getPath
- getFile
- saveFile
- getSource
- getSVG
- save
- deleteModel
- renameModel
- rebuild
- rebuildModel
- get
- loadModel
- findEvents
- install
- updateTimer
- saveModel
- export
Constructors#
constructor#
• new ModelsDatastore(server
): ModelsDatastore
Parameters#
Name | Type |
---|---|
server |
BPMNServer |
Returns#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:19
Properties#
definitionsPath#
• definitionsPath: any
Defined in#
datastore/ModelsDatastore.ts:18
dbConfiguration#
• dbConfiguration: any
Inherited from#
ModelsDatastoreDB.dbConfiguration
Defined in#
datastore/ModelsDatastoreDB.ts:24
db#
• db: any
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:25
server#
• server: any
Inherited from#
Defined in#
Accessors#
configuration#
• get
configuration(): any
Returns#
any
Inherited from#
ModelsDatastoreDB.configuration
Defined in#
logger#
• get
logger(): any
Returns#
any
Inherited from#
ModelsDatastoreDB.logger
Defined in#
cron#
• get
cron(): Cron
Returns#
Inherited from#
ModelsDatastoreDB.cron
Defined in#
cache#
• get
cache(): CacheManager
Returns#
Inherited from#
ModelsDatastoreDB.cache
Defined in#
appDelegate#
• get
appDelegate(): any
Returns#
any
Inherited from#
ModelsDatastoreDB.appDelegate
Defined in#
engine#
• get
engine(): IEngine
Returns#
Inherited from#
ModelsDatastoreDB.engine
Defined in#
dataStore#
• get
dataStore(): any
Returns#
any
Inherited from#
ModelsDatastoreDB.dataStore
Defined in#
definitions#
• get
definitions(): any
Returns#
any
Inherited from#
ModelsDatastoreDB.definitions
Defined in#
listener#
• get
listener(): any
Returns#
any
Inherited from#
ModelsDatastoreDB.listener
Defined in#
Methods#
import#
▸ import(data
, owner?
): Promise
\<any
>
Parameters#
Name | Type | Default value |
---|---|---|
data |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<any
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:25
getList#
▸ getList(query?
): Promise
\<string
[]>
Parameters#
Name | Type | Default value |
---|---|---|
query |
any |
null |
Returns#
Promise
\<string
[]>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:30
load#
▸ load(name
, owner?
): Promise
\<Definition
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<Definition
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:49
getPath#
▸ getPath(name
, type
, owner?
): string
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
type |
any |
undefined |
owner |
any |
null |
Returns#
string
Defined in#
datastore/ModelsDatastore.ts:59
getFile#
▸ getFile(name
, type
, owner?
): any
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
type |
any |
undefined |
owner |
any |
null |
Returns#
any
Defined in#
datastore/ModelsDatastore.ts:64
saveFile#
▸ saveFile(name
, type
, data
, owner?
): void
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
type |
any |
undefined |
data |
any |
undefined |
owner |
any |
null |
Returns#
void
Defined in#
datastore/ModelsDatastore.ts:71
getSource#
▸ getSource(name
, owner?
): Promise
\<string
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<string
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:79
getSVG#
▸ getSVG(name
, owner?
): Promise
\<string
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<string
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:84
save#
▸ save(name
, bpmn
, svg?
, owner?
): Promise
\<boolean
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
bpmn |
any |
undefined |
svg? |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<boolean
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:88
deleteModel#
▸ deleteModel(name
, owner?
): Promise
\<void
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<void
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:100
renameModel#
▸ renameModel(name
, newName
, owner?
): Promise
\<boolean
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
newName |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<boolean
>
Implementation of#
Overrides#
Defined in#
datastore/ModelsDatastore.ts:110
rebuild#
▸ rebuild(model?
): Promise
\<void
>
reconstruct the models database from files
use when modifying the files manually or importing new environment
Parameters#
Name | Type | Default value |
---|---|---|
model |
any |
null |
Returns#
Promise
\<void
>
Overrides#
Defined in#
datastore/ModelsDatastore.ts:128
rebuildModel#
▸ rebuildModel(name
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
name |
any |
Returns#
Promise
\<void
>
Defined in#
datastore/ModelsDatastore.ts:170
get#
▸ get(query?
): Promise
\<object
[]>
Parameters#
Name | Type |
---|---|
query |
Object |
Returns#
Promise
\<object
[]>
Implementation of#
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:34
loadModel#
▸ loadModel(name
, owner?
): Promise
\<BpmnModelData
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<BpmnModelData
>
Implementation of#
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:75
findEvents#
▸ findEvents(query
, owner?
): Promise
\<IEventData
[]>
Parameters#
Name | Type | Default value |
---|---|---|
query |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<IEventData
[]>
Implementation of#
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:104
install#
▸ install(): Promise
\<any
>
first time installation of DB
creates a new collection and add an index
Returns#
Promise
\<any
>
Implementation of#
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:164
updateTimer#
▸ updateTimer(name
, owner?
): Promise
\<boolean
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<boolean
>
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:171
saveModel#
▸ saveModel(model
, owner?
): Promise
\<boolean
>
Parameters#
Name | Type | Default value |
---|---|---|
model |
IBpmnModelData |
undefined |
owner |
any |
null |
Returns#
Promise
\<boolean
>
Implementation of#
Inherited from#
Defined in#
datastore/ModelsDatastoreDB.ts:197
export#
▸ export(name
, folderPath
, owner?
): Promise
\<void
>
Parameters#
Name | Type | Default value |
---|---|---|
name |
any |
undefined |
folderPath |
any |
undefined |
owner |
any |
null |
Returns#
Promise
\<void
>