Class

BaseManager

BaseManager(dsuStorage, callbackopt)

Constructor

# new BaseManager(dsuStorage, callbackopt)

Parameters:
Name Type Attributes Description
dsuStorage DSUStorage

the controllers dsu storage

callback function <optional>

optional callback. called after initialization. mostly for testing

View Source managers/BaseManager.js, line 71

Methods

# protected _getDIDString(identity, participantConstSSI, callback)

Must return the string to be used to generate the DID

.

Must return the string to be used to generate the DID

Parameters:
Name Type Description
identity object
participantConstSSI string
callback function

View Source managers/BaseManager.js, line 380

# cacheManager(manager)

Caches every other manager to enforce a singleton behaviour

.

Caches every other manager to enforce a singleton behaviour

Parameters:
Name Type Description
manager Manager

View Source managers/BaseManager.js, line 114

# editIdentity(participant, callback)

Edits/Overwrites the Participant details.

Edits/Overwrites the Participant details. Should this be allowed??

Parameters:
Name Type Description
participant Participant
callback function

View Source managers/BaseManager.js, line 389

# getIdentity(callbackopt) → {Participant}

reads the participant information (if exists)

.

reads the participant information (if exists)

Parameters:
Name Type Attributes Description
callback function <optional>

only required if the identity is not cached

View Source managers/BaseManager.js, line 357

identity (if cached and no callback is provided)

Participant

# getManager(manager)

Returns a cached Manager

.

Returns a cached Manager

Parameters:
Name Type Description
manager class | string

the class ex: 'getManager(SomethingManager)'

View Source managers/BaseManager.js, line 127

error when the requested manager is not cached

# getMessages()

See MessageManager#getMessages.

See MessageManager#getMessages.

View Source managers/BaseManager.js, line 174

# registerMessageListener(api, listener) → {*}

Registers a Manager with the MessageManager of the provided api so it'll be updated automatically

.

Registers a Manager with the MessageManager of the provided api so it'll be updated automatically

Parameters:
Name Type Description
api string

the tableName typically

listener function

View Source managers/BaseManager.js, line 153

*

# sendMessage(did, api, message, callback)

Sends a message to a DID via the MessageManager

.

Sends a message to a DID via the MessageManager

Parameters:
Name Type Description
did string | Wc3DID
api string
message Object
callback function

View Source managers/BaseManager.js, line 141

# setController(controller)

giver the manager a reference to the controller so it can refresh the UI

.

giver the manager a reference to the controller so it can refresh the UI

Parameters:
Name Type Description
controller LocalizedController

View Source managers/BaseManager.js, line 189

# shutdownMessenger()

Stops the message service listener

.

Stops the message service listener

View Source managers/BaseManager.js, line 181