Merge pull request #910 from corda/tudor-merge-os-01_06

Tudor merge os 01 06
This commit is contained in:
Tudor Malene
2018-06-04 15:37:33 +01:00
committed by GitHub
24 changed files with 293 additions and 122 deletions

View File

@ -11,6 +11,7 @@
package net.corda.core.cordapp
import net.corda.core.DoNotImplement
import net.corda.core.crypto.SecureHash
import net.corda.core.flows.FlowLogic
import net.corda.core.schemas.MappedSchema
import net.corda.core.serialization.SerializationCustomSerializer
@ -35,7 +36,9 @@ import java.net.URL
* @property serializationWhitelists List of Corda plugin registries
* @property serializationCustomSerializers List of serializers
* @property customSchemas List of custom schemas
* @property allFlows List of all flow classes
* @property jarPath The path to the JAR for this CorDapp
* @property jarHash Hash of the jar
*/
@DoNotImplement
interface Cordapp {
@ -49,9 +52,11 @@ interface Cordapp {
val serializationWhitelists: List<SerializationWhitelist>
val serializationCustomSerializers: List<SerializationCustomSerializer<*, *>>
val customSchemas: Set<MappedSchema>
val allFlows: List<Class<out FlowLogic<*>>>
val jarPath: URL
val cordappClasses: List<String>
val info: Info
val jarHash: SecureHash.SHA256
/**
* CorDapp's information, including vendor and version.

View File

@ -11,6 +11,7 @@
package net.corda.core.internal.cordapp
import net.corda.core.cordapp.Cordapp
import net.corda.core.crypto.SecureHash
import net.corda.core.flows.FlowLogic
import net.corda.core.internal.toPath
import net.corda.core.schemas.MappedSchema
@ -29,9 +30,11 @@ data class CordappImpl(
override val serializationWhitelists: List<SerializationWhitelist>,
override val serializationCustomSerializers: List<SerializationCustomSerializer<*, *>>,
override val customSchemas: Set<MappedSchema>,
override val allFlows: List<Class<out FlowLogic<*>>>,
override val jarPath: URL,
override val info: Cordapp.Info = CordappImpl.Info.UNKNOWN,
override val name: String = jarPath.toPath().fileName.toString().removeSuffix(".jar")) : Cordapp {
override val jarHash: SecureHash.SHA256,
override val name: String = jarPath.toPath().fileName.toString().removeSuffix(".jar") ) : Cordapp {
/**
* An exhaustive list of all classes relevant to the node within this CorDapp