Change public constant values to Kotlin constants (#1588)

* Make string constants into Kotlin constants

* Add JvmName annotation to KeyStoreUtilities
This commit is contained in:
Ross Nicoll
2017-09-21 15:32:02 +01:00
committed by josecoll
parent c108637df6
commit c05e482c8f
10 changed files with 26 additions and 24 deletions

View File

@ -62,15 +62,15 @@ interface NetworkMapService {
companion object {
val DEFAULT_EXPIRATION_PERIOD: Period = Period.ofWeeks(4)
val FETCH_TOPIC = "platform.network_map.fetch"
val QUERY_TOPIC = "platform.network_map.query"
val REGISTER_TOPIC = "platform.network_map.register"
val SUBSCRIPTION_TOPIC = "platform.network_map.subscribe"
const val FETCH_TOPIC = "platform.network_map.fetch"
const val QUERY_TOPIC = "platform.network_map.query"
const val REGISTER_TOPIC = "platform.network_map.register"
const val SUBSCRIPTION_TOPIC = "platform.network_map.subscribe"
// Base topic used when pushing out updates to the network map. Consumed, for example, by the map cache.
// When subscribing to these updates, remember they must be acknowledged
val PUSH_TOPIC = "platform.network_map.push"
const val PUSH_TOPIC = "platform.network_map.push"
// Base topic for messages acknowledging pushed updates
val PUSH_ACK_TOPIC = "platform.network_map.push_ack"
const val PUSH_ACK_TOPIC = "platform.network_map.push_ack"
val type = ServiceType.networkMap
}

View File

@ -1,3 +1,5 @@
@file:JvmName("KeyStoreUtilities")
package net.corda.node.utilities
import net.corda.core.crypto.Crypto
@ -14,7 +16,7 @@ import java.security.cert.Certificate
import java.security.cert.CertificateFactory
import java.security.cert.X509Certificate
val KEYSTORE_TYPE = "JKS"
const val KEYSTORE_TYPE = "JKS"
/**
* Helper method to either open an existing keystore for modification, or create a new blank keystore.

View File

@ -44,12 +44,12 @@ object X509Utilities {
val DEFAULT_TLS_SIGNATURE_SCHEME = Crypto.ECDSA_SECP256R1_SHA256
// Aliases for private keys and certificates.
val CORDA_ROOT_CA = "cordarootca"
val CORDA_INTERMEDIATE_CA = "cordaintermediateca"
val CORDA_CLIENT_TLS = "cordaclienttls"
val CORDA_CLIENT_CA = "cordaclientca"
const val CORDA_ROOT_CA = "cordarootca"
const val CORDA_INTERMEDIATE_CA = "cordaintermediateca"
const val CORDA_CLIENT_TLS = "cordaclienttls"
const val CORDA_CLIENT_CA = "cordaclientca"
val CORDA_CLIENT_CA_CN = "Corda Client CA Certificate"
const val CORDA_CLIENT_CA_CN = "Corda Client CA Certificate"
private val DEFAULT_VALIDITY_WINDOW = Pair(0.millis, 3650.days)
/**