tidy state

This commit is contained in:
mattbradburyr3 2023-01-27 16:38:03 +00:00
parent 2c99d2ae45
commit cf0265fbac
27 changed files with 90 additions and 46 deletions

Binary file not shown.

View File

@ -4,5 +4,5 @@
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project> </project>

Binary file not shown.

View File

@ -0,0 +1,34 @@
Cordapp-Contract-Name=ContractsModuleNameHere
Corda-CPK-Cordapp-Licence=Unknown
Bundle-License=Unknown
Sealed=true
Corda-CPK-Format=2.0
Cordapp-Contract-Licence=Unknown
Cordapp-Contract-Version=1
Bundle-Name=ContractsModuleNameHere
Bundle-Vendor=VendorNameHere
Min-Platform-Version=999
Target-Platform-Version=999
Bundle-SymbolicName=com.r3.developers.csdetemplate.contracts
Cordapp-Contract-Vendor=VendorNameHere
Corda-CPK-Cordapp-Vendor=VendorNameHere
Corda-CPK-Cordapp-Name=com.r3.developers.csdetemplate.contracts
Corda-CheckpointCustomSerializer-Classes=${classes;IMPLEMENTS;net.corda.v5.serialization.CheckpointCustomSerializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-JsonSerializer-Classes=${classes;IMPLEMENTS;net.corda.v5.application.marshalling.json.JsonSerializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-JsonDeserializer-Classes=${classes;IMPLEMENTS;net.corda.v5.application.marshalling.json.JsonDeserializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-Token-Observer-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.utxo.observer.UtxoLedgerTokenStateObserver;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-CPK-Cordapp-Version=${Bundle-Version}
Corda-Flow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.Flow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-SerializationCustomSerializer-Classes=${classes;IMPLEMENTS;net.corda.v5.serialization.SerializationCustomSerializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-RPCStartableFlow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.RPCStartableFlow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-NotaryPluginProvider-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.notary.plugin.api.PluggableNotaryClientFlowProvider;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Import-Package=org.hibernate.annotations;resolution\:\=dynamic;version\=\!,org.hibernate.proxy;resolution\:\=dynamic;version\=\!,net.corda.v5.*\:o;version\='${range;[\=,+);${@}}',*
Corda-Subflow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.Subflow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-DigestAlgorithmFactory-Classes=${classes;IMPLEMENTS;net.corda.v5.crypto.extensions.DigestAlgorithmFactory;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-Entity-Classes=${classes;ANNOTATED;javax.persistence.Entity;ANNOTATED;net.corda.v5.base.annotations.CordaSerializable;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-StateAndRefPostProcessor-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.services.vault.StateAndRefPostProcessor;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
-noextraheaders=true
Corda-CustomQueryPostProcessor-Classes=${classes;IMPLEMENTS;net.corda.v5.application.persistence.query.CustomQueryPostProcessor;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-InitiatedFlow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.ResponderFlow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
-exportcontents=com.r3.developers.csdetemplate.utxoexample.contracts,com.r3.developers.csdetemplate.utxoexample.states
Corda-Contract-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.contracts.Contract;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
import java.security.PublicKey; import java.security.PublicKey;
import java.util.*; import java.util.*;
@CordaSerializable //@CordaSerializable
@BelongsToContract(ChatContract.class) @BelongsToContract(ChatContract.class)
public class ChatState implements ContractState { public class ChatState implements ContractState {
@ -21,8 +21,8 @@ public class ChatState implements ContractState {
private String message; private String message;
public List<PublicKey> participants; public List<PublicKey> participants;
public ChatState() { // todo why do we need this? // public ChatState() { // todo why do we need this?
} // }
// Allows serialisation and to use a specified UUID. // Allows serialisation and to use a specified UUID.
@ConstructorForDeserialization @ConstructorForDeserialization
@ -53,59 +53,35 @@ public class ChatState implements ContractState {
public UUID getId() { public UUID getId() {
return id; return id;
} }
// public void setId(UUID id) {
// this.id = id;
// }
public String getChatName() { public String getChatName() {
return chatName; return chatName;
} }
// public void setChatName(String chatName) {
// this.chatName = chatName;
// }
public MemberX500Name getMessageFrom() { public MemberX500Name getMessageFrom() {
return messageFrom; return messageFrom;
} }
// public void setMessageFrom(MemberX500Name messageFrom) {
// this.messageFrom = messageFrom;
// }
public String getMessage() { public String getMessage() {
return message; return message;
} }
// @NotNull
// public void setMessage(String message) { // @Override
// this.message = message;
// }
@NotNull
@Override
public List<PublicKey> getParticipants() { public List<PublicKey> getParticipants() {
return participants; return participants;
} }
// public void setParticipants(List<PublicKey> participants) {
// this.participants = participants;
// }
public ChatState updateMessage(MemberX500Name name, String message) { public ChatState updateMessage(MemberX500Name name, String message) {
return new ChatState(id, chatName, name, message, participants); return new ChatState(id, chatName, name, message, participants);
} }
//
// todo: why is this overridden // // todo: why is this overridden
@Override // @Override
public String toString() { // public String toString() {
return ChatState.class.getName() + // return ChatState.class.getName() +
"(id=" + id + // "(id=" + id +
", chatName=" + chatName + // ", chatName=" + chatName +
", messageFrom=" + messageFrom + // ", messageFrom=" + messageFrom +
", message=" + message + // ", message=" + message +
", participants=" + participants + // ", participants=" + participants +
")"; // ")";
} // }
} }

View File

@ -123,7 +123,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label> </label>
</div>Generated by </div>Generated by
<a href="http://www.gradle.org">Gradle 7.4.2</a> at 27 Jan 2023, 16:24:37</p> <a href="http://www.gradle.org">Gradle 7.4.2</a> at 27 Jan 2023, 16:36:05</p>
</div> </div>
</div> </div>
</body> </body>

View File

@ -126,7 +126,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label> </label>
</div>Generated by </div>Generated by
<a href="http://www.gradle.org">Gradle 7.4.2</a> at 27 Jan 2023, 16:24:37</p> <a href="http://www.gradle.org">Gradle 7.4.2</a> at 27 Jan 2023, 16:36:05</p>
</div> </div>
</div> </div>
</body> </body>

View File

@ -96,7 +96,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label> </label>
</div>Generated by </div>Generated by
<a href="http://www.gradle.org">Gradle 7.4.2</a> at 27 Jan 2023, 16:24:37</p> <a href="http://www.gradle.org">Gradle 7.4.2</a> at 27 Jan 2023, 16:36:05</p>
</div> </div>
</div> </div>
</body> </body>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlowTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2023-01-27T16:24:36" hostname="21LDN-MAC6PTMD6T" time="1.143"> <testsuite name="com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlowTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2023-01-27T16:36:04" hostname="21LDN-MAC6PTMD6T" time="1.143">
<properties/> <properties/>
<testcase name="test_that_MyFirstFLow_returns_correct_message()" classname="com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlowTest" time="1.143"/> <testcase name="test_that_MyFirstFLow_returns_correct_message()" classname="com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlowTest" time="1.143"/>
<system-out><![CDATA[]]></system-out> <system-out><![CDATA[]]></system-out>

View File

@ -0,0 +1,34 @@
Corda-CPK-Cordapp-Licence=Unknown
Bundle-License=Unknown
Sealed=true
Cordapp-Workflow-Licence=Unknown
Corda-CPK-Format=2.0
Cordapp-Workflow-Vendor=VendorNameHere
Bundle-Name=WorkflowsModuleNameHere
Bundle-Vendor=VendorNameHere
Min-Platform-Version=999
Target-Platform-Version=999
Bundle-SymbolicName=com.r3.developers.csdetemplate.workflows
Corda-CPK-Cordapp-Vendor=VendorNameHere
Corda-CPK-Cordapp-Name=com.r3.developers.csdetemplate.workflows
Cordapp-Workflow-Name=WorkflowsModuleNameHere
Cordapp-Workflow-Version=1
Corda-CheckpointCustomSerializer-Classes=${classes;IMPLEMENTS;net.corda.v5.serialization.CheckpointCustomSerializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-JsonSerializer-Classes=${classes;IMPLEMENTS;net.corda.v5.application.marshalling.json.JsonSerializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-JsonDeserializer-Classes=${classes;IMPLEMENTS;net.corda.v5.application.marshalling.json.JsonDeserializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-Token-Observer-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.utxo.observer.UtxoLedgerTokenStateObserver;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-CPK-Cordapp-Version=${Bundle-Version}
Corda-Flow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.Flow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-SerializationCustomSerializer-Classes=${classes;IMPLEMENTS;net.corda.v5.serialization.SerializationCustomSerializer;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-RPCStartableFlow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.RPCStartableFlow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-NotaryPluginProvider-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.notary.plugin.api.PluggableNotaryClientFlowProvider;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Import-Package=org.hibernate.annotations;resolution\:\=dynamic;version\=\!,org.hibernate.proxy;resolution\:\=dynamic;version\=\!,net.corda.v5.*\:o;version\='${range;[\=,+);${@}}',*
Corda-Subflow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.Subflow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-DigestAlgorithmFactory-Classes=${classes;IMPLEMENTS;net.corda.v5.crypto.extensions.DigestAlgorithmFactory;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-Entity-Classes=${classes;ANNOTATED;javax.persistence.Entity;ANNOTATED;net.corda.v5.base.annotations.CordaSerializable;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-StateAndRefPostProcessor-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.services.vault.StateAndRefPostProcessor;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
-noextraheaders=true
Corda-CustomQueryPostProcessor-Classes=${classes;IMPLEMENTS;net.corda.v5.application.persistence.query.CustomQueryPostProcessor;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
Corda-InitiatedFlow-Classes=${classes;IMPLEMENTS;net.corda.v5.application.flows.ResponderFlow;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}
-exportcontents=com.r3.developers.csdetemplate.flowexample.workflows,com.r3.developers.csdetemplate.utilities,com.r3.developers.csdetemplate.utxoexample.workflows
Corda-Contract-Classes=${classes;IMPLEMENTS;net.corda.v5.ledger.contracts.Contract;CONCRETE;PUBLIC;STATIC;NAMED;\!*.[\\d]+*}