package org.onap.ccsdk.cds.controllerblueprints.core
-import org.apache.commons.lang.exception.ExceptionUtils
+import org.apache.commons.lang3.exception.ExceptionUtils
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogException
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogExceptionFluent
import org.onap.ccsdk.cds.error.catalog.core.ErrorMessage
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintJsonNodeFactory
import org.onap.ccsdk.cds.controllerblueprints.core.removeNullNode
import java.io.StringWriter
+import java.util.Properties
object BluePrintVelocityTemplateService {
+ private val properties = Properties().apply {
+ this.putAll(
+ mutableMapOf(
+ "introspector.conversion_handler.class" to "none",
+ "parser.space_gobbling" to "bc",
+ "directive.if.empty_check" to "false",
+ "parser.allow_hyphen_in_identifiers" to "true",
+ "velocimacro.enable_bc_mode" to "true",
+ "event_handler.invalid_references.quiet" to "true",
+ "event_handler.invalid_references.null" to "true",
+ "event_handler.invalid_references.tested" to "true"
+ )
+ )
+ }
/**
* Generate Content from Velocity Template and JSON Content with injected API
*/
/*
* initialize the engine
*/
- velocity.init()
+ velocity.init(properties)
val velocityContext = VelocityContext()
velocityContext.put("StringUtils", StringUtils::class.java)
import com.fasterxml.jackson.databind.node.ObjectNode
import io.micrometer.core.instrument.MeterRegistry
-import org.apache.commons.lang.builder.ToStringBuilder
+import org.apache.commons.lang3.builder.ToStringBuilder
import org.apache.kafka.clients.producer.Callback
import org.apache.kafka.clients.producer.KafkaProducer
import org.apache.kafka.clients.producer.ProducerRecord
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
-import org.apache.commons.lang.text.StrBuilder
+import org.apache.commons.lang3.text.StrBuilder
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service