BusinessNetworkCardStore (Common API)

Overview - Common API - Client API - Admin API - Runtime API

BusinessNetworkCardStore

Manages persistence of business network cards. Applications would not work with this abstract class directly The File system card store is the default for both Admin and Business Network Connections

Details

  • Module common

Method Summary

Name Returns Description
delete Promise Delete a specific card from the store
get Promise Gets a card from the store
getAll Promise Gets all cards from the store
getDefaultCardName String Get a default name for a given business network card
has Promise Has returns a boolean indicating whether a card with the specified name exists or not
put Promise Puts a card in the store

Method Details

getDefaultCardName

String getDefaultCardName( IdCard card )

Get a default name for a given business network card.

Returns

String - A card name

Parameters

Name Type Mandatory Description
card IdCard Yes A business network card

get

Promise get( String cardname )

Gets a card from the store.

Returns

Promise - A promise that is resolved with an IdCard, or rejected if the card does not exist.

Parameters

Name Type Mandatory Description
cardName String Yes The name of the card to get

put

Promise put( String cardname, IdCard card )

Puts a card in the store. If the named card already exists in the store, it will be replaced.

Returns

Promise - A promise that resolves once the data is written

Parameters

Name Type Mandatory Description
cardName String Yes The name of the card to save
card IdCard Yes The card

has

Promise has( String cardname )

Has returns a boolean indicating whether a card with the specified name exists or not.

Returns

Promise - A promise resolved with true or false.

Parameters

Name Type Mandatory Description
cardName String Yes The name of the card to check

getAll

Promise getAll( )

Gets all cards from the store.

Returns

Promise - A promise that is resolved with a Map where the keys are identity card names and the values are IdCard objects.

Parameters

No parameters

delete

Promise delete( String cardname )

Delete a specific card from the store.

Returns

Promise - A promise that resolves to true if the card existed; otherwise false.

Parameters

Name Type Mandatory Description
cardName String Yes The name of the card to delete.

Inherited methods