Skip to content

Commit 3f0af4d

Browse files
author
Luis Sanchez
committed
[FAB-3101] rename fabric shim java package
As part of cleanup towards a v1.0 release moved: org.hyperledger.java to: org.hyperledger.fabric.shim Change-Id: Id9e35085a11562b48c8031cd663e091d9de0b06e Signed-off-by: Luis Sanchez <[email protected]>
1 parent 8026601 commit 3f0af4d

File tree

31 files changed

+70
-70
lines changed

31 files changed

+70
-70
lines changed

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Chaincode.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Chaincode.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
package org.hyperledger.java.shim;
14+
package org.hyperledger.fabric.shim;
1515

1616
import org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response;
1717

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeBase.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeBase.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.shim;
17+
package org.hyperledger.fabric.shim;
1818

1919
import java.io.File;
2020

@@ -45,13 +45,13 @@
4545
public abstract class ChaincodeBase implements Chaincode {
4646

4747
/* (non-Javadoc)
48-
* @see org.hyperledger.java.shim.Chaincode#init(org.hyperledger.java.shim.ChaincodeStub)
48+
* @see org.hyperledger.fabric.shim.Chaincode#init(org.hyperledger.fabric.shim.ChaincodeStub)
4949
*/
5050
@Override
5151
public abstract Response init(ChaincodeStub stub);
5252

5353
/* (non-Javadoc)
54-
* @see org.hyperledger.java.shim.Chaincode#invoke(org.hyperledger.java.shim.ChaincodeStub)
54+
* @see org.hyperledger.fabric.shim.Chaincode#invoke(org.hyperledger.fabric.shim.ChaincodeStub)
5555
*/
5656
@Override
5757
public abstract Response invoke(ChaincodeStub stub);
@@ -176,7 +176,7 @@ public void chatWithPeer(ManagedChannel connection) {
176176
public void onNext(ChaincodeMessage message) {
177177
logger.info("Got message from peer: " + toJsonString(message));
178178
try {
179-
logger.info(String.format("[%s]Received message %s from org.hyperledger.java.shim",
179+
logger.info(String.format("[%s]Received message %s from org.hyperledger.fabric.shim",
180180
Handler.shortID(message.getTxid()), message.getType()));
181181
handler.handleMessage(message);
182182
} catch (Exception e) {
@@ -202,7 +202,7 @@ public void onCompleted() {
202202
System.exit(-1);
203203
}
204204

205-
// Create the org.hyperledger.java.shim handler responsible for all
205+
// Create the org.hyperledger.fabric.shim handler responsible for all
206206
// control logic
207207
handler = new Handler(requestObserver, this);
208208

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeHelper.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeHelper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.
1313
*/
14-
package org.hyperledger.java.shim;
14+
package org.hyperledger.fabric.shim;
1515

1616
import static org.hyperledger.fabric.protos.common.Common.Status.BAD_REQUEST;
1717
import static org.hyperledger.fabric.protos.common.Common.Status.FORBIDDEN;

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.shim;
17+
package org.hyperledger.fabric.shim;
1818

1919
import java.util.Collections;
2020
import java.util.List;

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Handler.java

+14-14
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.shim;
17+
package org.hyperledger.fabric.shim;
1818

1919
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.COMPLETED;
2020
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.DEL_STATE;
@@ -27,10 +27,10 @@
2727
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.REGISTERED;
2828
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.RESPONSE;
2929
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.TRANSACTION;
30-
import static org.hyperledger.java.fsm.CallbackType.AFTER_EVENT;
31-
import static org.hyperledger.java.fsm.CallbackType.BEFORE_EVENT;
32-
import static org.hyperledger.java.shim.HandlerHelper.newCompletedEventMessage;
33-
import static org.hyperledger.java.shim.HandlerHelper.newErrorEventMessage;
30+
import static org.hyperledger.fabric.shim.HandlerHelper.newCompletedEventMessage;
31+
import static org.hyperledger.fabric.shim.HandlerHelper.newErrorEventMessage;
32+
import static org.hyperledger.fabric.shim.fsm.CallbackType.AFTER_EVENT;
33+
import static org.hyperledger.fabric.shim.fsm.CallbackType.BEFORE_EVENT;
3434

3535
import java.util.HashMap;
3636
import java.util.List;
@@ -45,13 +45,13 @@
4545
import org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage;
4646
import org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateInfo;
4747
import org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response;
48-
import org.hyperledger.java.fsm.CBDesc;
49-
import org.hyperledger.java.fsm.Event;
50-
import org.hyperledger.java.fsm.EventDesc;
51-
import org.hyperledger.java.fsm.FSM;
52-
import org.hyperledger.java.fsm.exceptions.CancelledException;
53-
import org.hyperledger.java.fsm.exceptions.NoTransitionException;
54-
import org.hyperledger.java.helper.Channel;
48+
import org.hyperledger.fabric.shim.fsm.CBDesc;
49+
import org.hyperledger.fabric.shim.fsm.Event;
50+
import org.hyperledger.fabric.shim.fsm.EventDesc;
51+
import org.hyperledger.fabric.shim.fsm.FSM;
52+
import org.hyperledger.fabric.shim.fsm.exceptions.CancelledException;
53+
import org.hyperledger.fabric.shim.fsm.exceptions.NoTransitionException;
54+
import org.hyperledger.fabric.shim.helper.Channel;
5555

5656
import com.google.protobuf.ByteString;
5757
import com.google.protobuf.InvalidProtocolBufferException;
@@ -729,7 +729,7 @@ public ByteString handleInvokeChaincode(String chaincodeName, String function, L
729729
}
730730
}
731731

732-
// handleMessage message handles loop for org.hyperledger.java.shim side of chaincode/validator stream.
732+
// handleMessage message handles loop for org.hyperledger.fabric.shim side of chaincode/validator stream.
733733
public synchronized void handleMessage(ChaincodeMessage message) throws Exception {
734734

735735
if (message.getType() == ChaincodeMessage.Type.KEEPALIVE){
@@ -743,7 +743,7 @@ public synchronized void handleMessage(ChaincodeMessage message) throws Exceptio
743743
logger.debug(String.format("[%s]Handling ChaincodeMessage of type: %s(state:%s)", shortID(message), message.getType(), fsm.current()));
744744

745745
if (fsm.eventCannotOccur(message.getType().toString())) {
746-
String errStr = String.format("[%s]Chaincode handler org.hyperledger.java.fsm cannot handle message (%s) with payload size (%d) while in state: %s",
746+
String errStr = String.format("[%s]Chaincode handler org.hyperledger.fabric.shim.fsm cannot handle message (%s) with payload size (%d) while in state: %s",
747747
message.getTxid(), message.getType(), message.getPayload().size(), fsm.current());
748748
serialSend(newErrorEventMessage(message.getTxid(), errStr));
749749
throw new RuntimeException(errStr);

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/HandlerHelper.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/HandlerHelper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.
1313
*/
14-
package org.hyperledger.java.shim;
14+
package org.hyperledger.fabric.shim;
1515

1616
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.COMPLETED;
1717
import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.ERROR;

core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/NextStateInfo.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/NextStateInfo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.shim;
17+
package org.hyperledger.fabric.shim;
1818

1919
import org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage;
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CBDesc.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CBDesc.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919
public class CBDesc {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Callback.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Callback.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919
public interface Callback {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackKey.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackKey.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919
public class CallbackKey {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackType.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919
public enum CallbackType {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Event.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Event.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919

2020
/** Holds the info that get passed as a reference in the callbacks */

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventDesc.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventDesc.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.hyperledger.java.fsm;
1+
package org.hyperledger.fabric.shim.fsm;
22

33
/**
44
* Represents an event when initializing the FSM.

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventKey.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventKey.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919
/** Key for the transition map */
2020
public class EventKey {

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/FSM.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/FSM.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

1919
import java.util.HashMap;
2020
import java.util.HashSet;
2121

22-
import org.hyperledger.java.fsm.exceptions.AsyncException;
23-
import org.hyperledger.java.fsm.exceptions.CancelledException;
24-
import org.hyperledger.java.fsm.exceptions.InTrasistionException;
25-
import org.hyperledger.java.fsm.exceptions.InvalidEventException;
26-
import org.hyperledger.java.fsm.exceptions.NoTransitionException;
27-
import org.hyperledger.java.fsm.exceptions.NotInTransitionException;
28-
import org.hyperledger.java.fsm.exceptions.UnknownEventException;
22+
import org.hyperledger.fabric.shim.fsm.exceptions.AsyncException;
23+
import org.hyperledger.fabric.shim.fsm.exceptions.CancelledException;
24+
import org.hyperledger.fabric.shim.fsm.exceptions.InTrasistionException;
25+
import org.hyperledger.fabric.shim.fsm.exceptions.InvalidEventException;
26+
import org.hyperledger.fabric.shim.fsm.exceptions.NoTransitionException;
27+
import org.hyperledger.fabric.shim.fsm.exceptions.NotInTransitionException;
28+
import org.hyperledger.fabric.shim.fsm.exceptions.UnknownEventException;
2929

3030
public class FSM {
3131

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Transitioner.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Transitioner.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm;
17+
package org.hyperledger.fabric.shim.fsm;
1818

19-
import org.hyperledger.java.fsm.exceptions.NotInTransitionException;
19+
import org.hyperledger.fabric.shim.fsm.exceptions.NotInTransitionException;
2020

2121
public class Transitioner {
2222

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/AsyncException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/AsyncException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class AsyncException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/CancelledException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/CancelledException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class CancelledException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InTrasistionException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InTrasistionException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class InTrasistionException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InvalidEventException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InvalidEventException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class InvalidEventException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NoTransitionException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NoTransitionException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class NoTransitionException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NotInTransitionException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NotInTransitionException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class NotInTransitionException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/UnknownEventException.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/UnknownEventException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.fsm.exceptions;
17+
package org.hyperledger.fabric.shim.fsm.exceptions;
1818

1919
public class UnknownEventException extends Exception {
2020

core/chaincode/shim/java/src/main/java/org/hyperledger/java/helper/Channel.java core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/helper/Channel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package org.hyperledger.java.helper;
17+
package org.hyperledger.fabric.shim.helper;
1818

1919
import java.io.Closeable;
2020
import java.util.HashSet;

examples/chaincode/java/Example/src/main/java/example/Example.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
package example;
1919

20-
import org.hyperledger.java.shim.ChaincodeBase;
21-
import org.hyperledger.java.shim.ChaincodeStub;
20+
import org.hyperledger.fabric.shim.ChaincodeBase;
21+
import org.hyperledger.fabric.shim.ChaincodeStub;
2222
import org.apache.commons.logging.Log;
2323
import org.apache.commons.logging.LogFactory;
2424

examples/chaincode/java/LinkExample/src/main/java/example/LinkExample.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
package example;
1818

1919
import com.google.protobuf.ByteString;
20-
import org.hyperledger.java.shim.ChaincodeBase;
21-
import org.hyperledger.java.shim.ChaincodeStub;
20+
import org.hyperledger.fabric.shim.ChaincodeBase;
21+
import org.hyperledger.fabric.shim.ChaincodeStub;
2222

2323
import java.nio.charset.StandardCharsets;
2424
import java.util.LinkedList;

examples/chaincode/java/MapExample/src/main/java/example/MapExample.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package example;
1818

19-
import org.hyperledger.java.shim.ChaincodeBase;
20-
import org.hyperledger.java.shim.ChaincodeStub;
19+
import org.hyperledger.fabric.shim.ChaincodeBase;
20+
import org.hyperledger.fabric.shim.ChaincodeStub;
2121

2222
public class MapExample extends ChaincodeBase {
2323

examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import org.apache.commons.logging.Log;
1919
import org.apache.commons.logging.LogFactory;
20-
import org.hyperledger.java.shim.ChaincodeBase;
21-
import org.hyperledger.java.shim.ChaincodeStub;
20+
import org.hyperledger.fabric.shim.ChaincodeBase;
21+
import org.hyperledger.fabric.shim.ChaincodeStub;
2222

2323
import java.util.Map;
2424

examples/chaincode/java/SimpleSample/src/main/java/example/SimpleSample.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
import static java.lang.String.format;
2020
import static java.nio.charset.StandardCharsets.UTF_8;
21-
import static org.hyperledger.java.shim.ChaincodeHelper.newBadRequestResponse;
22-
import static org.hyperledger.java.shim.ChaincodeHelper.newInternalServerErrorResponse;
23-
import static org.hyperledger.java.shim.ChaincodeHelper.newSuccessResponse;
21+
import static org.hyperledger.fabric.shim.ChaincodeHelper.newBadRequestResponse;
22+
import static org.hyperledger.fabric.shim.ChaincodeHelper.newInternalServerErrorResponse;
23+
import static org.hyperledger.fabric.shim.ChaincodeHelper.newSuccessResponse;
2424

2525
import java.util.List;
2626

@@ -29,8 +29,8 @@
2929
import org.apache.commons.logging.Log;
3030
import org.apache.commons.logging.LogFactory;
3131
import org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response;
32-
import org.hyperledger.java.shim.ChaincodeBase;
33-
import org.hyperledger.java.shim.ChaincodeStub;
32+
import org.hyperledger.fabric.shim.ChaincodeBase;
33+
import org.hyperledger.fabric.shim.ChaincodeStub;
3434

3535
/**
3636
* <h1>Classic "transfer" sample chaincode</h1> (java implementation of <A href=

0 commit comments

Comments
 (0)