Skip to content

Commit

Permalink
refactor(weaver): rename corda packages to start with org.hyperledger…
Browse files Browse the repository at this point in the history
….cacti.weaver

Signed-off-by: Sandeep Nishad <sandeep.nishad1@ibm.com>
  • Loading branch information
sandeepnRES authored and petermetz committed Mar 28, 2023
1 parent d80a4e4 commit 61c43af
Show file tree
Hide file tree
Showing 130 changed files with 478 additions and 449 deletions.
2 changes: 1 addition & 1 deletion .dcilintignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-
# Cannot be edited as its a name of a imported Corda library, and Corda syntax
weaver/core/drivers/corda-driver/src/main/kotlin/CustomSerializationWhitelist.kt
weaver/samples/corda/corda-simple-application/clients/src/main/kotlin/com/cordaSimpleApplication/client/CustomSerializationWhitelist.kt
weaver/core/network/corda-interop-app/interop-workflows/src/main/kotlin/com/weaver/corda/app/interop/flows/customSerializers/CustomSerializationWhitelist.kt
weaver/core/network/corda-interop-app/interop-workflows/src/main/kotlin/org/hyperledger/cacti/weaver/corda/app/interop/flows/customSerializers/CustomSerializationWhitelist.kt

# Corda test network files that are generated and therefore cannot be altered to comply with DCI-Lint
weaver/tests/network-setups/corda/shared
1 change: 1 addition & 0 deletions .github/workflows/test_weaver-asset-exchange-corda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ jobs:
working-directory: weaver/samples/corda/corda-simple-application

house-token-exchange-corda:
if: ${{ false }}
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/access_control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.access_control;

option java_package = "com.weaver.protos.common.access_control";
option java_package = "org.hyperledger.cacti.weaver.protos.common.access_control";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

// AccessControlPolicy specifies a set of data that can be accessed by some
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/ack.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.ack;

option java_package = "com.weaver.protos.common.ack";
option java_package = "org.hyperledger.cacti.weaver.protos.common.ack";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

// This message respresents "ACKs" sent between relay-relay,
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/asset_locks.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.asset_locks;

option java_package = "com.weaver.protos.common.asset_locks";
option java_package = "org.hyperledger.cacti.weaver.protos.common.asset_locks";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

enum LockMechanism {
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/asset_transfer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.asset_transfer;

option java_package = "com.weaver.protos.common.asset_transfer";
option java_package = "org.hyperledger.cacti.weaver.protos.common.asset_transfer";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

message AssetPledge {
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package common.events;
import "common/query.proto";
import "common/state.proto";

option java_package = "com.weaver.protos.common.events";
option java_package = "org.hyperledger.cacti.weaver.protos.common.events";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

enum EventType {
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/interop_payload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.interop_payload;

option java_package = "com.weaver.protos.common.interop_payload";
option java_package = "org.hyperledger.cacti.weaver.protos.common.interop_payload";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

message InteropPayload {
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/membership.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.membership;

option java_package = "com.weaver.protos.common.membership";
option java_package = "org.hyperledger.cacti.weaver.protos.common.membership";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

// Membership captures the members of an external entity such as a thing,
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/proofs.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

package common.proofs;
option java_package = "com.weaver.protos.common.proofs";
option java_package = "org.hyperledger.cacti.weaver.protos.common.proofs";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

message Proof {
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/query.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

package common.query;
option java_package = "com.weaver.protos.common.query";
option java_package = "org.hyperledger.cacti.weaver.protos.common.query";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

// the payload to define the data that is being requested
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/state.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

package common.state;
option java_package = "com.weaver.protos.common.state";
option java_package = "org.hyperledger.cacti.weaver.protos.common.state";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

// Metadata for a View
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/common/verification_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package common.verification_policy;

option java_package = "com.weaver.protos.common.verification_policy";
option java_package = "org.hyperledger.cacti.weaver.protos.common.verification_policy";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/common";

// VerificationPolicy stores the rules around which parties from a foreign
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/corda/view_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package corda;

option java_package = "com.weaver.protos.corda";
option java_package = "org.hyperledger.cacti.weaver.protos.corda";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/corda";

message ViewData {
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/driver/driver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "common/query.proto";
import "common/events.proto";
import "common/state.proto";

option java_package = "com.weaver.protos.driver.driver";
option java_package = "org.hyperledger.cacti.weaver.protos.driver.driver";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/driver";

// Data for a View processing by dest-driver
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/fabric/view_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package fabric.view_data;

option java_package = "com.weaver.protos.fabric.view_data";
option java_package = "org.hyperledger.cacti.weaver.protos.fabric.view_data";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/fabric";

import "peer/proposal_response.proto";
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/identity/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package identity.agent;

import "common/ack.proto";

option java_package = "com.weaver.protos.identity.agent";
option java_package = "org.hyperledger.cacti.weaver.protos.identity.agent";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/identity";

// definitions of all messages used in the datatransfer protocol
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/networks/networks.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "common/ack.proto";
import "common/state.proto";
import "common/events.proto";

option java_package = "com.weaver.protos.networks.networks";
option java_package = "org.hyperledger.cacti.weaver.protos.networks.networks";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/networks";

// This service is the interface for how the network communicates with
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/relay/datatransfer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "common/ack.proto";
import "common/state.proto";
import "common/query.proto";

option java_package = "com.weaver.protos.relay.datatransfer";
option java_package = "org.hyperledger.cacti.weaver.protos.relay.datatransfer";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/relay";

// definitions of all messages used in the datatransfer protocol
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos/relay/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "common/ack.proto";
import "common/events.proto";
import "common/state.proto";

option java_package = "com.weaver.protos.relay.events";
option java_package = "org.hyperledger.cacti.weaver.protos.relay.events";
option go_package = "github.com/hyperledger/cacti/weaver/common/protos-go/relay";

service EventSubscribe {
Expand Down
10 changes: 5 additions & 5 deletions weaver/core/drivers/corda-driver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ dependencies {
implementation "net.corda:corda:$corda_version"
implementation "net.corda:corda-rpc:$corda_version"

implementation(group: 'com.weaver.corda.app.interop', name: 'interop-contracts', version: "$weaver_corda_version")
implementation(group: 'com.weaver.corda.app.interop', name: 'interop-workflows', version: "$weaver_corda_version")
implementation(group: 'com.weaver.corda.sdk', name: 'weaver-corda-sdk', version: "$weaver_corda_version")
implementation(group: 'com.weaver', name: 'protos-java-kt', version: "$weaver_protos_version")
implementation(group: 'org.hyperledger.cacti.weaver.corda.app.interop', name: 'interop-contracts', version: "$weaver_corda_version")
implementation(group: 'org.hyperledger.cacti.weaver.corda.app.interop', name: 'interop-workflows', version: "$weaver_corda_version")
implementation(group: 'org.hyperledger.cacti.weaver.corda.sdk', name: 'weaver-corda-sdk', version: "$weaver_corda_version")
implementation(group: 'org.hyperledger.cacti.weaver', name: 'protos-java-kt', version: "$weaver_protos_version")

// gRPC and protobuf dependencies
implementation "io.grpc:grpc-kotlin-stub:$grpc_kotlin_version"
Expand Down Expand Up @@ -123,7 +123,7 @@ dokka {
}


mainClassName = "com.weaver.corda.driver.CordaDriverKt"
mainClassName = "org.hyperledger.cacti.weaver.corda.driver.CordaDriverKt"

tasks.test {
useJUnitPlatform()
Expand Down
2 changes: 1 addition & 1 deletion weaver/core/drivers/corda-driver/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kotlin.code.style=official
name=corda-driver
group=com.weaver.corda.driver
group=org.hyperledger.cacti.weaver.corda.driver
version=1.2.14
kotlin.incremental=false
12 changes: 6 additions & 6 deletions weaver/core/drivers/corda-driver/src/main/kotlin/CordaDriver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.driver
package org.hyperledger.cacti.weaver.corda.driver

import arrow.core.*
import arrow.core.extensions.either.applicative.applicative
Expand All @@ -16,11 +16,11 @@ import com.google.protobuf.ByteString
import net.corda.core.messaging.CordaRPCOps
import java.util.*

import com.weaver.corda.app.interop.flows.HandleExternalRequest
import com.weaver.corda.sdk.InteroperableHelper
import com.weaver.protos.common.query.QueryOuterClass
import com.weaver.protos.common.state.State
import com.weaver.protos.corda.ViewDataOuterClass
import org.hyperledger.cacti.weaver.corda.app.interop.flows.HandleExternalRequest
import org.hyperledger.cacti.weaver.corda.sdk.InteroperableHelper
import org.hyperledger.cacti.weaver.protos.common.query.QueryOuterClass
import org.hyperledger.cacti.weaver.protos.common.state.State
import org.hyperledger.cacti.weaver.protos.corda.ViewDataOuterClass

fun main(args: Array<String>) {
val port = System.getenv("DRIVER_PORT")?.toInt() ?: 9099
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.driver
package org.hyperledger.cacti.weaver.corda.driver

import net.corda.client.rpc.CordaRPCClient
import net.corda.core.utilities.NetworkHostAndPort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.driver
package org.hyperledger.cacti.weaver.corda.driver

import arrow.core.Either
import net.corda.core.serialization.SerializationWhitelist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.driver
package org.hyperledger.cacti.weaver.corda.driver

import io.grpc.ManagedChannel
import io.grpc.Status
Expand All @@ -14,8 +14,8 @@ import kotlinx.coroutines.coroutineScope
import java.io.Closeable
import java.util.concurrent.TimeUnit

import com.weaver.protos.common.state.State
import com.weaver.protos.relay.datatransfer.DataTransferGrpcKt
import org.hyperledger.cacti.weaver.protos.common.state.State
import org.hyperledger.cacti.weaver.protos.relay.datatransfer.DataTransferGrpcKt

/**
* Implements a gRPC client that connects to a local relay to send back requested state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.driver
package org.hyperledger.cacti.weaver.corda.driver

import java.io.File
import io.grpc.Server
import io.grpc.ServerBuilder
import kotlinx.coroutines.*

import com.weaver.protos.common.ack.AckOuterClass
import com.weaver.protos.common.query.QueryOuterClass
import com.weaver.protos.driver.driver.DriverCommunicationGrpcKt
import org.hyperledger.cacti.weaver.protos.common.ack.AckOuterClass
import org.hyperledger.cacti.weaver.protos.common.query.QueryOuterClass
import org.hyperledger.cacti.weaver.protos.driver.driver.DriverCommunicationGrpcKt

/**
* The GrpcServer is used by the Corda driver to listen for requests for statefrom the relay.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
com.weaver.corda.driver.CustomSerializationWhitelist
org.hyperledger.cacti.weaver.corda.driver.CustomSerializationWhitelist
4 changes: 2 additions & 2 deletions weaver/core/network/corda-interop-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ and then follow above 4 steps.
5) Add this to your build.gradle (change the version accordingly):
```
dependencies {
compile(group: 'com.weaver.corda.app.interop', name: 'interop-contracts', version: "1.2.1")
compile(group: 'com.weaver.corda.app.interop', name: 'interop-workflows', version: "1.2.1")
compile(group: 'org.hyperledger.cacti.weaver.corda.app.interop', name: 'interop-contracts', version: "1.2.1")
compile(group: 'org.hyperledger.cacti.weaver.corda.app.interop', name: 'interop-workflows', version: "1.2.1")
}
```

Expand Down
2 changes: 1 addition & 1 deletion weaver/core/network/corda-interop-app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Interoperability CorDapp
group=com.weaver.corda.app.interop
group=org.hyperledger.cacti.weaver.corda.app.interop
version=1.2.14
kotlin.incremental=false
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies {
testCompile "$corda_release_group:corda-node-driver:$corda_release_version"

// weaver-protos
implementation "com.weaver:protos-java-kt:$weaver_version"
implementation "org.hyperledger.cacti.weaver:protos-java-kt:$weaver_version"

compile "com.google.protobuf:protobuf-java:$protobuf_version"
compile "com.google.protobuf:protobuf-java-util:$protobuf_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.app.interop.contracts
package org.hyperledger.cacti.weaver.corda.app.interop.contracts

import com.weaver.corda.app.interop.states.AccessControlPolicyState
import org.hyperledger.cacti.weaver.corda.app.interop.states.AccessControlPolicyState
import net.corda.core.contracts.CommandData
import net.corda.core.contracts.Contract
import net.corda.core.contracts.requireSingleCommand
Expand All @@ -24,7 +24,7 @@ import net.corda.core.transactions.LedgerTransaction
class AccessControlPolicyStateContract : Contract {
companion object {
// Used to identify our contract when building a transaction.
const val ID = "com.weaver.corda.app.interop.contracts.AccessControlPolicyStateContract"
const val ID = "org.hyperledger.cacti.weaver.corda.app.interop.contracts.AccessControlPolicyStateContract"
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* SPDX-License-Identifier: Apache-2.0
*/

package com.weaver.corda.app.interop.contracts
package org.hyperledger.cacti.weaver.corda.app.interop.contracts

import com.weaver.corda.app.interop.states.AssetExchangeHTLCState
import com.weaver.corda.app.interop.states.AssetClaimHTLCData
import com.weaver.corda.app.interop.states.AssetExchangeTxState
import com.weaver.corda.app.interop.states.sha512
import com.weaver.corda.app.interop.states.HashMechanism
import org.hyperledger.cacti.weaver.corda.app.interop.states.AssetExchangeHTLCState
import org.hyperledger.cacti.weaver.corda.app.interop.states.AssetClaimHTLCData
import org.hyperledger.cacti.weaver.corda.app.interop.states.AssetExchangeTxState
import org.hyperledger.cacti.weaver.corda.app.interop.states.sha512
import org.hyperledger.cacti.weaver.corda.app.interop.states.HashMechanism
import net.corda.core.contracts.CommandData
import net.corda.core.contracts.Contract
import net.corda.core.contracts.requireSingleCommand
Expand All @@ -28,7 +28,7 @@ import java.util.*
class AssetExchangeHTLCStateContract : Contract {
companion object {
// Used to identify our contract when building a transaction.
const val ID = "com.weaver.corda.app.interop.contracts.AssetExchangeHTLCStateContract"
const val ID = "org.hyperledger.cacti.weaver.corda.app.interop.contracts.AssetExchangeHTLCStateContract"
}

/**
Expand Down Expand Up @@ -140,7 +140,7 @@ class AssetExchangeHTLCStateContract : Contract {
class AssetExchangeTxStateContract : Contract {
companion object {
// Used to identify our contract when building a transaction.
const val ID = "com.weaver.corda.app.interop.contracts.AssetExchangeTxStateContract"
const val ID = "org.hyperledger.cacti.weaver.corda.app.interop.contracts.AssetExchangeTxStateContract"
}
override fun verify(tx: LedgerTransaction) {
val command = tx.commands.requireSingleCommand<Commands>()
Expand Down
Loading

0 comments on commit 61c43af

Please sign in to comment.