From 3f0af4df8fe5d0fa3b232ff2d6a1b26814fbebc0 Mon Sep 17 00:00:00 2001 From: Luis Sanchez Date: Tue, 11 Apr 2017 16:02:58 -0400 Subject: [PATCH] [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 --- .../{java => fabric}/shim/Chaincode.java | 2 +- .../{java => fabric}/shim/ChaincodeBase.java | 10 +++---- .../shim/ChaincodeHelper.java | 2 +- .../{java => fabric}/shim/ChaincodeStub.java | 2 +- .../{java => fabric}/shim/Handler.java | 28 +++++++++---------- .../{java => fabric}/shim/HandlerHelper.java | 2 +- .../{java => fabric}/shim/NextStateInfo.java | 2 +- .../{java => fabric/shim}/fsm/CBDesc.java | 2 +- .../{java => fabric/shim}/fsm/Callback.java | 2 +- .../shim}/fsm/CallbackKey.java | 2 +- .../shim}/fsm/CallbackType.java | 2 +- .../{java => fabric/shim}/fsm/Event.java | 2 +- .../{java => fabric/shim}/fsm/EventDesc.java | 2 +- .../{java => fabric/shim}/fsm/EventKey.java | 2 +- .../{java => fabric/shim}/fsm/FSM.java | 16 +++++------ .../shim}/fsm/Transitioner.java | 4 +-- .../shim}/fsm/exceptions/AsyncException.java | 2 +- .../fsm/exceptions/CancelledException.java | 2 +- .../fsm/exceptions/InTrasistionException.java | 2 +- .../fsm/exceptions/InvalidEventException.java | 2 +- .../fsm/exceptions/NoTransitionException.java | 2 +- .../exceptions/NotInTransitionException.java | 2 +- .../fsm/exceptions/UnknownEventException.java | 2 +- .../{java => fabric/shim}/helper/Channel.java | 2 +- .../src/main/java/example/Example.java | 4 +-- .../src/main/java/example/LinkExample.java | 4 +-- .../src/main/java/example/MapExample.java | 4 +-- .../src/main/java/example/RangeExample.java | 4 +-- .../src/main/java/example/SimpleSample.java | 10 +++---- .../src/main/java/example/Example02.java | 10 +++---- .../src/main/java/example/Example06.java | 6 ++-- 31 files changed, 70 insertions(+), 70 deletions(-) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/Chaincode.java (96%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/ChaincodeBase.java (93%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/ChaincodeHelper.java (99%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/ChaincodeStub.java (96%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/Handler.java (94%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/HandlerHelper.java (98%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric}/shim/NextStateInfo.java (92%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/CBDesc.java (92%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/Callback.java (90%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/CallbackKey.java (93%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/CallbackType.java (90%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/Event.java (94%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/EventDesc.java (92%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/EventKey.java (93%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/FSM.java (89%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/Transitioner.java (84%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/AsyncException.java (91%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/CancelledException.java (91%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/InTrasistionException.java (91%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/InvalidEventException.java (91%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/NoTransitionException.java (91%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/NotInTransitionException.java (90%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/fsm/exceptions/UnknownEventException.java (90%) rename core/chaincode/shim/java/src/main/java/org/hyperledger/{java => fabric/shim}/helper/Channel.java (93%) diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Chaincode.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Chaincode.java similarity index 96% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Chaincode.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Chaincode.java index e44fa404f34..1b57615d756 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Chaincode.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Chaincode.java @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response; diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeBase.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeBase.java similarity index 93% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeBase.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeBase.java index 64c1367404d..a1715588e5e 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeBase.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeBase.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import java.io.File; @@ -45,13 +45,13 @@ public abstract class ChaincodeBase implements Chaincode { /* (non-Javadoc) - * @see org.hyperledger.java.shim.Chaincode#init(org.hyperledger.java.shim.ChaincodeStub) + * @see org.hyperledger.fabric.shim.Chaincode#init(org.hyperledger.fabric.shim.ChaincodeStub) */ @Override public abstract Response init(ChaincodeStub stub); /* (non-Javadoc) - * @see org.hyperledger.java.shim.Chaincode#invoke(org.hyperledger.java.shim.ChaincodeStub) + * @see org.hyperledger.fabric.shim.Chaincode#invoke(org.hyperledger.fabric.shim.ChaincodeStub) */ @Override public abstract Response invoke(ChaincodeStub stub); @@ -176,7 +176,7 @@ public void chatWithPeer(ManagedChannel connection) { public void onNext(ChaincodeMessage message) { logger.info("Got message from peer: " + toJsonString(message)); try { - logger.info(String.format("[%s]Received message %s from org.hyperledger.java.shim", + logger.info(String.format("[%s]Received message %s from org.hyperledger.fabric.shim", Handler.shortID(message.getTxid()), message.getType())); handler.handleMessage(message); } catch (Exception e) { @@ -202,7 +202,7 @@ public void onCompleted() { System.exit(-1); } - // Create the org.hyperledger.java.shim handler responsible for all + // Create the org.hyperledger.fabric.shim handler responsible for all // control logic handler = new Handler(requestObserver, this); diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeHelper.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeHelper.java similarity index 99% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeHelper.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeHelper.java index 162394dd1dd..d2472dbd132 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeHelper.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeHelper.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import static org.hyperledger.fabric.protos.common.Common.Status.BAD_REQUEST; import static org.hyperledger.fabric.protos.common.Common.Status.FORBIDDEN; diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java similarity index 96% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java index 11542af7baa..d5cc9bb3141 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import java.util.Collections; import java.util.List; diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Handler.java similarity index 94% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Handler.java index 3a62f5e051e..862ee214696 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/Handler.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.COMPLETED; import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.DEL_STATE; @@ -27,10 +27,10 @@ import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.REGISTERED; import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.RESPONSE; import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.TRANSACTION; -import static org.hyperledger.java.fsm.CallbackType.AFTER_EVENT; -import static org.hyperledger.java.fsm.CallbackType.BEFORE_EVENT; -import static org.hyperledger.java.shim.HandlerHelper.newCompletedEventMessage; -import static org.hyperledger.java.shim.HandlerHelper.newErrorEventMessage; +import static org.hyperledger.fabric.shim.HandlerHelper.newCompletedEventMessage; +import static org.hyperledger.fabric.shim.HandlerHelper.newErrorEventMessage; +import static org.hyperledger.fabric.shim.fsm.CallbackType.AFTER_EVENT; +import static org.hyperledger.fabric.shim.fsm.CallbackType.BEFORE_EVENT; import java.util.HashMap; import java.util.List; @@ -45,13 +45,13 @@ import org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage; import org.hyperledger.fabric.protos.peer.ChaincodeShim.PutStateInfo; import org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response; -import org.hyperledger.java.fsm.CBDesc; -import org.hyperledger.java.fsm.Event; -import org.hyperledger.java.fsm.EventDesc; -import org.hyperledger.java.fsm.FSM; -import org.hyperledger.java.fsm.exceptions.CancelledException; -import org.hyperledger.java.fsm.exceptions.NoTransitionException; -import org.hyperledger.java.helper.Channel; +import org.hyperledger.fabric.shim.fsm.CBDesc; +import org.hyperledger.fabric.shim.fsm.Event; +import org.hyperledger.fabric.shim.fsm.EventDesc; +import org.hyperledger.fabric.shim.fsm.FSM; +import org.hyperledger.fabric.shim.fsm.exceptions.CancelledException; +import org.hyperledger.fabric.shim.fsm.exceptions.NoTransitionException; +import org.hyperledger.fabric.shim.helper.Channel; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; @@ -729,7 +729,7 @@ public ByteString handleInvokeChaincode(String chaincodeName, String function, L } } - // handleMessage message handles loop for org.hyperledger.java.shim side of chaincode/validator stream. + // handleMessage message handles loop for org.hyperledger.fabric.shim side of chaincode/validator stream. public synchronized void handleMessage(ChaincodeMessage message) throws Exception { if (message.getType() == ChaincodeMessage.Type.KEEPALIVE){ @@ -743,7 +743,7 @@ public synchronized void handleMessage(ChaincodeMessage message) throws Exceptio logger.debug(String.format("[%s]Handling ChaincodeMessage of type: %s(state:%s)", shortID(message), message.getType(), fsm.current())); if (fsm.eventCannotOccur(message.getType().toString())) { - String errStr = String.format("[%s]Chaincode handler org.hyperledger.java.fsm cannot handle message (%s) with payload size (%d) while in state: %s", + String errStr = String.format("[%s]Chaincode handler org.hyperledger.fabric.shim.fsm cannot handle message (%s) with payload size (%d) while in state: %s", message.getTxid(), message.getType(), message.getPayload().size(), fsm.current()); serialSend(newErrorEventMessage(message.getTxid(), errStr)); throw new RuntimeException(errStr); diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/HandlerHelper.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/HandlerHelper.java similarity index 98% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/HandlerHelper.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/HandlerHelper.java index 6c51be0f626..99bf7cd8c06 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/HandlerHelper.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/HandlerHelper.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.COMPLETED; import static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.ERROR; diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/NextStateInfo.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/NextStateInfo.java similarity index 92% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/NextStateInfo.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/NextStateInfo.java index 3cd9ffcaca0..9be4854ef15 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/NextStateInfo.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/NextStateInfo.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.shim; +package org.hyperledger.fabric.shim; import org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage; diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CBDesc.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CBDesc.java similarity index 92% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CBDesc.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CBDesc.java index ac2f414763a..abd62fe0a63 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CBDesc.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CBDesc.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; public class CBDesc { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Callback.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Callback.java similarity index 90% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Callback.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Callback.java index b0a5420bcf5..54af4b99266 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Callback.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Callback.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; public interface Callback { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackKey.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackKey.java similarity index 93% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackKey.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackKey.java index 2c94d4d371b..72fe3858178 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackKey.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackKey.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; public class CallbackKey { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackType.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackType.java similarity index 90% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackType.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackType.java index c4db630d51c..c7969691d4c 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/CallbackType.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/CallbackType.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; public enum CallbackType { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Event.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Event.java similarity index 94% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Event.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Event.java index 9bf8e17d748..88cf31ce26a 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Event.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Event.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; /** Holds the info that get passed as a reference in the callbacks */ diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventDesc.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventDesc.java similarity index 92% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventDesc.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventDesc.java index 67b639f30ef..6631c956ff9 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventDesc.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventDesc.java @@ -1,4 +1,4 @@ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; /** * Represents an event when initializing the FSM. diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventKey.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventKey.java similarity index 93% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventKey.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventKey.java index 1b7cfd830ec..38b0a4a59a2 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/EventKey.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/EventKey.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; /** Key for the transition map */ public class EventKey { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/FSM.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/FSM.java similarity index 89% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/FSM.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/FSM.java index 1eb8cedce78..22fddb6d8b4 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/FSM.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/FSM.java @@ -14,18 +14,18 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; import java.util.HashMap; import java.util.HashSet; -import org.hyperledger.java.fsm.exceptions.AsyncException; -import org.hyperledger.java.fsm.exceptions.CancelledException; -import org.hyperledger.java.fsm.exceptions.InTrasistionException; -import org.hyperledger.java.fsm.exceptions.InvalidEventException; -import org.hyperledger.java.fsm.exceptions.NoTransitionException; -import org.hyperledger.java.fsm.exceptions.NotInTransitionException; -import org.hyperledger.java.fsm.exceptions.UnknownEventException; +import org.hyperledger.fabric.shim.fsm.exceptions.AsyncException; +import org.hyperledger.fabric.shim.fsm.exceptions.CancelledException; +import org.hyperledger.fabric.shim.fsm.exceptions.InTrasistionException; +import org.hyperledger.fabric.shim.fsm.exceptions.InvalidEventException; +import org.hyperledger.fabric.shim.fsm.exceptions.NoTransitionException; +import org.hyperledger.fabric.shim.fsm.exceptions.NotInTransitionException; +import org.hyperledger.fabric.shim.fsm.exceptions.UnknownEventException; public class FSM { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Transitioner.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Transitioner.java similarity index 84% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Transitioner.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Transitioner.java index 45a06382f62..bd3571fefb0 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/Transitioner.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/Transitioner.java @@ -14,9 +14,9 @@ limitations under the License. */ -package org.hyperledger.java.fsm; +package org.hyperledger.fabric.shim.fsm; -import org.hyperledger.java.fsm.exceptions.NotInTransitionException; +import org.hyperledger.fabric.shim.fsm.exceptions.NotInTransitionException; public class Transitioner { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/AsyncException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/AsyncException.java similarity index 91% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/AsyncException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/AsyncException.java index df7d9d8b96f..ff4c8841279 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/AsyncException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/AsyncException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class AsyncException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/CancelledException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/CancelledException.java similarity index 91% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/CancelledException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/CancelledException.java index f7b6c6142d0..2814e737232 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/CancelledException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/CancelledException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class CancelledException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InTrasistionException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InTrasistionException.java similarity index 91% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InTrasistionException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InTrasistionException.java index fd5bee0edeb..d630cb32cc2 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InTrasistionException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InTrasistionException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class InTrasistionException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InvalidEventException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InvalidEventException.java similarity index 91% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InvalidEventException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InvalidEventException.java index dd1e3a6b273..4026eb31896 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/InvalidEventException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/InvalidEventException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class InvalidEventException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NoTransitionException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NoTransitionException.java similarity index 91% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NoTransitionException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NoTransitionException.java index 485237d1f09..07645b97d6e 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NoTransitionException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NoTransitionException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class NoTransitionException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NotInTransitionException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NotInTransitionException.java similarity index 90% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NotInTransitionException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NotInTransitionException.java index 7c9ed47559b..f6edf27912c 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/NotInTransitionException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/NotInTransitionException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class NotInTransitionException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/UnknownEventException.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/UnknownEventException.java similarity index 90% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/UnknownEventException.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/UnknownEventException.java index f3bb32b1976..f7c4c348d37 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/fsm/exceptions/UnknownEventException.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/fsm/exceptions/UnknownEventException.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.fsm.exceptions; +package org.hyperledger.fabric.shim.fsm.exceptions; public class UnknownEventException extends Exception { diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/helper/Channel.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/helper/Channel.java similarity index 93% rename from core/chaincode/shim/java/src/main/java/org/hyperledger/java/helper/Channel.java rename to core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/helper/Channel.java index 58384147bdd..de839d5e270 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/helper/Channel.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/helper/Channel.java @@ -14,7 +14,7 @@ limitations under the License. */ -package org.hyperledger.java.helper; +package org.hyperledger.fabric.shim.helper; import java.io.Closeable; import java.util.HashSet; diff --git a/examples/chaincode/java/Example/src/main/java/example/Example.java b/examples/chaincode/java/Example/src/main/java/example/Example.java index 3d9e3b9659c..589ab1bfd9a 100644 --- a/examples/chaincode/java/Example/src/main/java/example/Example.java +++ b/examples/chaincode/java/Example/src/main/java/example/Example.java @@ -17,8 +17,8 @@ package example; -import org.hyperledger.java.shim.ChaincodeBase; -import org.hyperledger.java.shim.ChaincodeStub; +import org.hyperledger.fabric.shim.ChaincodeBase; +import org.hyperledger.fabric.shim.ChaincodeStub; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/examples/chaincode/java/LinkExample/src/main/java/example/LinkExample.java b/examples/chaincode/java/LinkExample/src/main/java/example/LinkExample.java index bbbc5967b74..c143509cd08 100644 --- a/examples/chaincode/java/LinkExample/src/main/java/example/LinkExample.java +++ b/examples/chaincode/java/LinkExample/src/main/java/example/LinkExample.java @@ -17,8 +17,8 @@ package example; import com.google.protobuf.ByteString; -import org.hyperledger.java.shim.ChaincodeBase; -import org.hyperledger.java.shim.ChaincodeStub; +import org.hyperledger.fabric.shim.ChaincodeBase; +import org.hyperledger.fabric.shim.ChaincodeStub; import java.nio.charset.StandardCharsets; import java.util.LinkedList; diff --git a/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java b/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java index 5d57e6decef..f60536230ac 100644 --- a/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java +++ b/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java @@ -16,8 +16,8 @@ package example; -import org.hyperledger.java.shim.ChaincodeBase; -import org.hyperledger.java.shim.ChaincodeStub; +import org.hyperledger.fabric.shim.ChaincodeBase; +import org.hyperledger.fabric.shim.ChaincodeStub; public class MapExample extends ChaincodeBase { diff --git a/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java b/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java index 0c1eff2b1e8..cf1425c91e2 100644 --- a/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java +++ b/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java @@ -17,8 +17,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.hyperledger.java.shim.ChaincodeBase; -import org.hyperledger.java.shim.ChaincodeStub; +import org.hyperledger.fabric.shim.ChaincodeBase; +import org.hyperledger.fabric.shim.ChaincodeStub; import java.util.Map; diff --git a/examples/chaincode/java/SimpleSample/src/main/java/example/SimpleSample.java b/examples/chaincode/java/SimpleSample/src/main/java/example/SimpleSample.java index eaeb15317c7..1122838a21d 100644 --- a/examples/chaincode/java/SimpleSample/src/main/java/example/SimpleSample.java +++ b/examples/chaincode/java/SimpleSample/src/main/java/example/SimpleSample.java @@ -18,9 +18,9 @@ import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.hyperledger.java.shim.ChaincodeHelper.newBadRequestResponse; -import static org.hyperledger.java.shim.ChaincodeHelper.newInternalServerErrorResponse; -import static org.hyperledger.java.shim.ChaincodeHelper.newSuccessResponse; +import static org.hyperledger.fabric.shim.ChaincodeHelper.newBadRequestResponse; +import static org.hyperledger.fabric.shim.ChaincodeHelper.newInternalServerErrorResponse; +import static org.hyperledger.fabric.shim.ChaincodeHelper.newSuccessResponse; import java.util.List; @@ -29,8 +29,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hyperledger.fabric.protos.peer.ProposalResponsePackage.Response; -import org.hyperledger.java.shim.ChaincodeBase; -import org.hyperledger.java.shim.ChaincodeStub; +import org.hyperledger.fabric.shim.ChaincodeBase; +import org.hyperledger.fabric.shim.ChaincodeStub; /** *

Classic "transfer" sample chaincode

(java implementation of