Description: Get the unique ID of a component
Schema: _Component

Example

component.id();
Suggest Edits

classInfo( )

 

Description: Give all informations about the model of the component
Schema: _Component

Example

component.classInfo();
Suggest Edits

destroy( )

 

Description: Destroy the component
Schema: _Component

Example

component.destroy();
Suggest Edits

off( event )

 

Description: Remove a listener
Schema: _Component

Example

component.off('eventName');
Suggest Edits

on( event, action, useCoreApis, isCore )

 

Description: Add an event
Schema: _Component

Example

component.on('eventName', () => {});
Suggest Edits

require( id )

 

Description: Get a component by its unique id
Schema: _Component

Example

component.require('db');
Suggest Edits

install( path , async )

 

Description: Install a system given a relative path. async parameter is optional.
Schema: _Runtime
Inherit: _Component

Example

let systemId = runtime.install('app.json');
  • on server, systems are installed synchronously (i.e. async parameter can not be set) and
  • on client, async parameter is set to true by default.
Suggest Edits

message( msg )

 

Description: Send a message to the system
Schema: _Runtime
Inherit: _Component

Example

runtime.message({
  'event': 'an_event',
  'from': 'system_id',
  'data': ['val1', true, {'key':'val'}]
});
Suggest Edits

start( id )

 

Description: Start a system given an id
Schema: _Runtime
Inherit: _Component

Example

runtime.start(systemId);
Suggest Edits

stop( id )

 

Description: Stop a system given an id
Schema: _Runtime
Inherit: _Component

Example

runtime.stop(systemId);
Suggest Edits

status( )

 

Description: Show the status of all the installed systems
Schema: _Runtime
Inherit: _Component

Example

runtime.status();
Suggest Edits

system( )

 

Description: Get the current system
Schema: _Runtime
Inherit: _Component

Example

let system = runtime.system();
Suggest Edits

system( name )

 

Description: Create a system
Schema: _Runtime
Inherit: _Component

Example

runtime.system('mySystem');
Suggest Edits

uninstall( id )

 

Description: Uninstall a system given an id
Schema: _Runtime
Inherit: _Component

Example

runtime.uninstall(systemId);
Suggest Edits

bundle( )

 

Description: Bundle the running system into a stringified JSON object
Schema: _Runtime
Inherit: _Component

Example

runtime.bundle();
Suggest Edits

create( )

 

Description: Create a model
Schema: _Metamodel
Inherit: _Component

Example

runtime.require('metamodel').create();
Suggest Edits

model( définition )

 

Description: Override a model
Schema: _Metamodel
Inherit: _Component

Example

runtime.require('metamodel').model({
  '_name': 'Person',
  'name': {
    'type': 'string',
    'readOnly': false,
    'mandatory': true,
    'default': ''
  },
  'firstName': {
    'type': 'string',
    'readOnly': false,
    'mandatory': true,
    'default': ''
  }
});
Suggest Edits

schema( definition )

 

Description: Define a schema
Schema: _Metamodel
Inherit: _Component

Example

runtime.require('metamodel').schema({
  '_name': 'PersonSchema',
  'name'; 'property',
  'firstName': 'property'
});
Suggest Edits

type( definition )

 

Description: Define a type
Schema: _Metamodel
Inherit: _Component

Example

runtime.require('metamodel').type({
  'name': 'color',
  'type': 'string',
  'value': ['blue', 'white', 'red']
});
Suggest Edits

collections( )

 

Description: Make queries on System Runtime NoSQL Database collections
Schema: _Database
Inherit: _Component

Example

runtime.require('db').collections().Person.find({
  'firstName': 'Laure'
});
Suggest Edits

debug( message )

 

Description: Log an information
Schema: _Logger
Inherit: _Component

runtime.require('logger').debug('this is a debug message');
Suggest Edits

error( message )

 

Description: Log an error
Schema: _Logger
Inherit: _Component

Example

runtime.require('logger').error('this is an error message');
Suggest Edits

info( message )

 

Description: Log an information
Schema: _Logger
Inherit: _Component

Example

runtime.require('logger').info('this is an info message');
Suggest Edits

level( levelName )

 

Description: Set the level of log
Schema: _Logger
Inherit: _Component

Example

runtime.require('logger').level('info');
Suggest Edits

warn( message )

 

Description: Log a warning
Schema: _Logger
Inherit: _Component

Example

runtime.require('logger').warn('this is a warning message');