2  * Copyright © 2017-2018 AT&T Intellectual Property.
 
   4  * Licensed under the Apache License, Version 2.0 (the "License");
 
   5  * you may not use this file except in compliance with the License.
 
   6  * You may obtain a copy of the License at
 
   8  *     http://www.apache.org/licenses/LICENSE-2.0
 
  10  * Unless required by applicable law or agreed to in writing, software
 
  11  * distributed under the License is distributed on an "AS IS" BASIS,
 
  12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  13  * See the License for the specific language governing permissions and
 
  14  * limitations under the License.
 
  17 package org.onap.ccsdk.apps.controllerblueprints.blueprint.validation
 
  19 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.*
 
  20 import org.springframework.beans.factory.annotation.Autowired
 
  21 import org.springframework.context.ApplicationContext
 
  22 import org.springframework.stereotype.Service
 
  25 class BluePrintTypeValidatorServiceImpl : BluePrintTypeValidatorService {
 
  28     private lateinit var context: ApplicationContext
 
  30     override fun getServiceTemplateValidators(): List<BluePrintServiceTemplateValidator> {
 
  31         return context.getBeansOfType(BluePrintServiceTemplateValidator::class.java).mapNotNull { it.value }
 
  34     override fun getDataTypeValidators(): List<BluePrintDataTypeValidator> {
 
  35         return context.getBeansOfType(BluePrintDataTypeValidator::class.java).mapNotNull { it.value }
 
  38     override fun getArtifactTypeValidators(): List<BluePrintArtifactTypeValidator> {
 
  39         return context.getBeansOfType(BluePrintArtifactTypeValidator::class.java).mapNotNull { it.value }
 
  42     override fun getNodeTypeValidators(): List<BluePrintNodeTypeValidator> {
 
  43         return context.getBeansOfType(BluePrintNodeTypeValidator::class.java).mapNotNull { it.value }
 
  46     override fun getTopologyTemplateValidators(): List<BluePrintTopologyTemplateValidator> {
 
  47         return context.getBeansOfType(BluePrintTopologyTemplateValidator::class.java).mapNotNull { it.value }
 
  50     override fun getNodeTemplateValidators(): List<BluePrintNodeTemplateValidator> {
 
  51         return context.getBeansOfType(BluePrintNodeTemplateValidator::class.java).mapNotNull { it.value }
 
  54     override fun getWorkflowValidators(): List<BluePrintWorkflowValidator> {
 
  55         return context.getBeansOfType(BluePrintWorkflowValidator::class.java).mapNotNull { it.value }
 
  58     override fun getPropertyDefinitionValidators(): List<BluePrintPropertyDefinitionValidator> {
 
  59         return context.getBeansOfType(BluePrintPropertyDefinitionValidator::class.java).mapNotNull { it.value }
 
  62     override fun getAttributeDefinitionValidators(): List<BluePrintAttributeDefinitionValidator> {
 
  63         return context.getBeansOfType(BluePrintAttributeDefinitionValidator::class.java).mapNotNull { it.value }