diff --git a/README.md b/README.md
index 93a7932..d1c29e1 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,7 @@
Client tools for building Quarkus java DIDcomm Verifiable Credential powered conversational service (Chatbots) with [2060.io Service Agent](https://github.com/2060-io/2060-service-agent/blob/main/doc/service-agent-api.md)
## How to use
-On dev mode use the command `mvn clean verify install -Dgpg.skip` to run the project
-
-## Before PR
-Please run `mvn clean spotless:check` command before uploading changes to verify the syntax
+On dev mode use the command `mvn clean install -Dgpg.skip` to run the project
## Releases
diff --git a/pom.xml b/pom.xml
index 1df50de..4d64d02 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,60 +124,6 @@
-
- net.revelc.code.formatter
- formatter-maven-plugin
- 2.19.0
-
- eclipse-formatter.xml
- LF
-
-
-
-
- format
-
-
-
-
-
- net.revelc.code
- impsort-maven-plugin
- 1.8.0
-
- java.,javax.,org.,com.
- java,*
- true
-
-
-
- sort-imports
-
- sort
-
-
-
-
-
- com.diffplug.spotless
- spotless-maven-plugin
- 2.43.0
-
-
-
- ${basedir}/eclipse-formatter.xml
-
-
-
-
-
diff --git a/src/main/java/io/twentysixty/sa/client/enums/Mrz.java b/src/main/java/io/twentysixty/sa/client/enums/Mrz.java
index c4315b5..85abaf3 100644
--- a/src/main/java/io/twentysixty/sa/client/enums/Mrz.java
+++ b/src/main/java/io/twentysixty/sa/client/enums/Mrz.java
@@ -15,69 +15,69 @@
@Setter
@ToString
public class Mrz {
- public enum Format {
- @JsonProperty("TD1")
- TD1,
- @JsonProperty("TD2")
- TD2,
- @JsonProperty("TD3")
- TD3,
- @JsonProperty("FRENCH_NATIONAL_ID")
- FRENCH_NATIONAL_ID,
- @JsonProperty("FRENCH_DRIVING_LICENSE")
- FRENCH_DRIVING_LICENSE,
- @JsonProperty("SWISS_DRIVING_LICENSE")
- SWISS_DRIVING_LICENSE;
- }
+ public enum Format {
+ @JsonProperty("TD1")
+ TD1,
+ @JsonProperty("TD2")
+ TD2,
+ @JsonProperty("TD3")
+ TD3,
+ @JsonProperty("FRENCH_NATIONAL_ID")
+ FRENCH_NATIONAL_ID,
+ @JsonProperty("FRENCH_DRIVING_LICENSE")
+ FRENCH_DRIVING_LICENSE,
+ @JsonProperty("SWISS_DRIVING_LICENSE")
+ SWISS_DRIVING_LICENSE;
+ }
- public enum FieldName {
- @JsonProperty("administrativeCode")
- ADMINISTRATIVE_CODE,
- @JsonProperty("administrativeCode2")
- ADMINISTRATIVE_CODE2,
- @JsonProperty("birthDate")
- BIRTH_DATE,
- @JsonProperty("birthDateCheckDigit")
- BIRTH_DATE_CHECK_DIGIT,
- @JsonProperty("compositeCheckDigit")
- COMPOSITE_CHECK_DIGIT,
- @JsonProperty("documentNumber")
- DOCUMENT_NUMBER,
- @JsonProperty("documentNumberCheckDigit")
- DOCUMENT_NUMBER_CHECK_DIGIT,
- @JsonProperty("documentCode")
- DOCUMENT_CODE,
- @JsonProperty("expirationDate")
- EXPIRATION_DATE,
- @JsonProperty("expirationDateCheckDigit")
- EXPIRATION_DATE_CHECK_DIGIT,
- @JsonProperty("firstName")
- FIRST_NAME,
- @JsonProperty("issueDate")
- ISSUE_DATE,
- @JsonProperty("issuingState")
- ISSUING_STATE,
- @JsonProperty("languageCode")
- LANGUAGE_CODE,
- @JsonProperty("lastName")
- LAST_NAME,
- @JsonProperty("nationality")
- NATIONALITY,
- @JsonProperty("optional")
- OPTIONAL,
- @JsonProperty("optional1")
- OPTIONAL1,
- @JsonProperty("optional2")
- OPTIONAL2,
- @JsonProperty("personalNumber")
- PERSONAL_NUMBER,
- @JsonProperty("personalNumberCheckDigit")
- PERSONAL_NUMBER_CHECK_DIGIT,
- @JsonProperty("pinCode")
- PIN_CODE,
- @JsonProperty("sex")
- SEX,
- @JsonProperty("versionNumber")
- VERSION_NUMBER;
- }
+ public enum FieldName {
+ @JsonProperty("administrativeCode")
+ ADMINISTRATIVE_CODE,
+ @JsonProperty("administrativeCode2")
+ ADMINISTRATIVE_CODE2,
+ @JsonProperty("birthDate")
+ BIRTH_DATE,
+ @JsonProperty("birthDateCheckDigit")
+ BIRTH_DATE_CHECK_DIGIT,
+ @JsonProperty("compositeCheckDigit")
+ COMPOSITE_CHECK_DIGIT,
+ @JsonProperty("documentNumber")
+ DOCUMENT_NUMBER,
+ @JsonProperty("documentNumberCheckDigit")
+ DOCUMENT_NUMBER_CHECK_DIGIT,
+ @JsonProperty("documentCode")
+ DOCUMENT_CODE,
+ @JsonProperty("expirationDate")
+ EXPIRATION_DATE,
+ @JsonProperty("expirationDateCheckDigit")
+ EXPIRATION_DATE_CHECK_DIGIT,
+ @JsonProperty("firstName")
+ FIRST_NAME,
+ @JsonProperty("issueDate")
+ ISSUE_DATE,
+ @JsonProperty("issuingState")
+ ISSUING_STATE,
+ @JsonProperty("languageCode")
+ LANGUAGE_CODE,
+ @JsonProperty("lastName")
+ LAST_NAME,
+ @JsonProperty("nationality")
+ NATIONALITY,
+ @JsonProperty("optional")
+ OPTIONAL,
+ @JsonProperty("optional1")
+ OPTIONAL1,
+ @JsonProperty("optional2")
+ OPTIONAL2,
+ @JsonProperty("personalNumber")
+ PERSONAL_NUMBER,
+ @JsonProperty("personalNumberCheckDigit")
+ PERSONAL_NUMBER_CHECK_DIGIT,
+ @JsonProperty("pinCode")
+ PIN_CODE,
+ @JsonProperty("sex")
+ SEX,
+ @JsonProperty("versionNumber")
+ VERSION_NUMBER;
+ }
}
diff --git a/src/main/java/io/twentysixty/sa/client/jms/AbstractConsumer.java b/src/main/java/io/twentysixty/sa/client/jms/AbstractConsumer.java
index a4a4cd3..bef9940 100644
--- a/src/main/java/io/twentysixty/sa/client/jms/AbstractConsumer.java
+++ b/src/main/java/io/twentysixty/sa/client/jms/AbstractConsumer.java
@@ -1,17 +1,13 @@
package io.twentysixty.sa.client.jms;
+
import java.util.HashMap;
import java.util.Map;
+import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import org.jboss.logging.Logger;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-
-import io.smallrye.mutiny.Uni;
-import io.twentysixty.sa.client.util.JsonUtil;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.JMSConsumer;
import jakarta.jms.JMSContext;
@@ -20,27 +16,42 @@
import jakarta.jms.Queue;
import jakarta.jms.Session;
-public class AbstractConsumer implements ConsumerInterface {
+import org.jboss.logging.Logger;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+import io.smallrye.mutiny.Uni;
+import io.twentysixty.sa.client.model.message.BaseMessage;
+import io.twentysixty.sa.client.util.JsonUtil;
+
+
+public class AbstractConsumer implements ConsumerInterface {
private ConnectionFactory connectionFactory;
+
private Long exDelay;
private String queueName;
private Integer threads;
private Boolean debug;
+
+
private static final Logger logger = Logger.getLogger(AbstractConsumer.class);
- private Map lockObjs = new HashMap();
- private Map runnings = new HashMap();
- private Map starteds = new HashMap();
- private Map contexts = new HashMap();
+ private Map lockObjs = new HashMap();
+ private Map runnings = new HashMap();
+ private Map starteds = new HashMap();
+ private Map contexts = new HashMap();
+
private static ExecutorService executor = Executors.newCachedThreadPool();
+
protected void _onStart() {
- for (int i = 0; i < threads; i++) {
+
+ for (int i=0; i consumer(UUID uuid) {
runnings.put(uuid, true);
}
+
long now = System.currentTimeMillis();
- /*
- * synchronized (lockObj) { try { lockObj.wait(10000l); } catch (InterruptedException e) {
- *
- * } }
+ /*synchronized (lockObj) {
+ try {
+ lockObj.wait(10000l);
+ } catch (InterruptedException e) {
+
+ }
+ }
*/
while (true) {
Boolean started = null;
- synchronized (starteds) {
+ synchronized(starteds) {
started = starteds.get(uuid);
}
@@ -184,13 +211,13 @@ public Uni consumer(UUID uuid) {
break;
}
- if (debug)
- logger.info("consumer: running " + uuid);
- try {
+ if (debug) logger.info("consumer: running " + uuid);
+
+ try {
+
+ if (debug) logger.info("consumer " + queueName + ": create session " + uuid );
- if (debug)
- logger.info("consumer " + queueName + ": create session " + uuid);
if (context == null) {
context = getConnectionFactory().createContext(Session.SESSION_TRANSACTED);
@@ -200,14 +227,13 @@ public Uni consumer(UUID uuid) {
}
- if (debug)
- logger.info("consumer " + queueName + ": session created " + uuid);
+
+ if (debug) logger.info("consumer " + queueName + ": session created " + uuid );
if (queue == null) {
queue = context.createQueue(queueName);
}
- if (debug)
- logger.info("consumer " + queueName + ": create consumer " + uuid);
+ if (debug) logger.info("consumer " + queueName + ": create consumer " + uuid );
JMSConsumer consumer = null;
String messageSelector = getMessageSelector();
@@ -217,39 +243,42 @@ public Uni consumer(UUID uuid) {
consumer = context.createConsumer(queue);
}
- if (debug)
- logger.info("consumer " + queueName + ": waiting for message... " + uuid);
+
+
+ if (debug) logger.info("consumer " + queueName + ": waiting for message... " + uuid);
+
while (true) {
started = null;
- synchronized (starteds) {
+ synchronized(starteds) {
started = starteds.get(uuid);
-
+
}
if ((started == null) || (!started)) {
break;
}
+
now = System.currentTimeMillis();
- if (debug)
- logger.info(
- "consumer: waiting for message... " + uuid + " " + (System.currentTimeMillis() - now));
+ if (debug)
+ logger.info("consumer: waiting for message... " + uuid + " " + (System.currentTimeMillis() - now));
Message message = consumer.receive();
if (message != null) {
- if (debug)
- logger.info(
- "consumer: received message " + uuid + " " + (System.currentTimeMillis() - now));
+ if (debug)
+ logger.info("consumer: received message " + uuid + " " + (System.currentTimeMillis() - now));
+
- // BaseMessage baseMessage = null;
+
+ //BaseMessage baseMessage = null;
if (message instanceof ObjectMessage) {
ObjectMessage objMsg = (ObjectMessage) message;
- // baseMessage = (BaseMessage) objMsg.getObject();
+ //baseMessage = (BaseMessage) objMsg.getObject();
if (debug) {
try {
@@ -261,58 +290,53 @@ public Uni consumer(UUID uuid) {
try {
M baseMessage = (M) objMsg.getObject();
this.receiveMessage(baseMessage);
- // messageResource.sendMessage(baseMessage);
+ //messageResource.sendMessage(baseMessage);
+
context.commit();
- if (debug)
- logger.info("consumer: " + queueName + " after commit " + uuid + " "
- + (System.currentTimeMillis() - now));
+ if (debug)
+ logger.info("consumer: " + queueName + " after commit "+ uuid + " " + (System.currentTimeMillis() - now));
+
} catch (Exception e) {
try {
- logger.warn("consumer: " + queueName + " " + uuid + " "
- + (System.currentTimeMillis() - now) + ": exception "
- + JsonUtil.serialize(objMsg, false), e);
+ logger.warn("consumer: " + queueName + " "+ uuid + " " + (System.currentTimeMillis() - now)+ ": exception " + JsonUtil.serialize(objMsg, false), e);
} catch (JsonProcessingException e1) {
- logger.warn("consumer: " + queueName + " " + uuid + " "
- + (System.currentTimeMillis() - now) + ": exception", e);
+ logger.warn("consumer: " + queueName + " "+ uuid + " " + (System.currentTimeMillis() - now)+ ": exception", e);
}
context.rollback();
- // if (debug)
- logger.info("consumer: " + queueName + " after rollback " + uuid + " "
- + (System.currentTimeMillis() - now));
+ //if (debug)
+ logger.info("consumer: " + queueName + " after rollback "+ uuid + " " + (System.currentTimeMillis() - now));
- }
+ }
} else {
- if (debug)
- logger.info("consumer " + queueName + " " + uuid + " "
- + (System.currentTimeMillis() - now) + ": unkown event " + message);
+ if (debug) logger.info("consumer " + queueName + " "+ uuid + " " + (System.currentTimeMillis() - now)+ ": unkown event " + message);
context.commit();
}
- } else {
- if (debug)
- logger.info("consumer: no delivered message " + uuid + " "
- + (System.currentTimeMillis() - now));
+
+ } else {
+ if (debug)
+ logger.info("consumer: no delivered message " + uuid + " " + (System.currentTimeMillis() - now));
synchronized (lockObj) {
try {
- if (debug)
- logger.info("consumer: waiting thread " + uuid + " "
- + (System.currentTimeMillis() - now));
+ if (debug) logger.info("consumer: waiting thread " + uuid + " " + (System.currentTimeMillis() - now));
lockObj.wait(1000);
} catch (InterruptedException e1) {
}
}
}
+
+
}
consumer.close();
context.close();
consumer = null;
context = null;
} catch (Exception e) {
-
+
logger.error("", e);
try {
@@ -323,6 +347,8 @@ public Uni consumer(UUID uuid) {
context = null;
queue = null;
+
+
synchronized (lockObj) {
try {
lockObj.wait(exDelay);
@@ -371,10 +397,12 @@ public ConnectionFactory getConnectionFactory() {
public void setConnectionFactory(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
}
-
@Override
public String getMessageSelector() {
return null;
}
-}
+
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/io/twentysixty/sa/client/jms/AbstractProducer.java b/src/main/java/io/twentysixty/sa/client/jms/AbstractProducer.java
index 81e0050..a560813 100644
--- a/src/main/java/io/twentysixty/sa/client/jms/AbstractProducer.java
+++ b/src/main/java/io/twentysixty/sa/client/jms/AbstractProducer.java
@@ -3,13 +3,8 @@
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
+import java.util.UUID;
-import org.graalvm.collections.Pair;
-import org.jboss.logging.Logger;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-
-import io.twentysixty.sa.client.util.JsonUtil;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.JMSContext;
import jakarta.jms.JMSProducer;
@@ -17,51 +12,61 @@
import jakarta.jms.Queue;
import jakarta.jms.Session;
-public abstract class AbstractProducer implements ProducerInterface {
+import org.graalvm.collections.Pair;
+import org.jboss.logging.Logger;
- private Integer producerId = 0;
- private Integer producerCount = 8;
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+import io.twentysixty.sa.client.model.message.BaseMessage;
+import io.twentysixty.sa.client.util.JsonUtil;
- private Map producers = new HashMap();
- private Map contexts = new HashMap();
+public abstract class AbstractProducer implements ProducerInterface {
+
+ private Integer producerId = 0;
+ private Integer producerCount = 8;
+
+ private Map producers = new HashMap();
+ private Map contexts = new HashMap();
+
private static final Logger logger = Logger.getLogger(AbstractProducer.class);
private Object contextLockObj = new Object();
-
+
+
private Map queues = new HashMap();
-
+
private ConnectionFactory connectionFactory;
-
+
private Long exDelay;
private String queueName;
private Integer threads;
private Boolean debug;
-
+
int id = 0;
-
- protected Pair> getProducer(ConnectionFactory connectionFactory,
- boolean debug) {
- JMSProducer producer = null;
- JMSContext context = null;
- int id = 0;
-
- synchronized (contextLockObj) {
+
+
+ protected Pair> getProducer(ConnectionFactory connectionFactory, boolean debug) {
+ JMSProducer producer = null;
+ JMSContext context = null;
+ int id = 0;
+
+ synchronized (contextLockObj) {
if (debug) {
- logger.info("spool: with use contexts/producer #" + producerId);
- }
+ logger.info("spool: with use contexts/producer #" + producerId);
+ }
context = contexts.get(producerId);
if (context == null) {
context = connectionFactory.createContext(Session.CLIENT_ACKNOWLEDGE);
contexts.put(producerId, context);
-
+
}
-
+
producer = producers.get(producerId);
if (producer == null) {
producer = context.createProducer();
producers.put(producerId, producer);
-
+
}
id = producerId;
producerId++;
@@ -69,107 +74,109 @@ protected Pair> getProducer(ConnectionFac
producerId = 0;
}
}
- return Pair.create(id, Pair.create(context, producer));
- }
-
- protected void purgeAllProducers() {
-
- synchronized (contextLockObj) {
-
- for (int id = 0; id < contexts.size(); id++) {
- JMSContext context = contexts.get(id);
- if (context != null) {
- try {
- context.close();
- logger.info("purgeAllProducers: closed producer #" + id);
- } catch (Exception e1) {
- logger.error("purgeProducer: error closing producer #" + id, e1);
- }
- }
- contexts.remove(id);
- producers.remove(id);
- }
-
- logger.info("purgeAllProducers: remaining contexts size: " + contexts.size() + " producer size: "
- + producers.size());
-
- contexts.clear();
- producers.clear();
-
- logger.info("purgeAllProducers: cleared contexts size: " + contexts.size() + " producer size: "
- + producers.size());
-
- }
- }
+ return Pair.create(id, Pair.create(context, producer));
+ }
+
+ protected void purgeAllProducers() {
+
+ synchronized (contextLockObj) {
+
+ for (int id=0; id> jms = getProducer(connectionFactory, debug);
-
- producer = jms.getRight().getRight();
- context = jms.getRight().getLeft();
- id = jms.getLeft();
-
- // if (sms.getEndpoint() != null) {
-
- // logger.info("context.createObjectMessage(sms) ");
- ObjectMessage message = context.createObjectMessage(sms);
- // logger.info("context.createObjectMessage(sms) 2 ");
-
- synchronized (producer) {
- queue = this.getQueue(context, queueName);
-
- producer.send(queue, message);
- message.acknowledge();
-
- }
-
- if (debug) {
- try {
- logger.info(
- "spool: Object spooled to " + queue.getQueueName() + " " + JsonUtil.serialize(sms, false));
- } catch (JsonProcessingException e) {
- logger.info("spool: Object spooled to " + queue.getQueueName() + " ", e);
-
- }
- }
-
- } catch (Exception e) {
-
- this.purgeAllProducers();
- logger.error("error", e);
- attempt++;
- if (attempt < threads) {
- logger.info("spool: will retry attempt #" + attempt);
- retry = true;
- } else {
- throw (e);
- }
- }
-
- if (retry)
- this.spool(sms, attempt);
-
- }
-
- private Queue getQueue(JMSContext context, String conn) {
+
+ JMSProducer producer = null;
+ JMSContext context = null;
+ Queue queue = null;
+ boolean retry = false;
+ try {
+
+
+
+ Pair> jms = getProducer(connectionFactory, debug);
+
+ producer = jms.getRight().getRight();
+ context = jms.getRight().getLeft();
+ id = jms.getLeft();
+
+
+ //if (sms.getEndpoint() != null) {
+
+ //logger.info("context.createObjectMessage(sms) ");
+ ObjectMessage message = context.createObjectMessage(sms);
+ //logger.info("context.createObjectMessage(sms) 2 ");
+
+ synchronized (producer) {
+ queue = this.getQueue(context, queueName);
+
+ producer.send(queue, message);
+ message.acknowledge();
+
+ }
+
+ if (debug) {
+ try {
+ logger.info("spool: Object spooled to " + queue.getQueueName() + " " + JsonUtil.serialize(sms, false));
+ } catch (JsonProcessingException e) {
+ logger.info("spool: Object spooled to " + queue.getQueueName() + " ", e);
+
+ }
+ }
+
+
+
+
+ } catch (Exception e) {
+
+ this.purgeAllProducers();
+ logger.error("error", e);
+ attempt++;
+ if (attempt {
public void setExDelay(Long exDelay);
-
public void setQueueName(String queueName);
-
public void setThreads(Integer threads);
-
public void setDebug(boolean debug);
-
public String getMessageSelector();
-
+
public void receiveMessage(M message) throws Exception;
-
+
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/jms/ProducerInterface.java b/src/main/java/io/twentysixty/sa/client/jms/ProducerInterface.java
index 6b1a0f5..1e21a68 100644
--- a/src/main/java/io/twentysixty/sa/client/jms/ProducerInterface.java
+++ b/src/main/java/io/twentysixty/sa/client/jms/ProducerInterface.java
@@ -4,14 +4,14 @@
public interface ProducerInterface {
+
public void setExDelay(Long exDelay);
-
public void setQueueName(String queueName);
-
public void setThreads(Integer threads);
-
public void setDebug(Boolean debug);
-
+
public void sendMessage(M message) throws Exception;
-
+
+
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/credential/CredentialType.java b/src/main/java/io/twentysixty/sa/client/model/credential/CredentialType.java
index 3a20d5d..37f51fa 100644
--- a/src/main/java/io/twentysixty/sa/client/model/credential/CredentialType.java
+++ b/src/main/java/io/twentysixty/sa/client/model/credential/CredentialType.java
@@ -9,51 +9,44 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class CredentialType {
-
+
private String name;
private String version;
private List attributes;
private String schemaId;
private String id;
-
public String getName() {
return name;
}
-
public void setName(String name) {
this.name = name;
}
-
public String getVersion() {
return version;
}
-
public void setVersion(String version) {
this.version = version;
}
-
public List getAttributes() {
return attributes;
}
-
public void setAttributes(List attributes) {
this.attributes = attributes;
}
-
public String getSchemaId() {
return schemaId;
}
-
public void setSchemaId(String schemaId) {
this.schemaId = schemaId;
}
-
public String getId() {
return id;
}
-
public void setId(String id) {
this.id = id;
}
+
+
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/ConnectionStateUpdated.java b/src/main/java/io/twentysixty/sa/client/model/event/ConnectionStateUpdated.java
index 4fe15e4..a1b205e 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/ConnectionStateUpdated.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/ConnectionStateUpdated.java
@@ -9,8 +9,8 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ConnectionStateUpdated extends Event implements Serializable {
-
+public class ConnectionStateUpdated extends Event implements Serializable {
+
private static final long serialVersionUID = -2518124661250013725L;
private UUID connectionId;
private DidExchangeState state;
@@ -19,23 +19,18 @@ public class ConnectionStateUpdated extends Event implements Serializable {
public UUID getInvitationId() {
return invitationId;
}
-
public void setInvitationId(UUID invitationId) {
this.invitationId = invitationId;
}
-
public UUID getConnectionId() {
return connectionId;
}
-
public void setConnectionId(UUID connectionId) {
this.connectionId = connectionId;
}
-
public DidExchangeState getState() {
return state;
}
-
public void setState(DidExchangeState state) {
this.state = state;
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/CredentialReceptionState.java b/src/main/java/io/twentysixty/sa/client/model/event/CredentialReceptionState.java
index 457f072..d9a57e5 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/CredentialReceptionState.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/CredentialReceptionState.java
@@ -1,47 +1,47 @@
package io.twentysixty.sa.client.model.event;
+
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonValue;
-public enum CredentialReceptionState implements Serializable {
+public enum CredentialReceptionState implements Serializable {
/*
- * Done = "done", Declined = "declined", Abandoned = "abandoned",
- */
-
+ Done = "done",
+ Declined = "declined",
+ Abandoned = "abandoned",
+ */
+
+
DONE("done"),
- DECLINED("declined"),
- ABANDONED("abandoned");
-
- private CredentialReceptionState(String index) {
+ DECLINED("declined"),
+ ABANDONED("abandoned");
+
+ private CredentialReceptionState(String index){
this.index = index;
}
private String index;
- public String getIndex() {
+ public String getIndex(){
return this.index;
}
- public static CredentialReceptionState getEnum(String index) {
+ public static CredentialReceptionState getEnum(String index){
if (index == null)
- return null;
-
- if (index.equals("done"))
- return DONE;
- else if (index.equals("declined"))
- return DECLINED;
- else if (index.equals("abandoned"))
- return ABANDONED;
- else
- return null;
+ return null;
+ if (index.equals("done")) return DONE;
+ else if (index.equals("declined")) return DECLINED;
+ else if (index.equals("abandoned")) return ABANDONED;
+ else return null;
+
}
-
- @JsonValue
+
+ @JsonValue
public String getValue() {
return index;
}
-
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/DidExchangeState.java b/src/main/java/io/twentysixty/sa/client/model/event/DidExchangeState.java
index 43b5366..e9057fe 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/DidExchangeState.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/DidExchangeState.java
@@ -1,17 +1,27 @@
package io.twentysixty.sa.client.model.event;
+
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonValue;
-public enum DidExchangeState implements Serializable {
+public enum DidExchangeState implements Serializable {
/*
- * export enum DidExchangeState { Start = 'start', InvitationSent = 'invitation-sent', InvitationReceived =
- * 'invitation-received', RequestSent = 'request-sent', RequestReceived = 'request-received', ResponseSent =
- * 'response-sent', ResponseReceived = 'response-received', Abandoned = 'abandoned', Completed = 'completed', }
- */
-
+ export enum DidExchangeState {
+ Start = 'start',
+ InvitationSent = 'invitation-sent',
+ InvitationReceived = 'invitation-received',
+ RequestSent = 'request-sent',
+ RequestReceived = 'request-received',
+ ResponseSent = 'response-sent',
+ ResponseReceived = 'response-received',
+ Abandoned = 'abandoned',
+ Completed = 'completed',
+ }
+ */
+
+
START("start"),
INVITATION_SENT("invitation-sent"),
INVITATION_RECEIVED("invitation-received"),
@@ -22,51 +32,40 @@ public enum DidExchangeState implements Serializable {
ABANDONED("abandoned"),
COMPLETED("completed"),
TERMINATED("terminated"),
-
+
;
-
- private DidExchangeState(String index) {
+
+ private DidExchangeState(String index){
this.index = index;
}
private String index;
- public String getIndex() {
+ public String getIndex(){
return this.index;
}
- public static DidExchangeState getEnum(String index) {
+ public static DidExchangeState getEnum(String index){
if (index == null)
- return null;
-
- if (index.equals("start"))
- return START;
- else if (index.equals("invitation-sent"))
- return INVITATION_SENT;
- else if (index.equals("invitation-received"))
- return INVITATION_RECEIVED;
- else if (index.equals("request-sent"))
- return REQUEST_SENT;
- else if (index.equals("request-received"))
- return REQUEST_RECEIVED;
- else if (index.equals("response-sent"))
- return RESPONSE_SENT;
- else if (index.equals("response-received"))
- return RESPONSE_RECEIVED;
- else if (index.equals("abandoned"))
- return ABANDONED;
- else if (index.equals("completed"))
- return COMPLETED;
- else if (index.equals("terminated"))
- return TERMINATED;
- else
- return null;
+ return null;
+ if (index.equals("start")) return START;
+ else if (index.equals("invitation-sent")) return INVITATION_SENT;
+ else if (index.equals("invitation-received")) return INVITATION_RECEIVED;
+ else if (index.equals("request-sent")) return REQUEST_SENT;
+ else if (index.equals("request-received")) return REQUEST_RECEIVED;
+ else if (index.equals("response-sent")) return RESPONSE_SENT;
+ else if (index.equals("response-received")) return RESPONSE_RECEIVED;
+ else if (index.equals("abandoned")) return ABANDONED;
+ else if (index.equals("completed")) return COMPLETED;
+ else if (index.equals("terminated")) return TERMINATED;
+ else return null;
+
}
-
- @JsonValue
+
+ @JsonValue
public String getValue() {
return index;
}
-
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/Event.java b/src/main/java/io/twentysixty/sa/client/model/event/Event.java
index 9e653e4..d5ef3e8 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/Event.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/Event.java
@@ -19,14 +19,15 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonTypeInfo(use = Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
-@JsonSubTypes({@Type(value = ConnectionStateUpdated.class, name = "connection-state-updated"),
- @Type(value = MessageStateUpdated.class, name = "message-state-updated"),
- @Type(value = MessageReceived.class, name = "message-received"),
+@JsonSubTypes({
+@Type(value = ConnectionStateUpdated.class, name ="connection-state-updated"),
+@Type(value = MessageStateUpdated.class, name ="message-state-updated"),
+@Type(value = MessageReceived.class, name ="message-received"),
})
public class Event implements Serializable {
-
+
private static final long serialVersionUID = -3403163200817960597L;
private String type;
@@ -34,7 +35,7 @@ public class Event implements Serializable {
@JsonSerialize(using = InstantSerializer.class)
@JsonDeserialize(using = InstantDeserializer.class)
private Instant timestamp;
-
+
public String getType() {
return type;
}
@@ -50,5 +51,8 @@ public Instant getTimestamp() {
public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
+
+
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/EventType.java b/src/main/java/io/twentysixty/sa/client/model/event/EventType.java
index 61a101c..3bb937a 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/EventType.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/EventType.java
@@ -1,48 +1,47 @@
package io.twentysixty.sa.client.model.event;
+
import com.fasterxml.jackson.annotation.JsonValue;
public enum EventType {
/*
- * ConnectionState = 'connection-state-updated', MessageStateUpdated = 'message-state-updated', MessageReceived =
- * 'message-received',
- */
-
+ ConnectionState = 'connection-state-updated',
+ MessageStateUpdated = 'message-state-updated',
+ MessageReceived = 'message-received',
+ */
+
+
CONNECTION_STATE_UPDATED("connection-state-updated"),
MESSAGE_STATE_UPDATED("message-state-updated"),
MESSAGE_RECEIVED("message-received"),
-
+
;
-
- private EventType(String index) {
+
+ private EventType(String index){
this.index = index;
}
private String index;
- public String getIndex() {
+ public String getIndex(){
return this.index;
}
- public static EventType getEnum(String index) {
+ public static EventType getEnum(String index){
if (index == null)
- return null;
-
- if (index.equals("connection-state-updated"))
- return CONNECTION_STATE_UPDATED;
- else if (index.equals("message-state-updated"))
- return MESSAGE_STATE_UPDATED;
- else if (index.equals("message-received"))
- return MESSAGE_RECEIVED;
- else
- return null;
+ return null;
+ if (index.equals("connection-state-updated")) return CONNECTION_STATE_UPDATED;
+ else if (index.equals("message-state-updated")) return MESSAGE_STATE_UPDATED;
+ else if (index.equals("message-received")) return MESSAGE_RECEIVED;
+ else return null;
+
}
-
- @JsonValue
+
+ @JsonValue
public String getValue() {
return index;
}
-
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/MessageReceived.java b/src/main/java/io/twentysixty/sa/client/model/event/MessageReceived.java
index 3cb4370..bc83b07 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/MessageReceived.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/MessageReceived.java
@@ -10,8 +10,9 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class MessageReceived extends Event implements Serializable {
-
+public class MessageReceived extends Event implements Serializable {
+
+
private static final long serialVersionUID = 8579005132408573827L;
private BaseMessage message;
@@ -22,5 +23,6 @@ public BaseMessage getMessage() {
public void setMessage(BaseMessage message) {
this.message = message;
}
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/MessageState.java b/src/main/java/io/twentysixty/sa/client/model/event/MessageState.java
index 14db292..ed61ce1 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/MessageState.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/MessageState.java
@@ -1,55 +1,55 @@
package io.twentysixty.sa.client.model.event;
+
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonValue;
-public enum MessageState implements Serializable {
+public enum MessageState implements Serializable {
/*
- * Created = "created", Submitted = "submitted", Received = "received", Viewed = "viewed", Deleted = "deleted"
- */
-
+ Created = "created",
+ Submitted = "submitted",
+ Received = "received",
+ Viewed = "viewed",
+ Deleted = "deleted"
+ */
+
+
CREATED("created"),
SUBMITTED("submitted"),
RECEIVED("received"),
VIEWED("viewed"),
DELETED("deleted"),
-
+
;
-
- private MessageState(String index) {
+
+ private MessageState(String index){
this.index = index;
}
private String index;
- public String getIndex() {
+ public String getIndex(){
return this.index;
}
- public static MessageState getEnum(String index) {
+ public static MessageState getEnum(String index){
if (index == null)
- return null;
-
- if (index.equals("created"))
- return CREATED;
- else if (index.equals("submitted"))
- return SUBMITTED;
- else if (index.equals("received"))
- return RECEIVED;
- else if (index.equals("viewed"))
- return VIEWED;
- else if (index.equals("deleted"))
- return DELETED;
- else
- return null;
-
+ return null;
+
+ if (index.equals("created")) return CREATED;
+ else if (index.equals("submitted")) return SUBMITTED;
+ else if (index.equals("received")) return RECEIVED;
+ else if (index.equals("viewed")) return VIEWED;
+ else if (index.equals("deleted")) return DELETED;
+ else return null;
+
}
-
- @JsonValue
+
+ @JsonValue
public String getValue() {
return index;
}
-
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/event/MessageStateUpdated.java b/src/main/java/io/twentysixty/sa/client/model/event/MessageStateUpdated.java
index a88bf44..7f2b835 100644
--- a/src/main/java/io/twentysixty/sa/client/model/event/MessageStateUpdated.java
+++ b/src/main/java/io/twentysixty/sa/client/model/event/MessageStateUpdated.java
@@ -9,34 +9,33 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class MessageStateUpdated extends Event implements Serializable {
-
+public class MessageStateUpdated extends Event implements Serializable {
+
private UUID messageId;
private UUID connectionId;
private MessageState state;
-
+
+
public UUID getMessageId() {
return messageId;
}
-
public void setMessageId(UUID messageId) {
this.messageId = messageId;
}
-
public MessageState getState() {
return state;
}
-
public void setState(MessageState state) {
this.state = state;
}
-
public UUID getConnectionId() {
return connectionId;
}
-
public void setConnectionId(UUID connectionId) {
this.connectionId = connectionId;
}
+
+
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/BaseMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/BaseMessage.java
index 4a3dc04..2ea6241 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/BaseMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/BaseMessage.java
@@ -26,28 +26,31 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonTypeInfo(use = Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
-@JsonSubTypes({@Type(value = ContextualMenuRequest.class, name = "contextual-menu-request"),
- @Type(value = ContextualMenuSelect.class, name = "contextual-menu-select"),
- @Type(value = ContextualMenuUpdate.class, name = "contextual-menu-update"),
- @Type(value = CredentialIssuanceMessage.class, name = "credential-issuance"),
- @Type(value = CredentialRequestMessage.class, name = "credential-request"),
- @Type(value = CredentialReceptionMessage.class, name = "credential-reception"),
- @Type(value = IdentityProofRequestMessage.class, name = "identity-proof-request"),
- @Type(value = IdentityProofResultMessage.class, name = "identity-proof-result"),
- @Type(value = IdentityProofSubmitMessage.class, name = "identity-proof-submit"),
- @Type(value = MediaMessage.class, name = "media"),
- @Type(value = MenuDisplayMessage.class, name = "menu-display"),
- @Type(value = MenuSelectMessage.class, name = "menu-select"),
- @Type(value = ReceiptsMessage.class, name = "receipts"), @Type(value = TextMessage.class, name = "text"),
- @Type(value = InvitationMessage.class, name = "invitation"),
- @Type(value = ProfileMessage.class, name = "profile"),
- @Type(value = TerminateConnectionMessage.class, name = "terminate-connection"),
- @Type(value = CallAcceptRequestMessage.class, name = "call-accept"),
- @Type(value = CallEndRequestMessage.class, name = "call-end"),
- @Type(value = CallOfferRequestMessage.class, name = "call-offer"),
- @Type(value = CallRejectRequestMessage.class, name = "call-reject"),
- @Type(value = MrzDataRequestMessage.class, name = "mrz-data-request"),
- @Type(value = MrzDataSubmitMessage.class, name = "mrz-data-submit")})
+@JsonSubTypes({
+ @Type(value = ContextualMenuRequest.class, name ="contextual-menu-request"),
+ @Type(value = ContextualMenuSelect.class, name ="contextual-menu-select"),
+ @Type(value = ContextualMenuUpdate.class, name ="contextual-menu-update"),
+ @Type(value = CredentialIssuanceMessage.class, name ="credential-issuance"),
+ @Type(value = CredentialRequestMessage.class, name ="credential-request"),
+ @Type(value = CredentialReceptionMessage.class, name ="credential-reception"),
+ @Type(value = IdentityProofRequestMessage.class, name ="identity-proof-request"),
+ @Type(value = IdentityProofResultMessage.class, name ="identity-proof-result"),
+ @Type(value = IdentityProofSubmitMessage.class, name ="identity-proof-submit"),
+ @Type(value = MediaMessage.class, name ="media"),
+ @Type(value = MenuDisplayMessage.class, name ="menu-display"),
+ @Type(value = MenuSelectMessage.class, name ="menu-select"),
+ @Type(value = ReceiptsMessage.class, name ="receipts"),
+ @Type(value = TextMessage.class, name ="text"),
+ @Type(value = InvitationMessage.class, name ="invitation"),
+ @Type(value = ProfileMessage.class, name ="profile"),
+ @Type(value = TerminateConnectionMessage.class, name ="terminate-connection"),
+ @Type(value = CallAcceptRequestMessage.class, name ="call-accept"),
+ @Type(value = CallEndRequestMessage.class, name ="call-end"),
+ @Type(value = CallOfferRequestMessage.class, name ="call-offer"),
+ @Type(value = CallRejectRequestMessage.class, name ="call-reject"),
+ @Type(value = MrzDataRequestMessage.class, name ="mrz-data-request"),
+ @Type(value = MrzDataSubmitMessage.class, name ="mrz-data-submit")
+})
public abstract class BaseMessage implements Serializable {
private static final long serialVersionUID = 8573230287869630604L;
@@ -59,6 +62,7 @@ public abstract class BaseMessage implements Serializable {
private Instant timestamp = null;
private UUID threadId = null;
+
private SerializableObject lockObj = new SerializableObject();
public UUID getId() {
@@ -70,19 +74,15 @@ public UUID getId() {
return id;
}
-
public void setId(UUID id) {
this.id = id;
}
-
public String getType() {
return type;
}
-
public void setType(String type) {
this.type = type;
}
-
public Instant getTimestamp() {
synchronized (lockObj) {
if (timestamp == null) {
@@ -91,15 +91,12 @@ public Instant getTimestamp() {
}
return timestamp;
}
-
public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
-
public UUID getThreadId() {
return threadId;
}
-
public void setThreadId(UUID threadId) {
this.threadId = threadId;
}
@@ -107,9 +104,9 @@ public void setThreadId(UUID threadId) {
public UUID getConnectionId() {
return connectionId;
}
-
public void setConnectionId(UUID connectionId) {
this.connectionId = connectionId;
}
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/Ciphering.java b/src/main/java/io/twentysixty/sa/client/model/message/Ciphering.java
index 570dbfd..f838f55 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/Ciphering.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/Ciphering.java
@@ -2,31 +2,31 @@
import java.io.Serializable;
-public class Ciphering implements Serializable {
+public class Ciphering implements Serializable {
- private static final long serialVersionUID = -8660299956191649637L;
+ private static final long serialVersionUID = -8660299956191649637L;
private String algorithm;
- private Parameters parameters;
+ private Parameters parameters;
- public String getAlgorithm() {
- return algorithm;
- }
+ public String getAlgorithm() {
+ return algorithm;
+ }
- public void setAlgorithm(String algorithm) {
- this.algorithm = algorithm;
- }
+ public void setAlgorithm(String algorithm) {
+ this.algorithm = algorithm;
+ }
- public Parameters getParameters() {
- return parameters;
- }
+ public Parameters getParameters() {
+ return parameters;
+ }
- public void setParameters(Parameters parameters) {
- this.parameters = parameters;
- }
+ public void setParameters(Parameters parameters) {
+ this.parameters = parameters;
+ }
- @Override
- public String toString() {
- return "Ciphering [algorithm=" + algorithm + ", parameters=" + parameters + "]";
- }
+ @Override
+ public String toString() {
+ return "Ciphering [algorithm=" + algorithm + ", parameters=" + parameters + "]";
+ }
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/Claim.java b/src/main/java/io/twentysixty/sa/client/model/message/Claim.java
index af59729..142827f 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/Claim.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/Claim.java
@@ -8,35 +8,31 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class Claim implements Serializable {
+public class Claim implements Serializable {
private static final long serialVersionUID = -4617363940212616313L;
private String name;
private String mimeType;
private String value;
-
public String getName() {
return name;
}
-
public void setName(String name) {
this.name = name;
}
-
public String getMimeType() {
return mimeType;
}
-
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
-
public String getValue() {
return value;
}
-
public void setValue(String value) {
this.value = value;
}
+
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuItem.java b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuItem.java
index cda1f88..81e401a 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuItem.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuItem.java
@@ -8,7 +8,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ContextualMenuItem implements Serializable {
+public class ContextualMenuItem implements Serializable {
private static final long serialVersionUID = 2236423396630045255L;
private String id;
@@ -18,23 +18,18 @@ public class ContextualMenuItem implements Serializable {
public String getTitle() {
return title;
}
-
public void setTitle(String title) {
this.title = title;
}
-
public String getDescription() {
return description;
}
-
public void setDescription(String description) {
this.description = description;
}
-
public String getId() {
return id;
}
-
public void setId(String id) {
this.id = id;
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuRequest.java b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuRequest.java
index c3a0cab..e70b439 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuRequest.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuRequest.java
@@ -8,7 +8,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ContextualMenuRequest extends BaseMessage implements Serializable {
+public class ContextualMenuRequest extends BaseMessage implements Serializable {
private static final long serialVersionUID = 6901833429017318747L;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuSelect.java b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuSelect.java
index 9cb313b..777a979 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuSelect.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuSelect.java
@@ -8,7 +8,8 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ContextualMenuSelect extends BaseMessage implements Serializable {
+public class ContextualMenuSelect extends BaseMessage implements Serializable {
+
private static final long serialVersionUID = -4666174067446573357L;
private String selectionId;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuUpdate.java b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuUpdate.java
index afdba70..b58dcff 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuUpdate.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/ContextualMenuUpdate.java
@@ -10,7 +10,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ContextualMenuUpdate extends BaseMessage implements Serializable {
+public class ContextualMenuUpdate extends BaseMessage implements Serializable {
private static final long serialVersionUID = 391973108938300769L;
private String title;
@@ -51,7 +51,7 @@ public ContextualMenuUpdate clone() {
if (options != null) {
List clonedOptions = new ArrayList<>();
- for (ContextualMenuItem i : options) {
+ for (ContextualMenuItem i: options) {
ContextualMenuItem ci = new ContextualMenuItem();
ci.setDescription(i.getDescription());
ci.setId(i.getId());
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/CredentialIssuanceMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/CredentialIssuanceMessage.java
index 309c3cf..233e800 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/CredentialIssuanceMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/CredentialIssuanceMessage.java
@@ -9,26 +9,23 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class CredentialIssuanceMessage extends BaseMessage implements Serializable {
+public class CredentialIssuanceMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = 2516235892249987546L;
private String credentialDefinitionId;
private List claims;
-
public String getCredentialDefinitionId() {
return credentialDefinitionId;
}
-
public void setCredentialDefinitionId(String credentialDefinitionId) {
this.credentialDefinitionId = credentialDefinitionId;
}
-
public List getClaims() {
return claims;
}
-
public void setClaims(List claims) {
this.claims = claims;
}
+
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/CredentialReceptionMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/CredentialReceptionMessage.java
index 29214de..1be934a 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/CredentialReceptionMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/CredentialReceptionMessage.java
@@ -10,7 +10,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class CredentialReceptionMessage extends BaseMessage implements Serializable {
+public class CredentialReceptionMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = 9137654378945678321L;
private CredentialReceptionState state;
@@ -18,7 +18,6 @@ public class CredentialReceptionMessage extends BaseMessage implements Serializa
public CredentialReceptionState getState() {
return state;
}
-
public void setState(CredentialReceptionState state) {
this.state = state;
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/CredentialRequestMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/CredentialRequestMessage.java
index eae33aa..2e96dec 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/CredentialRequestMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/CredentialRequestMessage.java
@@ -10,24 +10,20 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class CredentialRequestMessage extends BaseMessage implements Serializable {
+public class CredentialRequestMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = 5136530051273882680L;
private UUID credentialDefinitionId;
private List claims;
-
public UUID getCredentialDefinitionId() {
return credentialDefinitionId;
}
-
public void setCredentialDefinitionId(UUID credentialDefinitionId) {
this.credentialDefinitionId = credentialDefinitionId;
}
-
public List getClaims() {
return claims;
}
-
public void setClaims(List claims) {
this.claims = claims;
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/IdMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/IdMessage.java
index e81d222..a703bd0 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/IdMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/IdMessage.java
@@ -8,7 +8,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class IdMessage implements Serializable {
+public class IdMessage implements Serializable {
private static final long serialVersionUID = 8231578543615143747L;
private String id;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofRequestMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofRequestMessage.java
index 21d41a9..f5fad27 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofRequestMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofRequestMessage.java
@@ -9,7 +9,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class IdentityProofRequestMessage extends BaseMessage implements Serializable {
+public class IdentityProofRequestMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = 184932976790362365L;
private List requestedProofItems;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofResultMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofResultMessage.java
index 2152f78..883da4b 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofResultMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofResultMessage.java
@@ -8,7 +8,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class IdentityProofResultMessage extends BaseMessage implements Serializable {
+public class IdentityProofResultMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = -2840211856886973672L;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofSubmitMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofSubmitMessage.java
index a73d4db..c2da93e 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofSubmitMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/IdentityProofSubmitMessage.java
@@ -9,7 +9,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class IdentityProofSubmitMessage extends BaseMessage implements Serializable {
+public class IdentityProofSubmitMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = -5772627818716475038L;
private List submittedProofItems;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/InvitationMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/InvitationMessage.java
index 02f21f1..d9881df 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/InvitationMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/InvitationMessage.java
@@ -8,38 +8,33 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class InvitationMessage extends BaseMessage implements Serializable {
+public class InvitationMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = 2414948709300337368L;
private String label;
private String imageUrl;
private String did;
- public String getLabel() {
- return label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public String getImageUrl() {
- return imageUrl;
- }
-
- public void setImageUrl(String imageUrl) {
- this.imageUrl = imageUrl;
- }
-
- @Override
- public String toString() {
- return "InvitationMessage [label=" + label + ", imageUrl=" + imageUrl + "]";
- }
-
+ public String getLabel() {
+ return label;
+ }
+ public void setLabel(String label) {
+ this.label = label;
+ }
+ public String getImageUrl() {
+ return imageUrl;
+ }
+ public void setImageUrl(String imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+
+ @Override
+ public String toString() {
+ return "InvitationMessage [label=" + label + ", imageUrl=" + imageUrl + "]";
+ }
public String getDid() {
return did;
}
-
public void setDid(String did) {
this.did = did;
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/MediaItem.java b/src/main/java/io/twentysixty/sa/client/model/message/MediaItem.java
index b129f1b..325214b 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/MediaItem.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/MediaItem.java
@@ -8,7 +8,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class MediaItem implements Serializable {
+public class MediaItem implements Serializable {
private static final long serialVersionUID = -2718519112111712736L;
private String id;
@@ -149,9 +149,9 @@ public void setscreenOrientaton(String screenOrientaton) {
@Override
public String toString() {
- return "MediaItem [description=" + description + ", mimeType=" + mimeType + ", uri=" + uri + ", preview="
- + preview + ", width=" + width + ", height=" + height + ", duration=" + duration + ", title=" + title
- + ", icon=" + icon + ", openingMode=" + openingMode + ", screenOrientaton=" + screenOrientaton + "]";
+ return "MediaItem [description=" + description + ", mimeType=" + mimeType + ", uri=" + uri
+ + ", preview=" + preview + ", width=" + width + ", height=" + height + ", duration=" + duration
+ + ", title=" + title + ", icon=" + icon + ", openingMode=" + openingMode + ", screenOrientaton=" + screenOrientaton + "]";
}
}
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/MediaMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/MediaMessage.java
index 22ca7fc..81eb349 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/MediaMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/MediaMessage.java
@@ -9,7 +9,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class MediaMessage extends BaseMessage implements Serializable {
+public class MediaMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = -4859703743672351029L;
private String description;
diff --git a/src/main/java/io/twentysixty/sa/client/model/message/MenuDisplayMessage.java b/src/main/java/io/twentysixty/sa/client/model/message/MenuDisplayMessage.java
index 19db3f3..aafb8b6 100644
--- a/src/main/java/io/twentysixty/sa/client/model/message/MenuDisplayMessage.java
+++ b/src/main/java/io/twentysixty/sa/client/model/message/MenuDisplayMessage.java
@@ -10,7 +10,7 @@
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public class MenuDisplayMessage extends BaseMessage implements Serializable {
+public class MenuDisplayMessage extends BaseMessage implements Serializable {
private static final long serialVersionUID = 815738354220531775L;
@@ -41,7 +41,7 @@ public MenuDisplayMessage clone() {
if (this.getMenuItems() != null) {
List