Skip to content

Commit fa55658

Browse files
Merge branch 'main' into release
2 parents 078084e + f722152 commit fa55658

File tree

4 files changed

+29
-28
lines changed

4 files changed

+29
-28
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![ONIX Labs](https://raw.githubusercontent.com/onix-labs/onix-labs.github.io/master/content/logo/master_full_md.png)
1+
![ONIX Labs](https://raw.githubusercontent.com/onix-labs/onixlabs-website/main/src/assets/images/logo/full/original/original-md.png)
22

33
# ONIXLabs Corda Core
44

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=onixlabs-corda-core
22
group=io.onixlabs
3-
version=3.0.0
3+
version=3.1.0
44
onixlabs.development.jarsign.keystore=../lib/onixlabs.development.pkcs12
55
onixlabs.development.jarsign.password=5891f47942424d2acbe108691fdb5ba258712fca7e4762be4327241ebf3dbfa3

onixlabs-corda-core-workflow/src/main/kotlin/io/onixlabs/corda/core/services/QueryDsl.kt

+25-25
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ class QueryDsl<T : ContractState> internal constructor(
129129
* @param values The [ContractState] types to apply to the query criteria.
130130
*/
131131
@QueryDslContext
132-
fun contractStateTypes(values: Iterable<Class<out T>>) {
133-
commonQueryCriteria.contractStateTypes = values.toSet()
132+
fun contractStateTypes(values: Iterable<Class<out T>>?) {
133+
commonQueryCriteria.contractStateTypes = values?.toSet()
134134
criteria = criteria.updateQueryCriteria()
135135
}
136136

@@ -150,8 +150,8 @@ class QueryDsl<T : ContractState> internal constructor(
150150
* @param values The exact [AbstractParty] participants to apply to the query.
151151
*/
152152
@QueryDslContext
153-
fun exactParticipants(values: Iterable<AbstractParty>) {
154-
commonQueryCriteria.exactParticipants = values.toList()
153+
fun exactParticipants(values: Iterable<AbstractParty>?) {
154+
commonQueryCriteria.exactParticipants = values?.toList()
155155
criteria = criteria.updateQueryCriteria()
156156
}
157157

@@ -171,8 +171,8 @@ class QueryDsl<T : ContractState> internal constructor(
171171
* @param values The participant [AbstractParty] instances to apply to the query criteria.
172172
*/
173173
@QueryDslContext
174-
fun participants(values: Iterable<AbstractParty>) {
175-
commonQueryCriteria.participants = values.toList()
174+
fun participants(values: Iterable<AbstractParty>?) {
175+
commonQueryCriteria.participants = values?.toList()
176176
criteria = criteria.updateQueryCriteria()
177177
}
178178

@@ -225,8 +225,8 @@ class QueryDsl<T : ContractState> internal constructor(
225225
* @param values The [String] instances to apply to the query criteria.
226226
*/
227227
@QueryDslContext
228-
fun externalIds(values: Iterable<String?>) {
229-
val criteriaToAdd = LinearStateQueryCriteria(externalId = values.filterNotNull())
228+
fun externalIds(values: Iterable<String>?) {
229+
val criteriaToAdd = LinearStateQueryCriteria(externalId = values?.toList())
230230
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
231231
}
232232

@@ -236,7 +236,7 @@ class QueryDsl<T : ContractState> internal constructor(
236236
* @param values The [String] instances to apply to the query criteria.
237237
*/
238238
@QueryDslContext
239-
fun externalIds(vararg values: String?) {
239+
fun externalIds(vararg values: String) {
240240
externalIds(values.toList())
241241
}
242242

@@ -246,8 +246,8 @@ class QueryDsl<T : ContractState> internal constructor(
246246
* @param values The [UniqueIdentifier] instances to apply to the query criteria.
247247
*/
248248
@QueryDslContext
249-
fun linearIds(values: Iterable<UniqueIdentifier>) {
250-
val criteriaToAdd = LinearStateQueryCriteria(linearId = values.toList())
249+
fun linearIds(values: Iterable<UniqueIdentifier>?) {
250+
val criteriaToAdd = LinearStateQueryCriteria(linearId = values?.toList())
251251
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
252252
}
253253

@@ -267,8 +267,8 @@ class QueryDsl<T : ContractState> internal constructor(
267267
* @param values The [AbstractParty] issuers of [FungibleAsset] states to apply to the query criteria.
268268
*/
269269
@QueryDslContext
270-
fun issuers(values: Iterable<AbstractParty>) {
271-
val criteriaToAdd = FungibleAssetQueryCriteria(issuer = values.toList())
270+
fun issuers(values: Iterable<AbstractParty>?) {
271+
val criteriaToAdd = FungibleAssetQueryCriteria(issuer = values?.toList())
272272
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
273273
}
274274

@@ -288,8 +288,8 @@ class QueryDsl<T : ContractState> internal constructor(
288288
* @param values The [AbstractParty] issuer refs of [FungibleAsset] states to apply to the query criteria.
289289
*/
290290
@QueryDslContext
291-
fun issuerRefs(values: Iterable<OpaqueBytes>) {
292-
val criteriaToAdd = FungibleAssetQueryCriteria(issuerRef = values.toList())
291+
fun issuerRefs(values: Iterable<OpaqueBytes>?) {
292+
val criteriaToAdd = FungibleAssetQueryCriteria(issuerRef = values?.toList())
293293
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
294294
}
295295

@@ -309,8 +309,8 @@ class QueryDsl<T : ContractState> internal constructor(
309309
* @param values The notary [AbstractParty] instances to apply to the query criteria.
310310
*/
311311
@QueryDslContext
312-
fun notaries(values: Iterable<AbstractParty>) {
313-
val criteriaToAdd = VaultQueryCriteria(notary = values.toList())
312+
fun notaries(values: Iterable<AbstractParty>?) {
313+
val criteriaToAdd = VaultQueryCriteria(notary = values?.toList())
314314
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
315315
}
316316

@@ -330,8 +330,8 @@ class QueryDsl<T : ContractState> internal constructor(
330330
* @param values The [AbstractParty] owners of [FungibleAsset] states to apply to the query criteria.
331331
*/
332332
@QueryDslContext
333-
fun owners(values: Iterable<AbstractParty>) {
334-
val criteriaToAdd = FungibleAssetQueryCriteria(owner = values.toList())
333+
fun owners(values: Iterable<AbstractParty>?) {
334+
val criteriaToAdd = FungibleAssetQueryCriteria(owner = values?.toList())
335335
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
336336
}
337337

@@ -351,7 +351,7 @@ class QueryDsl<T : ContractState> internal constructor(
351351
* @param value The [ColumnPredicate] that determines the quantity of a [FungibleAsset] to apply to the query criteria.
352352
*/
353353
@QueryDslContext
354-
fun fungibleAssetQuantity(value: ColumnPredicate<Long>) {
354+
fun fungibleAssetQuantity(value: ColumnPredicate<Long>?) {
355355
val criteriaToAdd = FungibleAssetQueryCriteria(quantity = value)
356356
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
357357
}
@@ -362,7 +362,7 @@ class QueryDsl<T : ContractState> internal constructor(
362362
* @param value The [ColumnPredicate] that determines the quantity of a [FungibleState] to apply to the query criteria.
363363
*/
364364
@QueryDslContext
365-
fun fungibleStateQuantity(value: ColumnPredicate<Long>) {
365+
fun fungibleStateQuantity(value: ColumnPredicate<Long>?) {
366366
val criteriaToAdd = FungibleStateQueryCriteria(quantity = value)
367367
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
368368
}
@@ -373,7 +373,7 @@ class QueryDsl<T : ContractState> internal constructor(
373373
* @param value The [SoftLockingCondition] to apply to the query criteria.
374374
*/
375375
@QueryDslContext
376-
fun softLockingCondition(value: SoftLockingCondition) {
376+
fun softLockingCondition(value: SoftLockingCondition?) {
377377
val criteriaToAdd = VaultQueryCriteria(softLockingCondition = value)
378378
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
379379
}
@@ -384,8 +384,8 @@ class QueryDsl<T : ContractState> internal constructor(
384384
* @param values The [StateRef] instances to apply to the query criteria.
385385
*/
386386
@QueryDslContext
387-
fun stateRefs(values: Iterable<StateRef>) {
388-
val criteriaToAdd = VaultQueryCriteria(stateRefs = values.toList())
387+
fun stateRefs(values: Iterable<StateRef>?) {
388+
val criteriaToAdd = VaultQueryCriteria(stateRefs = values?.toList())
389389
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
390390
}
391391

@@ -405,7 +405,7 @@ class QueryDsl<T : ContractState> internal constructor(
405405
* @param value The [TimeCondition] to apply to the query criteria.
406406
*/
407407
@QueryDslContext
408-
fun timeCondition(value: TimeCondition) {
408+
fun timeCondition(value: TimeCondition?) {
409409
val criteriaToAdd = VaultQueryCriteria(timeCondition = value)
410410
criteria = criteria.and(criteriaToAdd.updateQueryCriteria())
411411
}

onixlabs-corda-core-workflow/src/main/kotlin/io/onixlabs/corda/core/workflow/StatesToRecordBySession.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import net.corda.core.utilities.ProgressTracker
2929
* allowing a transaction initiator to specify how each counter-party should record the states of a transaction.
3030
*
3131
* @param statesToRecordBySession A map of [StatesToRecord] by [FlowSession].
32+
* @property sessions The flow sessions of the underlying map.
3233
*/
3334
class StatesToRecordBySession(statesToRecordBySession: Map<FlowSession, StatesToRecord> = emptyMap()) {
3435

@@ -43,8 +44,8 @@ class StatesToRecordBySession(statesToRecordBySession: Map<FlowSession, StatesTo
4344
statesToRecord: StatesToRecord = StatesToRecord.ONLY_RELEVANT
4445
) : this(sessions.map { it to statesToRecord }.toMap())
4546

47+
val sessions: Set<FlowSession> get() = mutableStatesToRecordBySession.keys
4648
private val mutableStatesToRecordBySession = statesToRecordBySession.toMutableMap()
47-
private val sessions: Set<FlowSession> get() = mutableStatesToRecordBySession.keys
4849

4950
/**
5051
* Sets the [StatesToRecord] for the specified [FlowSession].

0 commit comments

Comments
 (0)