Class: TransactionRegistry

composer-client. TransactionRegistry

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


new TransactionRegistry(id, name, securityContext, modelManager, factory, serializer)

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

Parameters:
Name Type Description
id string

The unique identifier of the transaction registry.

name string

The display name for the transaction registry.

securityContext SecurityContext

The security context to use for this asset registry.

modelManager ModelManager

The ModelManager to use for this transaction registry.

factory Factory

The factory to use for this transaction registry.

serializer Serializer

The Serializer to use for this transaction registry.

Source:
See:

Extends

Methods


add(resource, data)

Unsupported operation; you cannot add a transaction to a transaction
registry. Call BusinessNetworkConnection.submitTransaction to submit a transaction.

Parameters:
Name Type Description
resource Resource

The resource to be added to the registry.

data string

The data for the resource.

Overrides:
Source:

addAll(resources)

Unsupported operation; you cannot add a transaction to a transaction
registry. Call BusinessNetworkConnection.submitTransaction to submit a transaction.

Parameters:
Name Type Description
resources Array.<Resource>

The resources to be added to the registry.

Overrides:
Source:

exists(id)

Determine whether the specified resource exists in this registry.

Parameters:
Name Type Description
id string

The ID of the resource.

Inherited From:
Source:
Returns:

A promise that will be resolved with a boolean
indicating whether the asset exists.

Type
Promise

get(id)

Get the specified resource in this registry.

Parameters:
Name Type Description
id string

The ID of the resource.

Inherited From:
Source:
Returns:

A promise that will be resolved with a Resource
object when complete, or rejected with an error.

Type
Promise

getAll()

Get all the resources in this registry.

Inherited From:
Source:
Returns:

A promise that will be resolved with an array of {@link
Resource} objects when complete, or rejected with an error.

Type
Promise

remove(resource)

Unsupported operation; you cannot remove a transaction from a transaction
registry. This method will always throw an exception when called.

Parameters:
Name Type Description
resource Resource | string

The resource, or the unique identifier of the resource.

Overrides:
Source:

removeAll(resources)

Unsupported operation; you cannot remove a transaction from a transaction
registry. This method will always throw an exception when called.

Parameters:
Name Type Description
resources Array.<Resource> | Array.<string>

The resources, or the unique identifiers of the resources.

Overrides:
Source:

toJSON()

Return an object suitable for serialization.

Inherited From:
Source:
Returns:

An object suitable for serialization.

Type
Object

update(resource)

Unsupported operation; you cannot update a transaction in a transaction
registry. This method will always throw an exception when called.

Parameters:
Name Type Description
resource Resource

The resource to be updated in the registry.

Overrides:
Source:

updateAll(resources)

Unsupported operation; you cannot update a transaction in a transaction
registry. Call BusinessNetworkConnection.submitTransaction to submit a transaction.

Parameters:
Name Type Description
resources Array.<Resource>

The resources to be updated in the asset registry.

Overrides:
Source: