Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 40bbb9d

Browse files
committed
FAB-4025 Rename chain to channel
PS 4 rename chaincode Change-Id: I14e3b2972ad2b2758f3b6ecc633f2f3a2cacf1fd Signed-off-by: rickr <cr22rc@gmail.com>
1 parent 6b470ed commit 40bbb9d

38 files changed

+678
-748
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Java SDK for Hyperledger Fabric 1.0
22
Welcome to Java SDK for Hyperledger project. The SDK helps facilitate Java applications to manage the lifecycle of
3-
Hyperledger channels (*often referred to as chains*) and user chaincode. The SDK also provides a means to execute
3+
Hyperledger channels and user chaincode. The SDK also provides a means to execute
44
user chaincode, query blocks
5-
and transactions on the chain, and monitor events on the chain.
5+
and transactions on the channel, and monitor events on the channel.
66

77
THe SDK acts on behave of a particular User which is defined by the embedding application through the implementation
88
of the SDK's `User` interface.
@@ -187,7 +187,7 @@ Use this `maven` command to run the integration tests:
187187

188188
### End to end test scenario
189189
The _src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java_ integration test is an example of installing, instantiating, invoking and querying a chaincode.
190-
It constructs the Hyperledger channel, deploys the `GO` chain code, invokes the chaincode to do a transfer amount operation and queries the resulting blockchain world state.
190+
It constructs the Hyperledger channel, deploys the `GO` chaincode, invokes the chaincode to do a transfer amount operation and queries the resulting blockchain world state.
191191

192192
This test is a reworked version of the Fabric [e2e_cli example](https://github.com/hyperledger/fabric/tree/master/examples/e2e_cli) to demonstrate the features of the SDK.
193193
To better understand blockchain and Fabric concepts, we recommend you install and run the _e2e_cli_ example.
@@ -256,7 +256,7 @@ and one file in th _src/test/fixture/sdkintegration/e2e-2Orgs/channel_ directory
256256
The policy section is comprised of `n-of` and `signed-by` elements. Then n-of (`1-of` `2-of`) require that many (`n`) in that
257257
section to be true. The `signed-by` references an identity in the identities section.
258258

259-
### Chain creation artifacts
259+
### Channel creation artifacts
260260
Channel configuration files and orderer bootstrap files ( see directory _src/test/fixture/sdkintegration/e2e-2Orgs/channel_ ) are needed when creating a new channel.
261261
This is created with the Hyperledger Fabric `configtxgen` tool.
262262

config.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ org.hyperledger.fabric.sdk.cacerts = /genesisblock/peercacert.pem
77
org.hyperledger.fabric.sdk.proposal.wait.time = 20000
88

99
# Time in milliseconds to wait for genesis block
10-
org.hyperledger.fabric.sdk.chain.genesisblock_wait_time = 5000
10+
org.hyperledger.fabric.sdk.channel.genesisblock_wait_time=5000
1111

1212
# System wide defaults for CryptoPrimitives objects. You can customize further by using the
1313
# CryptoPrimitives.setProperties() method.

src/main/java/org/hyperledger/fabric/sdk/BlockListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
public interface BlockListener {
2121
/**
22-
* Receive a block event from the Chain
22+
* Receive a block event from the Channel
2323
*
2424
* @param blockEvent The block being received.
2525
*/

src/main/java/org/hyperledger/fabric/sdk/ChainCodeID.java renamed to src/main/java/org/hyperledger/fabric/sdk/ChaincodeID.java

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,47 @@
1414

1515
package org.hyperledger.fabric.sdk;
1616

17-
18-
import org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID;
19-
2017
/**
21-
* ChainCodeID identifies chaincode.
18+
* ChaincodeID identifies chaincode.
2219
*/
23-
public class ChainCodeID {
20+
public class ChaincodeID {
2421

25-
private final ChaincodeID fabricChainCodeID;
22+
private final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID fabricChaincodeID;
2623

27-
private ChainCodeID() {
24+
private ChaincodeID() {
2825

29-
fabricChainCodeID = null;
26+
fabricChaincodeID = null;
3027

3128
}
3229

33-
34-
public ChaincodeID getFabricChainCodeID() {
35-
return fabricChainCodeID;
30+
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getFabricChaincodeID() {
31+
return fabricChaincodeID;
3632
}
3733

38-
39-
ChainCodeID(ChaincodeID chaincodeID) {
40-
this.fabricChainCodeID = chaincodeID;
34+
ChaincodeID(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeID) {
35+
this.fabricChaincodeID = chaincodeID;
4136
}
4237

4338
public String getName() {
44-
return fabricChainCodeID.getName();
39+
return fabricChaincodeID.getName();
4540
}
4641

4742
public String getPath() {
48-
return fabricChainCodeID.getPath();
43+
return fabricChaincodeID.getPath();
4944

5045
}
5146

5247
public String getVersion() {
53-
return fabricChainCodeID.getVersion();
48+
return fabricChaincodeID.getVersion();
5449

5550
}
5651

5752
/**
58-
* Build a new ChainCodeID
53+
* Build a new ChaincodeID
5954
*/
6055

6156
public static class Builder {
62-
private final ChaincodeID.Builder protoBuilder = ChaincodeID.newBuilder();
57+
private final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder protoBuilder = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder();
6358

6459
private Builder() {
6560
}
@@ -75,7 +70,7 @@ public Builder setName(String name) {
7570
}
7671

7772
/**
78-
* Set the version of the ChainCode
73+
* Set the version of the Chaincode
7974
*
8075
* @param version of the chaincode
8176
* @return Builder
@@ -99,8 +94,8 @@ public Builder setPath(String path) {
9994
return this;
10095
}
10196

102-
public ChainCodeID build() {
103-
return new ChainCodeID(this.protoBuilder.build());
97+
public ChaincodeID build() {
98+
return new ChaincodeID(this.protoBuilder.build());
10499
}
105100
}
106101

src/main/java/org/hyperledger/fabric/sdk/ChainCodeResponse.java renamed to src/main/java/org/hyperledger/fabric/sdk/ChaincodeResponse.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
package org.hyperledger.fabric.sdk;
1616

17-
public class ChainCodeResponse {
17+
public class ChaincodeResponse {
1818
public enum Status {
1919
UNDEFINED(0),
2020
SUCCESS(200),
@@ -34,16 +34,16 @@ public int getStatus() {
3434
private Status status = Status.UNDEFINED;
3535
private String message = null;
3636
private String transactionID = null;
37-
private String chainCodeID = null;
37+
private String chaincodeID = null;
3838

39-
public ChainCodeResponse(String transactionID, String chainCodeID, Status status, String message) {
39+
public ChaincodeResponse(String transactionID, String chaincodeID, Status status, String message) {
4040
this.status = status;
4141
this.message = message;
4242
this.transactionID = transactionID;
43-
this.chainCodeID = chainCodeID;
43+
this.chaincodeID = chaincodeID;
4444
}
4545

46-
public ChainCodeResponse(String transactionID, String chainCodeID, int istatus, String message) {
46+
public ChaincodeResponse(String transactionID, String chaincodeID, int istatus, String message) {
4747

4848
switch (istatus) {
4949
case 200:
@@ -57,7 +57,7 @@ public ChainCodeResponse(String transactionID, String chainCodeID, int istatus,
5757
}
5858
this.message = message;
5959
this.transactionID = transactionID;
60-
this.chainCodeID = chainCodeID;
60+
this.chaincodeID = chaincodeID;
6161
}
6262

6363
/**
@@ -82,10 +82,10 @@ public String getTransactionID() {
8282
}
8383

8484
// /**
85-
// * @return the chainCodeID
85+
// * @return the chaincodeID
8686
// */
87-
// public ChainCodeID getChainCodeID() {
88-
// return new ChainCodeID()
87+
// public ChaincodeID getChaincodeID() {
88+
// return new ChaincodeID()
8989
// }
9090

9191
}

0 commit comments

Comments
 (0)