TransactionRegistry (Client API)

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

TransactionRegistry

The TransactionRegistry is used to store a set of transactions on the blockchain.

Applications should retrieve instances from BusinessNetworkConnection

Details

  • Extends Registry

  • Module client

See also

Method Summary

Name Returns Description
addTransactionRegistry Promise Add a new transaction registry
getAllTransactionRegistries Promise Get a list of all existing transaction registries
getTransactionRegistry Promise Get an existing transaction registry

Inherited Method Summary

Supertype Name Returns Description
Registry remove Promise Remove an asset with a given type and id from the registry
Registry addAll Promise Adds a list of new resources to the registry
Registry updateAll Promise Updates a list of resources in the registry
Registry update Promise Updates a resource in the registry
Registry removeAll Promise Removes a list of resources from the registry
Registry add Promise Adds a new resource to the registry
Registry getAll Promise Get all of the resources in the registry
Registry get Promise Get a specific resource in the registry
Registry exists Promise Determines whether a specific resource exists in the registry
Registry resolveAll Promise Get all of the resources in the registry, and resolve all of their relationships to other assets, participants, and transactions
Registry resolve Promise Get a specific resource in the registry, and resolve all of its relationships to other assets, participants, and transactions

Method Details

getAllTransactionRegistries

Promise getAllTransactionRegistries( SecurityContext securitycontext, ModelManager modelmanager, Factory factory, Serializer serializer, BusinessNetworkConnection bnc, Boolean systemregistry )

Get a list of all existing transaction registries.

Returns

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

See also

Parameters

Name Type Mandatory Description
securityContext SecurityContext Yes The user's security context.
modelManager ModelManager Yes The ModelManager to use for this transaction registry.
factory Factory Yes The factory to use for this transaction registry.
serializer Serializer Yes The Serializer to use for this transaction registry.
bnc BusinessNetworkConnection Yes BusinessNetworkConnection to use
systemRegistry Boolean Yes True if system transaction registries should be included in the list.

getTransactionRegistry

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

Get an existing transaction registry.

Returns

Promise - A promise that will be resolved with a TransactionRegistry instance representing the transaction registry.

See also

Parameters

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

addTransactionRegistry

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

Add a new transaction registry.

Returns

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

See also

Parameters

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

Inherited methods

addAll

Promise addAll( resources )

Inherited from: Registry

Adds a list of new resources to the registry.

Returns

Promise - A promise that will be resolved when the resource is added to the registry.

See also

Parameters

Name Type Mandatory Description
resources Yes The resources to be added to the registry.

add

Promise add( Resource resource )

Inherited from: Registry

Adds a new resource to the registry.

Returns

Promise - A promise that will be resolved when the resource is added to the registry.

See also

Parameters

Name Type Mandatory Description
resource Resource Yes The resource to be added to the registry.

updateAll

Promise updateAll( resources )

Inherited from: Registry

Updates a list of resources in the registry.

Returns

Promise - A promise that will be resolved when the resource is added to the registry.

See also

Parameters

Name Type Mandatory Description
resources Yes The resources to be updated in the asset registry.

update

Promise update( Resource resource )

Inherited from: Registry

Updates a resource in the registry.

Returns

Promise - A promise that will be resolved when the resource is updated in the registry.

See also

Parameters

Name Type Mandatory Description
resource Resource Yes The resource to be updated in the registry.

removeAll

Promise removeAll( ; resources )

Inherited from: Registry

Removes a list of resources from the registry.

Returns

Promise - A promise that will be resolved when the resource is added to the registry.

See also

Parameters

Name Type Mandatory Description
resources ; Yes The resources, or the unique identifiers of the resources.

remove

Promise remove( Resource; string resource )

Inherited from: Registry

Remove an asset with a given type and id from the registry.

Returns

Promise - A promise that will be resolved when the resource is removed from the registry.

See also

Parameters

Name Type Mandatory Description
resource Resource; string Yes The resource, or the unique identifier of the resource.

getAll

Promise getAll( )

Inherited from: Registry

Get all of the resources in the registry.

Returns

Promise - A promise that will be resolved with an array of JSON objects representing the resources.

See also

Parameters

No parameters

get

Promise get( string id )

Inherited from: Registry

Get a specific resource in the registry.

Returns

Promise - A promise that will be resolved with a JSON object representing the resource.

See also

Parameters

Name Type Mandatory Description
id string Yes The unique identifier of the resource.

exists

Promise exists( string id )

Inherited from: Registry

Determines whether a specific resource exists in the registry.

Returns

Promise - A promise that will be resolved with true/false depending on whether the resource exists.

See also

Parameters

Name Type Mandatory Description
id string Yes The unique identifier of the resource.

resolveAll

Promise resolveAll( )

Inherited from: Registry

Get all of the resources in the registry, and resolve all of their relationships to other assets, participants, and transactions. The result is a JavaScript object, and should only be used for visualization purposes. You cannot use the add or update functions with a resolved resource.

Returns

Promise - A promise that will be resolved with an array of JavaScript objects representing the resources and all of their resolved relationships.

See also

Parameters

No parameters

resolve

Promise resolve( string id )

Inherited from: Registry

Get a specific resource in the registry, and resolve all of its relationships to other assets, participants, and transactions. The result is a JavaScript object, and should only be used for visualization purposes. You cannot use the add or update functions with a resolved resource.

Returns

Promise - A promise that will be resolved with a JavaScript object representing the resource and all of its resolved relationships.

See also

Parameters

Name Type Mandatory Description
id string Yes The unique identifier of the asset.