Skip to content

Latest commit

 

History

History
1923 lines (1087 loc) · 56.2 KB

File metadata and controls

1923 lines (1087 loc) · 56.2 KB

c8osdkjscoreC8oCore

Class: C8oCore

Allows to send requests to a Convertigo Server (or Studio), these requests are called c8o calls.
C8o calls are done thanks to a HTTP request or a CouchbaseLite usage.
An instance of C8o is connected to only one Convertigo and can't change it.
To use it, you have to first initialize the C8o instance with the Convertigo endpoint, then use call methods with Convertigo variables as parameter.

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new C8oCore(): C8oCore

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:337

This is the base object representing a Convertigo Server end point. This object should be instantiated when the apps starts and be accessible from any class of the app. Although this is not common , you may have several C8o objects instantiated in your app.

throws C8oException In case of invalid parameter or initialization failure.

Returns: C8oCore

Properties

Protected _authenticationCookieValue

_authenticationCookieValue: string = null

Inherited from C8oBase._authenticationCookieValue

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:21


Protected _automaticRemoveSplashsCreen

_automaticRemoveSplashsCreen: boolean = true

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:150


Protected _clientCertificateBinaries

_clientCertificateBinaries: Object

Inherited from C8oBase._clientCertificateBinaries

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:10


Protected _clientCertificateFiles

_clientCertificateFiles: Object

Inherited from C8oBase._clientCertificateFiles

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:9


Protected _cookies

_cookies: Object

Inherited from C8oBase._cookies

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:8


Protected _couchUrl

_couchUrl: string = null

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:178


Protected _defaultDatabaseName

_defaultDatabaseName: string = null

Inherited from C8oBase._defaultDatabaseName

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:20


Protected _disableSSL

_disableSSL: boolean = false

Inherited from C8oBase._disableSSL

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:29


Protected _endpoint

_endpoint: string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:144

The Convertigo endpoint, syntax: <protocol>://<host>:<port>/<Convertigo web app path>/projects/<project name> (Example: http://127.0.0.1:18080/convertigo/projects/MyProject)


Protected _endpointConvertigo

_endpointConvertigo: string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:145


Protected _endpointHost

_endpointHost: string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:147


Protected _endpointIsSecure

_endpointIsSecure: boolean

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:146


Protected _endpointPort

_endpointPort: string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:148


Protected _endpointProject

_endpointProject: string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:149


Protected _endpointSettings

_endpointSettings: string

Inherited from C8oBase._endpointSettings

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:5


Protected _errorConvertigoIntoFail

_errorConvertigoIntoFail: boolean = false

Inherited from C8oBase._errorConvertigoIntoFail

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:40


Protected _fullSyncLocalSuffix

_fullSyncLocalSuffix: string = null

Inherited from C8oBase._fullSyncLocalSuffix

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:22


Protected _fullSyncPassword

_fullSyncPassword: string

Inherited from C8oBase._fullSyncPassword

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:25


Protected _fullSyncServerUrl

_fullSyncServerUrl: string = "http://localhost:5984"

Inherited from C8oBase._fullSyncServerUrl

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:23


Protected _fullSyncUsername

_fullSyncUsername: string

Inherited from C8oBase._fullSyncUsername

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:24


Protected _headers

_headers: Object

Inherited from C8oBase._headers

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:46


Protected _http

_http: any

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:177


Protected _initalLogLevel

_initalLogLevel: Boolean

Inherited from C8oBase._initalLogLevel

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:48


Protected _initialLogRemote

_initialLogRemote: boolean = true

Inherited from C8oBase._initialLogRemote

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:14


Protected _keepSessionAlive

_keepSessionAlive: boolean = true

Inherited from C8oBase._keepSessionAlive

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:38


Protected _keyStorePassword

_keyStorePassword: string

Inherited from C8oBase._keyStorePassword

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:31


Protected _logC8o

_logC8o: boolean = false

Inherited from C8oBase._logC8o

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:16


Protected _logLevelLocal

_logLevelLocal: C8oLogLevel = C8oLogLevel.NONE

Inherited from C8oBase._logLevelLocal

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:15


Protected _logOnFail

_logOnFail: function

Inherited from C8oBase._logOnFail

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:17

Type declaration:

▸ (exception: Error, parameters: Object): void

Parameters:

Name Type
exception Error
parameters Object

Protected _logRemote

_logRemote: boolean = true

Inherited from C8oBase._logRemote

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:13


Protected _normalizeParameters

_normalizeParameters: boolean

Inherited from C8oBase._normalizeParameters

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:36


Protected _prefixBase

_prefixBase: boolean = false

Inherited from C8oBase._prefixBase

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:44


Private _reply

_reply: Subject‹any› = new Subject()

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:174


Protected _resetBase

_resetBase: boolean = true

Inherited from C8oBase._resetBase

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:42


Protected _timeout

_timeout: number = -1

Inherited from C8oBase._timeout

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:6


Protected _trustStorePassword

_trustStorePassword: string

Inherited from C8oBase._trustStorePassword

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:33


Protected _useEncryption

_useEncryption: boolean = false

Inherited from C8oBase._useEncryption

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:28


Private _waitingForInit

_waitingForInit: any

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:185


c8oFullSync

c8oFullSync: C8oFullSync

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:165

Used to run fullSync requests.


c8oLogger

c8oLogger: C8oLogger

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:160

Allows to log locally and remotely to the Convertigo server.


Protected data

data: any

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:176


database

database: C8oManagerDatabase

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:189


Protected handleFullSyncLive

handleFullSyncLive: C8oFullSyncChangeListener = new C8oFullSyncChangeListener( (changes: Object) => { for (const task in this.lives) { (this.lives[task] as C8oCallTask).executeFromLive(); } })

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:652


httpInterface

httpInterface: C8oHttpInterfaceCore

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:155

Used to run HTTP requests.


lives

lives: C8oCallTask[] = []

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:167


livesDb

livesDb: string[] = []

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:168


network

network: C8oManagerNetwork

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:188


Protected promiseConstructor

promiseConstructor: Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:179


promiseFinInit

promiseFinInit: Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:181


Protected promiseInit

promiseInit: Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:180


Private promiseManagerNetwork

promiseManagerNetwork: Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:183


Protected promiseReachable

promiseReachable: Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:182


reachable

reachable: any

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:186


Protected replicationsToRestart

replicationsToRestart: Array‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:184


session

session: C8oManagerSession

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:190


subscriber_login

subscriber_login: Subject‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:172


subscriber_network

subscriber_network: Subject‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:171


subscriber_session

subscriber_session: Subject‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:170


xsrfUsed

xsrfUsed: boolean = false

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:337


Static ENGINE_PARAMETER_CONNECTOR

ENGINE_PARAMETER_CONNECTOR: string = "__connector"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:57


Static ENGINE_PARAMETER_DEVICE_UUID

ENGINE_PARAMETER_DEVICE_UUID: string = "__uuid"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:60


Static ENGINE_PARAMETER_ENCODED

ENGINE_PARAMETER_ENCODED: string = "__encoded"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:59


Static ENGINE_PARAMETER_FROM_LIVE

ENGINE_PARAMETER_FROM_LIVE: string = "__fromLive"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:62


Static ENGINE_PARAMETER_PROGRESS

ENGINE_PARAMETER_PROGRESS: string = "__progress"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:61


Static ENGINE_PARAMETER_PROJECT

ENGINE_PARAMETER_PROJECT: string = "__project"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:55

Engine reserved parameters


Static ENGINE_PARAMETER_SEQUENCE

ENGINE_PARAMETER_SEQUENCE: string = "__sequence"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:56


Static ENGINE_PARAMETER_TRANSACTION

ENGINE_PARAMETER_TRANSACTION: string = "__transaction"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:58


Static FS_LIVE

FS_LIVE: string = "__live"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:123

Use it with "fs://" request as parameter to enable the live request feature.
Must be followed by a string parameter, the 'liveid' that can be use to cancel the live request using c8o.cancelLive(liveid) method.
A live request automatically recall the then or thenUI handler when the database changed.


Static FS_POLICY

FS_POLICY: string = "_use_policy"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:79

Constant to use as a parameter for a Call of "fs://.post" and must be followed by a FS_POLICY_* constant.

{@code
c8o.callJson("fs://.post",
  C8o.FS_POLICY, C8o.FS_POLICY_MERGE,
  "docid", myid,
  "mykey", myvalue
).sync();
}

Static FS_POLICY_CREATE

FS_POLICY_CREATE: string = "create"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:91

Use it with "fs://.post" and C8o.FS_POLICY.

This post policy remove the "_id" and "_rev" of the document before the CouchbaseLite's insertion.


Static FS_POLICY_MERGE

FS_POLICY_MERGE: string = "merge"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:103

Use it with "fs://.post" and C8o.FS_POLICY.

This post policy merge the document with an existing document with the same "_id" before the CouchbaseLite's insertion.


Static FS_POLICY_NONE

FS_POLICY_NONE: string = "none"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:85

Use it with "fs://.post" and C8o.FS_POLICY.

This is the default post policy that don't alter the document before the CouchbaseLite's insertion.


Static FS_POLICY_OVERRIDE

FS_POLICY_OVERRIDE: string = "override"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:97

Use it with "fs://.post" and C8o.FS_POLICY.

This post policy inserts the document in CouchbaseLite even if a document with the same "_id" already exists.


Static FS_SUBKEY_SEPARATOR

FS_SUBKEY_SEPARATOR: string = "_use_subkey_separator"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:109

Use it with "fs://.post". Default value is ".".

This key allow to override the sub key separator in case of document depth modification.


Static LOCAL_CACHE_DATABASE_NAME

LOCAL_CACHE_DATABASE_NAME: string = "c8olocalcache"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:130


Static LOCAL_CACHE_DOCUMENT_KEY_EXPIRATION_DATE

LOCAL_CACHE_DOCUMENT_KEY_EXPIRATION_DATE: string = "expirationDate"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:128


Static LOCAL_CACHE_DOCUMENT_KEY_RESPONSE

LOCAL_CACHE_DOCUMENT_KEY_RESPONSE: string = "response"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:126

Local cache keys


Static LOCAL_CACHE_DOCUMENT_KEY_RESPONSE_TYPE

LOCAL_CACHE_DOCUMENT_KEY_RESPONSE_TYPE: string = "responseType"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:127


Static RESPONSE_TYPE_JSON

RESPONSE_TYPE_JSON: string = "json"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:134


Static RESPONSE_TYPE_XML

RESPONSE_TYPE_XML: string = "pxml"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:133

Response type


Static Protected RE_ENDPOINT

RE_ENDPOINT: RegExp = /^(https?://([^:/]+)(:[0-9]+)?/?.*?)/projects/([^\/]+)$/

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:50

The regex used to get the part of the endpoint before '/projects/...'


Static Protected RE_REQUESTABLE

RE_REQUESTABLE: RegExp = /^([^.]*).(?:([^.]+)|(?:([^.]+).([^.]+)))$/

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:45

The regex used to handle the c8o requestable syntax ("<project>.<sequence>" or "<project>.<connector>.<transaction>")


Static SEQ_AUTO_LOGIN_OFF

SEQ_AUTO_LOGIN_OFF: string = "__disableAutologin"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:115

Use it with "project.sequence". Default value is ".".

This key allow to disable autologin feature for a given callJson


Static Private deviceUUID

deviceUUID: string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:137


Static use_merge_prefix

use_merge_prefix: string = "_use_merge"

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:68

FULLSYNC parameters

Accessors

authenticationCookieValue

get authenticationCookieValue(): string

Inherited from C8oBase.authenticationCookieValue

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:149

Returns: string


cookies

get cookies(): Object

Inherited from C8oBase.cookies

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:119

Gets initial cookies to send to the Convertigo server.
Default is null.

Returns: Object

List of cookies.


coreVersion

get coreVersion(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:333

Returns: string


couchUrl

get couchUrl(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:192

Returns: string

set couchUrl(value: string): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:196

Parameters:

Name Type
value string

Returns: void


defaultDatabaseName

get defaultDatabaseName(): string

Inherited from C8oBase.defaultDatabaseName

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:145

Returns: string


deviceUUID

get deviceUUID(): Promise‹string›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:284

Returns: Promise‹string›


endpoint

get endpoint(): string

Overrides C8oBase.endpoint

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:233

Returns: string

set endpoint(value: string): void

Overrides C8oBase.endpoint

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:237

Parameters:

Name Type
value string

Returns: void


endpointConvertigo

get endpointConvertigo(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:241

Returns: string

set endpointConvertigo(value: string): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:245

Parameters:

Name Type
value string

Returns: void


endpointHost

get endpointHost(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:259

Returns: string

set endpointHost(value: string): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:263

Parameters:

Name Type
value string

Returns: void


endpointIsSecure

get endpointIsSecure(): boolean

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:250

Returns: boolean

set endpointIsSecure(value: boolean): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:254

Parameters:

Name Type
value boolean

Returns: void


endpointPort

get endpointPort(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:268

Returns: string

set endpointPort(value: string): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:272

Parameters:

Name Type
value string

Returns: void


endpointProject

get endpointProject(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:276

Returns: string

set endpointProject(value: string): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:280

Parameters:

Name Type
value string

Returns: void


errorConvertigoIntoFail

get errorConvertigoIntoFail(): boolean

Inherited from C8oBase.errorConvertigoIntoFail

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:73

Gets if error convertigo are thrown into fail.
Default is false.

Returns: boolean

The errorConvertigoIntoFail status.


fullSyncLocalSuffix

get fullSyncLocalSuffix(): string

Inherited from C8oBase.fullSyncLocalSuffix

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:153

Returns: string


fullSyncPassword

get fullSyncPassword(): string

Inherited from C8oBase.fullSyncPassword

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:168

Returns: string


fullSyncServerUrl

get fullSyncServerUrl(): string

Inherited from C8oBase.fullSyncServerUrl

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:158

Returns: string


fullSyncUsername

get fullSyncUsername(): string

Inherited from C8oBase.fullSyncUsername

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:163

Returns: string


headers

get headers(): Object

Inherited from C8oBase.headers

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:184

Returns: Object


httpPublic

get httpPublic(): any

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:309

Returns: any


keepSessionAlive

get keepSessionAlive(): boolean

Inherited from C8oBase.keepSessionAlive

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:64

Gets if session has to be keep alive.
Default is true.

Returns: boolean

The KeepSessionAlive status.


log

get log(): C8oLogger

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:225

Returns: C8oLogger


logC8o

get logC8o(): boolean

Overrides C8oBase.logC8o

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:200

Returns: boolean

set logC8o(value: boolean): void

Overrides C8oBase.logC8o

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:204

Parameters:

Name Type
value boolean

Returns: void


logLevelLocal

get logLevelLocal(): C8oLogLevel

Overrides C8oBase.logLevelLocal

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:217

Returns: C8oLogLevel

set logLevelLocal(value: C8oLogLevel): void

Overrides C8oBase.logLevelLocal

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:221

Parameters:

Name Type
value C8oLogLevel

Returns: void


logOnFail

get logOnFail(): function

Inherited from C8oBase.logOnFail

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:172

Returns: function

▸ (exception: Error, parameters: Object): void

Parameters:

Name Type
exception Error
parameters Object

logRemote

get logRemote(): boolean

Overrides C8oBase.logRemote

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:208

Returns: boolean

set logRemote(value: boolean): void

Overrides C8oBase.logRemote

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:212

Parameters:

Name Type
value boolean

Returns: void


normalizeParameters

get normalizeParameters(): boolean

Inherited from C8oBase.normalizeParameters

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:56

Gets if normalize parameters.
Default is false.

Returns: boolean

The timeout.


prefixBase

get prefixBase(): boolean

Overrides C8oBase.prefixBase

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:321

Returns: boolean

set prefixBase(resetBase: boolean): void

Overrides C8oBase.prefixBase

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:325

Parameters:

Name Type
resetBase boolean

Returns: void


resetBase

get resetBase(): boolean

Overrides C8oBase.resetBase

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:313

Returns: boolean

set resetBase(resetBase: boolean): void

Overrides C8oBase.resetBase

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:317

Parameters:

Name Type
resetBase boolean

Returns: void


sdkVersion

get sdkVersion(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:331

Returns: string


timeout

get timeout(): number

Inherited from C8oBase.timeout

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:101

Gets the connection timeout to Convertigo in milliseconds. A value of zero means the timeout is not used.
Default is 0.

Returns: number

The timeout.

Methods

_call

_call(parameters: Object, c8oResponseListener: C8oResponseListener, c8oExceptionListener: C8oExceptionListener): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:439

Makes a c8o call with c8o requestable in parameters ('__project' and ('__sequence' or ('__connector' and '__transaction'))).
To not use a C8oExceptionListener you can set the parameter to null.

Parameters:

Name Type Default Description
parameters Object null Contains c8o variables
c8oResponseListener C8oResponseListener null Define the behavior with the c8o call response
c8oExceptionListener C8oExceptionListener null Define the behavior when there is an exception during execution

Returns: void


addFullSyncChangeListener

addFullSyncChangeListener(db: string, listener: C8oFullSyncChangeListener, parameters: Object): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:616

Add a listener to monitor all changes of the 'db'.

Parameters:

Name Type Default Description
db string - the name of the fullsync database to monitor. Use the default database for a blank or a null value.
listener C8oFullSyncChangeListener - the listener to trigger on change.
parameters Object {} -

Returns: void


addLive

addLive(liveid: string, db: string, task: C8oCallTask): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:630

Parameters:

Name Type
liveid string
db string
task C8oCallTask

Returns: void


call

call(requestable: string, parameters: Object, c8oResponseListener: C8oResponseListener, c8oExceptionListener: C8oExceptionListener): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:391

Makes a c8o call with c8o requestable out of parameters.
To not use a C8oExceptionListener you can set the parameter to null

Parameters:

Name Type Default Description
requestable string - Contains the Convertigo Sequence or Transaction targeted (Syntax: "." or "..")
parameters Object null Contains c8o variables
c8oResponseListener C8oResponseListener null Define the behavior with the c8o call response
c8oExceptionListener C8oExceptionListener null Define the behavior when there is an exception during execution

Returns: void


callJson

callJson(requestable: string, ...parameters: any[]): C8oPromise‹JSON›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:508

Makes a c8o call with c8o requestable out of parameters, expecting a JSON response through a C8oPromise.
The C8oPromise allow to register response handler with .then and .thenUI, error handler with .fail and failUI, replication handler with .progress and synchronous response with .sync().

Parameters:

Name Type Description
requestable string Contains the Convertigo Sequence or Transaction targeted (Syntax: "." or "..")
...parameters any[] Contains c8o variables as key/value

Returns: C8oPromise‹JSON›

A C8oPromise that can deliver the JSON response


callJsonObject

callJsonObject(requestable: string, parameters: Object): C8oPromise‹JSON›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:478

Makes a c8o call with c8o requestable out of parameters, expecting a JSON response through a C8oPromise.
The C8oPromise allow to register response handler with .then and .thenUI, error handler with .fail and failUI, replication handler with .progress and synchronous response with .sync().

Parameters:

Name Type Description
requestable string Contains the Convertigo Sequence or Transaction targeted (Syntax: "." or "..")
parameters Object -

Returns: C8oPromise‹JSON›

A C8oPromise that can deliver the JSON response


cancelLive

cancelLive(liveid: string): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:637

Parameters:

Name Type
liveid string

Returns: void


copy

copy(c8oBase: C8oBase): void

Inherited from C8oBase.copy

Defined in c8osdk-js-core/src/c8o/c8oBase.ts:188

Parameters:

Name Type
c8oBase C8oBase

Returns: void


Protected extractendpoint

extractendpoint(): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:366

Returns: void


finalizeInit

finalizeInit(): Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:771

This should be called OnPlatform Ready to remove splashscreen if necessary

Returns: Promise‹any›


get_attachment

get_attachment(id: string, attachment_name: string, database_name?: string): Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:594

get an attachment for a given object

Parameters:

Name Type
id string
attachment_name string
database_name? string

Returns: Promise‹any›

a promise containing a buffer


handleAutoLoginResponse

handleAutoLoginResponse(): Subject‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:582

Return an subject that call next if autologin is triggered with its result

Returns: Subject‹any›


handleCallException

handleCallException(c8oExceptionListener: C8oExceptionListener, requestParameters: Object, exception: Error): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:550

Calls the exception listener callback if it is not null, else prints the exception stack trace.

Parameters:

Name Type Description
c8oExceptionListener C8oExceptionListener -
requestParameters Object -
exception Error

Returns: void


handleNetworkEvents

handleNetworkEvents(): Subject‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:575

Return an subject that call next if network has change

Returns: Subject‹any›


handleSessionLost

handleSessionLost(): Subject‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:560

Return an subject that call next if session has been lost

Returns: Subject‹any›


Abstract httpGetObservable

httpGetObservable(uri: any): Observable‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:663

Method to bastract http get

Parameters:

Name Type Description
uri any the uri for given request

Returns: Observable‹any›


importLoginState

importLoginState(c8o: C8oCore): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:361

Parameters:

Name Type
c8o C8oCore

Returns: void


init

init(c8oSettings?: C8oSettings): Promise‹any›

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:680

This is the base object representing a Convertigo Server end point. This object should be instantiated when the apps starts and be accessible from any class of the app. Although this is not common , you may have several C8o objects instantiated in your app.

throws C8oException In case of invalid parameter or initialization failure.

Parameters:

Name Type Description
c8oSettings? C8oSettings Initialization options.
Example: new C8oSettings().setLogRemote(false).setDefaultDatabaseName("sample")

Returns: Promise‹any›


Abstract initC8oHttInterface

initC8oHttInterface(): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:668

Init http interface in client sdk

Returns: void


removeFullSyncChangeListener

removeFullSyncChangeListener(db: string, listener: C8oFullSyncChangeListener): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:626

Remove a listener for changes of the 'db'.

Parameters:

Name Type Description
db string the name of the fullsync database to monitor. Use the default database for a blank or a null value.
listener C8oFullSyncChangeListener the listener instance to remove.

Returns: void


removeNull

removeNull(parameters: any): void

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:534

Remove null value from parameters

Parameters:

Name Type Description
parameters any an object

Returns: void

a Map that contains all parameters


toString

toString(): string

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:229

Returns: string


Static toParameters

toParameters(parameters: any): Object

Defined in c8osdk-js-core/src/c8o/c8oCore.ts:518

Transforms siblings values as key/value of a Map.

Parameters:

Name Type Description
parameters any pair of values to transform a object

Returns: Object

a Map that contains all parameters