This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 776544367ef CAMEL-18315: camel-hyperledger-aries - Add support for
single tenancy agent (#8059)
776544367ef is described below
commit 776544367ef7e3502a3a40163f77b07d4962c9d8
Author: Thomas Diesler <[email protected]>
AuthorDate: Thu Jul 28 12:37:31 2022 +0200
CAMEL-18315: camel-hyperledger-aries - Add support for single tenancy agent
(#8059)
---
camel-dependencies/pom.xml | 2 +-
.../aries/ConnectionRecordConverterLoader.java | 60 ++++++++++++++++++++++
.../services/org/apache/camel/TypeConverterLoader | 1 +
.../component/aries/HyperledgerAriesComponent.java | 30 ++++-------
.../aries/HyperledgerAriesConfiguration.java | 16 ------
.../component/aries/HyperledgerAriesEndpoint.java | 24 ++-------
.../component/aries/HyperledgerAriesProducer.java | 16 ------
.../aries/handler/AbstractServiceHandler.java | 2 +-
.../aries/handler/ConnectionsServiceHandler.java | 15 ++++++
.../converter/aries/AbstractAriesConverter.java | 16 ------
...ConnectionReceiveInvitationFilterConverter.java | 16 ------
.../converter/aries/ConnectionRecordConverter.java | 54 +++++++++++++++++++
.../aries/CreateInvitationRequestConverter.java | 16 ------
.../aries/CreateWalletRequestConverter.java | 16 ------
.../aries/CredentialDefinitionFilterConverter.java | 16 ------
.../CredentialDefinitionRequestConverter.java | 16 ------
.../IssueCredentialRecordsFilterConverter.java | 16 ------
.../aries/PresentProofRequestConverter.java | 16 ------
.../aries/PresentationRequestConverter.java | 16 ------
.../aries/ReceiveInvitationRequestConverter.java | 16 ------
.../aries/RevRegCreateRequestConverter.java | 16 ------
.../converter/aries/RevokeRequestConverter.java | 16 ------
.../aries/SchemaSendRequestConverter.java | 16 ------
.../aries/SchemasCreatedFilterConverter.java | 16 ------
.../V1CredentialFreeOfferRequestConverter.java | 16 ------
.../aries/V1CredentialIssueRequestConverter.java | 16 ------
.../aries/V1CredentialStoreRequestConverter.java | 16 ------
.../component/aries/AbstractCamelAriesTest.java | 16 ------
parent/pom.xml | 2 +-
29 files changed, 147 insertions(+), 363 deletions(-)
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index ee1f2c1e365..9518d44a9c8 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -422,7 +422,7 @@
<mybatis-version>3.5.10</mybatis-version>
<narayana-version>5.12.7.Final</narayana-version>
<neoscada-version>0.4.0</neoscada-version>
- <nessus-hyperledger-aries-version>0.1.0</nessus-hyperledger-aries-version>
+ <nessus-hyperledger-aries-version>0.1.1</nessus-hyperledger-aries-version>
<nessus-ipfs-version>1.0.0.Beta4</nessus-ipfs-version>
<nessus-weka-version>1.0.1</nessus-weka-version>
<netty-reactive-streams-version>2.0.5</netty-reactive-streams-version>
diff --git
a/components/camel-hyperledger-aries/src/generated/java/org/apache/camel/converter/aries/ConnectionRecordConverterLoader.java
b/components/camel-hyperledger-aries/src/generated/java/org/apache/camel/converter/aries/ConnectionRecordConverterLoader.java
new file mode 100644
index 00000000000..7b9ba2ff121
--- /dev/null
+++
b/components/camel-hyperledger-aries/src/generated/java/org/apache/camel/converter/aries/ConnectionRecordConverterLoader.java
@@ -0,0 +1,60 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.converter.aries;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.DeferredContextBinding;
+import org.apache.camel.Exchange;
+import org.apache.camel.TypeConversionException;
+import org.apache.camel.TypeConverterLoaderException;
+import org.apache.camel.spi.TypeConverterLoader;
+import org.apache.camel.spi.TypeConverterRegistry;
+import org.apache.camel.support.SimpleTypeConverter;
+import org.apache.camel.support.TypeConverterSupport;
+import org.apache.camel.util.DoubleMap;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+@DeferredContextBinding
+public final class ConnectionRecordConverterLoader implements
TypeConverterLoader, CamelContextAware {
+
+ private CamelContext camelContext;
+
+ public ConnectionRecordConverterLoader() {
+ }
+
+ @Override
+ public void setCamelContext(CamelContext camelContext) {
+ this.camelContext = camelContext;
+ }
+
+ @Override
+ public CamelContext getCamelContext() {
+ return camelContext;
+ }
+
+ @Override
+ public void load(TypeConverterRegistry registry) throws
TypeConverterLoaderException {
+ registerConverters(registry);
+ }
+
+ private void registerConverters(TypeConverterRegistry registry) {
+ addTypeConverter(registry, com.google.gson.JsonObject.class,
org.hyperledger.aries.api.connection.ConnectionRecord.class, false,
+ (type, exchange, value) ->
org.apache.camel.converter.aries.ConnectionRecordConverter.toJsonObject((org.hyperledger.aries.api.connection.ConnectionRecord)
value));
+ addTypeConverter(registry, java.util.Map.class,
org.hyperledger.aries.api.connection.ConnectionRecord.class, false,
+ (type, exchange, value) ->
org.apache.camel.converter.aries.ConnectionRecordConverter.toMap((org.hyperledger.aries.api.connection.ConnectionRecord)
value));
+ addTypeConverter(registry,
org.hyperledger.aries.api.connection.ConnectionRecord.class,
com.google.gson.JsonObject.class, false,
+ (type, exchange, value) ->
org.apache.camel.converter.aries.ConnectionRecordConverter.toAries((com.google.gson.JsonObject)
value));
+ addTypeConverter(registry,
org.hyperledger.aries.api.connection.ConnectionRecord.class,
java.lang.String.class, false,
+ (type, exchange, value) ->
org.apache.camel.converter.aries.ConnectionRecordConverter.toAries((java.lang.String)
value));
+ addTypeConverter(registry,
org.hyperledger.aries.api.connection.ConnectionRecord.class,
java.util.Map.class, false,
+ (type, exchange, value) ->
org.apache.camel.converter.aries.ConnectionRecordConverter.toAries((java.util.Map)
value));
+ }
+
+ private static void addTypeConverter(TypeConverterRegistry registry,
Class<?> toType, Class<?> fromType, boolean allowNull,
SimpleTypeConverter.ConversionMethod method) {
+ registry.addTypeConverter(toType, fromType, new
SimpleTypeConverter(allowNull, method));
+ }
+
+}
diff --git
a/components/camel-hyperledger-aries/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
b/components/camel-hyperledger-aries/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
index 325492724b7..ca2f6674b61 100644
---
a/components/camel-hyperledger-aries/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
+++
b/components/camel-hyperledger-aries/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
@@ -1,5 +1,6 @@
# Generated by camel build tools - do NOT edit this file!
org.apache.camel.converter.aries.ConnectionReceiveInvitationFilterConverterLoader
+org.apache.camel.converter.aries.ConnectionRecordConverterLoader
org.apache.camel.converter.aries.CreateInvitationRequestConverterLoader
org.apache.camel.converter.aries.CreateWalletRequestConverterLoader
org.apache.camel.converter.aries.CredentialDefinitionFilterConverterLoader
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesComponent.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesComponent.java
index c2dbb44bf59..969a463d3eb 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesComponent.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesComponent.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -111,10 +95,14 @@ public class HyperledgerAriesComponent extends
DefaultComponent {
}
public NessusWallet getWallet(String walletName) {
- int retries = 10;
+ return walletRegistry.getWalletByName(walletName);
+ }
+
+ public NessusWallet getWallet(String walletName, long timeout) {
+ timeout = System.currentTimeMillis() + timeout;
NessusWallet walletRecord = walletRegistry.getWalletByName(walletName);
- while (walletRecord == null && 0 < retries--) {
- NessusWallet.sleepWell(500);
+ while (walletRecord == null && System.currentTimeMillis() < timeout) {
+ NessusWallet.sleepWell(200);
walletRecord = walletRegistry.getWalletByName(walletName);
}
return walletRecord;
@@ -131,9 +119,9 @@ public class HyperledgerAriesComponent extends
DefaultComponent {
return wallet.getWebSocketClient();
}
- public AriesClient baseClient() {
+ public AriesClient createAdminClient() {
AgentConfiguration agentConfig = getAgentConfiguration();
- return AriesClientFactory.baseClient(agentConfig);
+ return AriesClientFactory.adminClient(agentConfig);
}
public AriesClient createClient(WalletRecord walletRecord) throws
IOException {
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesConfiguration.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesConfiguration.java
index 92b7605f12a..c0e3d76466f 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesConfiguration.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesConfiguration.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesEndpoint.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesEndpoint.java
index 2d315609a59..06397ac0c94 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesEndpoint.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesEndpoint.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -34,7 +18,6 @@ package org.apache.camel.component.aries;
import java.io.IOException;
-import io.nessus.aries.util.AssertState;
import io.nessus.aries.wallet.NessusWallet;
import org.apache.camel.Category;
import org.apache.camel.Consumer;
@@ -88,7 +71,10 @@ public class HyperledgerAriesEndpoint extends
DefaultEndpoint {
public AriesClient createClient() throws IOException {
String walletName = getWalletName();
NessusWallet walletRecord = getComponent().getWallet(walletName);
- AssertState.notNull(walletRecord, "No WalletRecord for: " +
walletName);
- return getComponent().createClient(walletRecord);
+ if ("admin".equals(walletName) && walletRecord == null) {
+ return getComponent().createAdminClient();
+ } else {
+ return getComponent().createClient(walletRecord);
+ }
}
}
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesProducer.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesProducer.java
index 7d69affab7d..f816ebdb514 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesProducer.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/HyperledgerAriesProducer.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/AbstractServiceHandler.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/AbstractServiceHandler.java
index c2bd5d387d3..58c231c2a88 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/AbstractServiceHandler.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/AbstractServiceHandler.java
@@ -113,7 +113,7 @@ public abstract class AbstractServiceHandler implements
ServiceHandler {
}
public AriesClient baseClient() {
- return getComponent().baseClient();
+ return getComponent().createAdminClient();
}
public AriesClient createClient() throws IOException {
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/ConnectionsServiceHandler.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/ConnectionsServiceHandler.java
index 91141385872..9a440d2db2e 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/ConnectionsServiceHandler.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/component/aries/handler/ConnectionsServiceHandler.java
@@ -20,6 +20,7 @@ import org.apache.camel.Exchange;
import org.apache.camel.component.aries.HyperledgerAriesEndpoint;
import org.apache.camel.component.aries.UnsupportedServiceException;
import org.hyperledger.acy_py.generated.model.ConnectionInvitation;
+import org.hyperledger.aries.api.connection.ConnectionAcceptInvitationFilter;
import org.hyperledger.aries.api.connection.ConnectionReceiveInvitationFilter;
import org.hyperledger.aries.api.connection.ConnectionRecord;
import org.hyperledger.aries.api.connection.CreateInvitationRequest;
@@ -34,6 +35,7 @@ public class ConnectionsServiceHandler extends
AbstractServiceHandler {
@Override
public void process(Exchange exchange, String service) throws Exception {
+
if (service.equals("/connections/create-invitation")) {
CreateInvitationRequest reqObj = maybeBody(exchange,
CreateInvitationRequest.class);
if (reqObj == null) {
@@ -41,6 +43,7 @@ public class ConnectionsServiceHandler extends
AbstractServiceHandler {
}
CreateInvitationResponse resObj =
createClient().connectionsCreateInvitation(reqObj).get();
exchange.getIn().setBody(resObj);
+
} else if (service.equals("/connections/receive-invitation")) {
ReceiveInvitationRequest reqObj = maybeBody(exchange,
ReceiveInvitationRequest.class);
if (reqObj == null) {
@@ -53,6 +56,18 @@ public class ConnectionsServiceHandler extends
AbstractServiceHandler {
ConnectionReceiveInvitationFilter filter = maybeHeader(exchange,
ConnectionReceiveInvitationFilter.class);
ConnectionRecord resObj =
createClient().connectionsReceiveInvitation(reqObj, filter).get();
exchange.getIn().setBody(resObj);
+
+ } else if (service.equals("/connections/accept-invitation")) {
+ String connectionId = assertBody(exchange, String.class);
+ ConnectionAcceptInvitationFilter acceptFilter =
maybeHeader(exchange, ConnectionAcceptInvitationFilter.class);
+ ConnectionRecord resObj =
createClient().connectionsAcceptInvitation(connectionId, acceptFilter).get();
+ exchange.getIn().setBody(resObj);
+
+ } else if (service.equals("/connections/get-single")) {
+ String connectionId = assertBody(exchange, String.class);
+ ConnectionRecord resObj =
createClient().connectionsGetById(connectionId).get();
+ exchange.getIn().setBody(resObj);
+
} else {
throw new UnsupportedServiceException(service);
}
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/AbstractAriesConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/AbstractAriesConverter.java
index 0e0cabd4f62..fcf4c2d11ae 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/AbstractAriesConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/AbstractAriesConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionReceiveInvitationFilterConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionReceiveInvitationFilterConverter.java
index 739fdc351fe..2bfb55fd78e 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionReceiveInvitationFilterConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionReceiveInvitationFilterConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionRecordConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionRecordConverter.java
new file mode 100644
index 00000000000..9b4461e4e17
--- /dev/null
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ConnectionRecordConverter.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.apache.camel.converter.aries;
+
+import java.util.Map;
+
+import com.google.gson.JsonObject;
+import org.apache.camel.Converter;
+import org.hyperledger.aries.api.connection.ConnectionRecord;
+
+@Converter(generateLoader = true)
+public final class ConnectionRecordConverter extends AbstractAriesConverter {
+
+ @Converter
+ public static ConnectionRecord toAries(JsonObject jsonObj) {
+ return toAries(jsonObj, ConnectionRecord.class);
+ }
+
+ @Converter
+ public static ConnectionRecord toAries(String json) {
+ return toAries(json, ConnectionRecord.class);
+ }
+
+ @Converter
+ public static ConnectionRecord toAries(Map<String, Object> map) {
+ return toAries(map, ConnectionRecord.class);
+ }
+
+ @Converter
+ public static JsonObject toJsonObject(ConnectionRecord item) {
+ return (JsonObject) GSON.toJsonTree(item, ConnectionRecord.class);
+ }
+
+ @Converter
+ @SuppressWarnings("unchecked")
+ public static Map<String, Object> toMap(ConnectionRecord item) {
+ JsonObject json = toJsonObject(item);
+ return GSON.fromJson(json, Map.class);
+ }
+}
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateInvitationRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateInvitationRequestConverter.java
index 7b64fc4f84b..25af5c4baf8 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateInvitationRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateInvitationRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateWalletRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateWalletRequestConverter.java
index 5810741e85f..f5f3b53d9df 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateWalletRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CreateWalletRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionFilterConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionFilterConverter.java
index 93450560414..feb2a13d009 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionFilterConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionFilterConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionRequestConverter.java
index ec31b97ab2f..39a90a076c1 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/CredentialDefinitionRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/IssueCredentialRecordsFilterConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/IssueCredentialRecordsFilterConverter.java
index b7d8142a381..e3a60d8b4bd 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/IssueCredentialRecordsFilterConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/IssueCredentialRecordsFilterConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentProofRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentProofRequestConverter.java
index 6458a60650e..1bc9ec5e517 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentProofRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentProofRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentationRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentationRequestConverter.java
index 846d405eb5f..c47c453ccf8 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentationRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/PresentationRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ReceiveInvitationRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ReceiveInvitationRequestConverter.java
index ac7b91f993c..857dfd9055b 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ReceiveInvitationRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/ReceiveInvitationRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevRegCreateRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevRegCreateRequestConverter.java
index 58310813781..a1a8e243b9a 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevRegCreateRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevRegCreateRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevokeRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevokeRequestConverter.java
index 145af4afc11..74a47622373 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevokeRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/RevokeRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemaSendRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemaSendRequestConverter.java
index 24314199cc4..a8227d257e6 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemaSendRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemaSendRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemasCreatedFilterConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemasCreatedFilterConverter.java
index 603970f366c..1058155f130 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemasCreatedFilterConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/SchemasCreatedFilterConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialFreeOfferRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialFreeOfferRequestConverter.java
index 929a1ccbadd..fde4ad021f8 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialFreeOfferRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialFreeOfferRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialIssueRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialIssueRequestConverter.java
index f87b619a91b..1d74e409ff4 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialIssueRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialIssueRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialStoreRequestConverter.java
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialStoreRequestConverter.java
index 60ca89fa3d5..bc8b05bad2b 100644
---
a/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialStoreRequestConverter.java
+++
b/components/camel-hyperledger-aries/src/main/java/org/apache/camel/converter/aries/V1CredentialStoreRequestConverter.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git
a/components/camel-hyperledger-aries/src/test/java/org/apache/camel/component/aries/AbstractCamelAriesTest.java
b/components/camel-hyperledger-aries/src/test/java/org/apache/camel/component/aries/AbstractCamelAriesTest.java
index 3ce7b4094fd..7aa029d618e 100644
---
a/components/camel-hyperledger-aries/src/test/java/org/apache/camel/component/aries/AbstractCamelAriesTest.java
+++
b/components/camel-hyperledger-aries/src/test/java/org/apache/camel/component/aries/AbstractCamelAriesTest.java
@@ -1,19 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git a/parent/pom.xml b/parent/pom.xml
index 2d08b8c292b..2c3f7b277f6 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -408,7 +408,7 @@
<mvel-version>2.4.14.Final</mvel-version>
<mybatis-version>3.5.10</mybatis-version>
<narayana-version>5.12.7.Final</narayana-version>
-
<nessus-hyperledger-aries-version>0.1.0</nessus-hyperledger-aries-version>
+
<nessus-hyperledger-aries-version>0.1.1</nessus-hyperledger-aries-version>
<nessus-ipfs-version>1.0.0.Beta4</nessus-ipfs-version>
<nessus-weka-version>1.0.1</nessus-weka-version>
<neoscada-version>0.4.0</neoscada-version>