AssetRegistry (Client API)

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

AssetRegistry

The AssetRegistry is used to manage a set of assets stored on the Blockchain.

Details

  • Extends Registry

  • Module client

See also

  • See (see {@link registry)

Method Summary

Name Returns Description
addAssetRegistry Promise Add a new asset registry.
assetRegistryExists Promise Determine whether an registry exists.
constructor void Create an asset registry.

Note: Only to be called by framework code. Applications should retrieve instances from BusinessNetworkConnection

getAllAssetRegistries Promise Get a list of all existing asset registries.
getAssetRegistry Promise Get an existing asset registry.

Method Details

getAllAssetRegistries

Promise getAllAssetRegistries( SecurityContext securitycontext, ModelManager modelmanager, Factory factory, Serializer serializer, BusinessNetworkConnection bnc, [Boolean includesystem] )

Get a list of all existing asset registries.

Returns

Promise - A promise that will be resolved with a list of AssetRegistry instances representing the asset registries.

Parameters

Name Type Optional Description
securityContext SecurityContext false The user's security context.
modelManager ModelManager false The ModelManager to use for this asset registry.
factory Factory false The factory to use for this asset registry.
serializer Serializer false The Serializer to use for this asset registry.
bnc BusinessNetworkConnection false Instance of the BusinessNetworkConnection
includeSystem Boolean true Should system registries be included? (defaults to false)

getAssetRegistry

Promise getAssetRegistry( SecurityContext securitycontext, string id, ModelManager modelmanager, Factory factory, Serializer serializer, BusinessNetworkConnection bnc )

Get an existing asset registry.

Returns

Promise - A promise that will be resolved with a AssetRegistry instance representing the asset registry.

Parameters

Name Type Optional Description
securityContext SecurityContext false The user's security context.
id string false The unique identifier of the asset registry.
modelManager ModelManager false The ModelManager to use for this asset registry.
factory Factory false The factory to use for this asset registry.
serializer Serializer false The Serializer to use for this asset registry.
bnc BusinessNetworkConnection false Instance of the BusinessNetworkConnection

assetRegistryExists

Promise assetRegistryExists( SecurityContext securitycontext, string id, ModelManager modelmanager, Factory factory, Serializer serializer )

Determine whether an registry exists.

Returns

Promise - A promise that will be resolved with a boolean indicating whether the asset registry exists

Parameters

Name Type Optional Description
securityContext SecurityContext false The user's security context.
id string false The unique identifier of the asset registry.
modelManager ModelManager false The ModelManager to use for this asset registry.
factory Factory false The factory to use for this asset registry.
serializer Serializer false The Serializer to use for this asset registry.

addAssetRegistry

Promise addAssetRegistry( SecurityContext securitycontext, string id, string name, ModelManager modelmanager, Factory factory, Serializer serializer, BusinessNetworkConnection bnc )

Add a new asset registry.

Returns

Promise - A promise that will be resolved with a AssetRegistry instance representing the new asset registry.

Parameters

Name Type Optional Description
securityContext SecurityContext false The user's security context.
id string false The unique identifier of the asset registry.
name string false The name of the asset registry.
modelManager ModelManager false The ModelManager to use for this asset registry.
factory Factory false The factory to use for this asset registry.
serializer Serializer false The Serializer to use for this asset registry.
bnc BusinessNetworkConnection false Instance of the BusinessNetworkConnection

new AssetRegistry()

Create an asset registry.

Note: Only to be called by framework code. Applications should retrieve instances from BusinessNetworkConnection

Parameters

Name Type Optional Description
id string false The unique identifier of the asset registry.
name string false The display name for the asset registry.
securityContext SecurityContext false The security context to use for this asset registry.
modelManager ModelManager false The ModelManager to use for this asset registry.
factory Factory false The factory to use for this asset registry.
serializer Serializer false The Serializer to use for this asset registry.
bnc BusinessNetworkConnection false Instance of the BusinessNetworkConnection