diff options
author | Izabela Zawadzka <izabela.zawadzka@nokia.com> | 2019-04-15 13:03:45 +0200 |
---|---|---|
committer | Izabela Zawadzka <izabela.zawadzka@nokia.com> | 2019-04-16 09:18:12 +0200 |
commit | 482ff719edbb728827976622cef63c876cb6676e (patch) | |
tree | 151630129e37fbc751e54cea1922c5432f0125bf /sources/hv-collector-core/src | |
parent | 1b4aebbfeb932de091cad98ea66210f472fc2420 (diff) |
Add internal modifiers to comply with new HvVesCustomRule
Change-Id: I33ad24179d05ded58f6784544be9bbdd56210720
Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com>
Issue-ID: DCAEGEN2-1438
Diffstat (limited to 'sources/hv-collector-core/src')
7 files changed, 8 insertions, 8 deletions
diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HeaderValidator.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HeaderValidator.kt index 9d8accae..b88fe7fa 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HeaderValidator.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HeaderValidator.kt @@ -28,9 +28,9 @@ import org.onap.dcae.collectors.veshv.domain.headerRequiredFieldDescriptors import org.onap.dcae.collectors.veshv.domain.vesEventListenerVersionRegex import org.onap.ves.VesEventOuterClass.CommonEventHeader -typealias Validator = (CommonEventHeader) -> List<ValidationError> +internal typealias Validator = (CommonEventHeader) -> List<ValidationError> -object HeaderValidator { +internal object HeaderValidator { private val validators = (listOf(validateEventListenerVersion()) + headerRequiredFieldDescriptors.map { fieldDescriptor -> validateRequiredField(fieldDescriptor) diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt index 2190eba3..c4e877bf 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt @@ -35,7 +35,7 @@ import org.onap.dcae.collectors.veshv.utils.logging.Logger import org.onap.ves.VesEventOuterClass.CommonEventHeader import reactor.core.publisher.Flux -class Router internal constructor(private val routing: Routing, +internal class Router internal constructor(private val routing: Routing, private val messageSinks: Map<String, Lazy<Sink>>, private val ctx: ClientContext, private val metrics: Metrics) { diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/ValidationError.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/ValidationError.kt index 56a77f4f..5724fed7 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/ValidationError.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/ValidationError.kt @@ -21,7 +21,7 @@ package org.onap.dcae.collectors.veshv.impl import org.onap.dcae.collectors.veshv.domain.vesEventListenerVersionRegex -sealed class ValidationError(val errorMessage: String) { +internal sealed class ValidationError(val errorMessage: String) { class MissingField<A>(field: A) : ValidationError( "Invalid header - missing $field field" ) diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt index 8f66de2b..51eec024 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/HttpAdapter.kt @@ -30,7 +30,7 @@ import java.util.* * @author Jakub Dudycz <jakub.dudycz@nokia.com> * @since May 2018 */ -open class HttpAdapter(private val httpClient: HttpClient) { +internal open class HttpAdapter(private val httpClient: HttpClient) { open fun get(url: String, invocationId: UUID, queryParams: Map<String, Any> = emptyMap()): Mono<String> = httpClient diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/ProtobufSerializer.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/ProtobufSerializer.kt index 4e9932cc..8fc960d8 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/ProtobufSerializer.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/ProtobufSerializer.kt @@ -26,7 +26,7 @@ import org.apache.kafka.common.serialization.Serializer * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since June 2018 */ -class ProtobufSerializer : Serializer<MessageLite> { +internal class ProtobufSerializer : Serializer<MessageLite> { override fun configure(configs: MutableMap<String, *>?, isKey: Boolean) { // no configuration } diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/VesMessageSerializer.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/VesMessageSerializer.kt index a5f80707..084b3376 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/VesMessageSerializer.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/VesMessageSerializer.kt @@ -26,7 +26,7 @@ import org.onap.dcae.collectors.veshv.domain.VesMessage * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since June 2018 */ -class VesMessageSerializer : Serializer<VesMessage> { +internal class VesMessageSerializer : Serializer<VesMessage> { override fun configure(configs: MutableMap<String, *>?, isKey: Boolean) { // not needed } diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireFrameException.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireFrameException.kt index 81845400..4dd26597 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireFrameException.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/wire/WireFrameException.kt @@ -25,5 +25,5 @@ import org.onap.dcae.collectors.veshv.domain.WireFrameDecodingError * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since June 2018 */ -class WireFrameException(val error: WireFrameDecodingError) +internal class WireFrameException(val error: WireFrameDecodingError) : Exception("${error::class.simpleName}: ${error.message}") |