Skip to content

Commit

Permalink
[FAB-12020] Update chaincode sections with Java cc
Browse files Browse the repository at this point in the history
Add references to java in sections on
chaincode languages.

Change-Id: I1922c23a5506baa1c50e79c9fbbd6fb1f57963cc
Signed-off-by: joe-alewine <Joe.Alewine@ibm.com>
  • Loading branch information
joe-alewine authored and Joe Alewine committed Sep 18, 2018
1 parent 5e60f9e commit 33ed567
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
5 changes: 1 addition & 4 deletions docs/source/Fabric-FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ Chaincode (Smart Contracts and Digital Assets)

:Answer:
Chaincode can be written in any programming language and executed in
containers. The first fully supported chaincode language is Golang.

Support for additional languages and the development of a templating language
have been discussed, and more details will be released in the near future.
containers. Currently, Golang, node.js and java chaincode are supported.

It is also possible to build Hyperledger Fabric applications using
`Hyperledger Composer <https://hyperledger.github.io/composer/>`__.
Expand Down
8 changes: 4 additions & 4 deletions docs/source/chaincode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ What is Chaincode?
------------------

Chaincode is a program, written in `Go <https://golang.org>`_, `node.js <https://nodejs.org>`_,
and eventually in other programming languages such as Java, that implements a
prescribed interface. Chaincode runs in a secured Docker container isolated from
the endorsing peer process. Chaincode initializes and manages ledger state
through transactions submitted by applications.
or `Java <https://java.com/en/>`_ that implements a prescribed interface.
Chaincode runs in a secured Docker container isolated from the endorsing peer
process. Chaincode initializes and manages ledger state through transactions
submitted by applications.

A chaincode typically handles business logic agreed to by members of the
network, so it may be considered as a "smart contract". State created by a
Expand Down
20 changes: 11 additions & 9 deletions docs/source/chaincode4ade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ What is Chaincode?
------------------

Chaincode is a program, written in `Go <https://golang.org>`_, `node.js <https://nodejs.org>`_,
that implements a prescribed interface. Eventually, other programming languages such as Java,
will be supported. Chaincode runs in a secured Docker container isolated from
the endorsing peer process. Chaincode initializes and manages the ledger state
through transactions submitted by applications.
or `Java <https://java.com/en/>`_ that implements a prescribed interface.
Chaincode runs in a secured Docker container isolated from the endorsing peer
process. Chaincode initializes and manages the ledger state through transactions
submitted by applications.

A chaincode typically handles business logic agreed to by members of the
network, so it similar to a "smart contract". A chaincode can be invoked to update or query
Expand Down Expand Up @@ -40,7 +40,8 @@ Chaincode API
Every chaincode program must implement the ``Chaincode`` interface:

- `Go <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`__
- `node.js <https://fabric-shim.github.io/ChaincodeInterface.html>`__
- `node.js <https://fabric-shim.github.io/fabric-shim.ChaincodeInterface.html>`__
- `Java <https://fabric-chaincode-java.github.io/org/hyperledger/fabric/shim/Chaincode.html>`_

whose methods are called in response to received transactions.
In particular the ``Init`` method is called when a
Expand All @@ -52,13 +53,14 @@ application state. The ``Invoke`` method is called in response to receiving an
The other interface in the chaincode "shim" APIs is the ``ChaincodeStubInterface``:

- `Go <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#ChaincodeStubInterface>`__
- `node.js <https://fabric-shim.github.io/ChaincodeStub.html>`__
- `node.js <https://fabric-shim.github.io/fabric-shim.ChaincodeStub.html>`__
- `Java <https://fabric-chaincode-java.github.io/org/hyperledger/fabric/shim/ChaincodeStub.html>`_

which is used to access and modify the ledger, and to make invocations between
chaincodes.

In this tutorial, we will demonstrate the use of these APIs by implementing a
simple chaincode application that manages simple "assets".
In this tutorial using Go chaincode, we will demonstrate the use of these APIs
by implementing a simple chaincode application that manages simple "assets".

.. _Simple Asset Chaincode:

Expand Down Expand Up @@ -93,7 +95,7 @@ Housekeeping

First, let's start with some housekeeping. As with every chaincode, it implements the
`Chaincode interface <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`_
in particular, ``Init`` and ``Invoke`` functions. So, let's add the go import
in particular, ``Init`` and ``Invoke`` functions. So, let's add the Go import
statements for the necessary dependencies for our chaincode. We'll import the
chaincode shim package and the
`peer protobuf package <https://godoc.org/github.com/hyperledger/fabric/protos/peer>`_.
Expand Down
12 changes: 6 additions & 6 deletions docs/source/chaincode4noah.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Chaincode for Operators
What is Chaincode?
------------------

Chaincode is a program, written in `Go <https://golang.org>`_, and eventually
in other programming languages such as Java, that implements a
prescribed interface. Chaincode runs in a secured Docker container isolated from
the endorsing peer process. Chaincode initializes and manages ledger state
through transactions submitted by applications.
Chaincode is a program, written in `Go <https://golang.org>`_, `node.js <https://nodejs.org>`_,
or `Java <https://java.com/en/>`_ that implements a prescribed interface.
Chaincode runs in a secured Docker container isolated from the endorsing peer
process. Chaincode initializes and manages ledger state through transactions
submitted by applications.

A chaincode typically handles business logic agreed to by members of the
network, so it may be considered as a "smart contract". State created by a
Expand All @@ -24,7 +24,7 @@ instantiating and upgrading the chaincode as a function of the chaincode's
operational lifecycle within a blockchain network.

Chaincode lifecycle
--------------------
-------------------

The Hyperledger Fabric API enables interaction with the various nodes
in a blockchain network - the peers, orderers and MSPs - and it also allows
Expand Down

0 comments on commit 33ed567

Please sign in to comment.