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.cds.controllerblueprints.service.enhancer
19 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.*
20 import org.springframework.beans.factory.annotation.Autowired
21 import org.springframework.context.ApplicationContext
22 import org.springframework.stereotype.Service
25 open class BluePrintTypeEnhancerServiceImpl : BluePrintTypeEnhancerService {
28 private lateinit var context: ApplicationContext
30 override fun getServiceTemplateEnhancers(): List<BluePrintServiceTemplateEnhancer> {
31 return context.getBeansOfType(BluePrintServiceTemplateEnhancer::class.java).map { it.value }
34 override fun getTopologyTemplateEnhancers(): List<BluePrintTopologyTemplateEnhancer> {
35 return context.getBeansOfType(BluePrintTopologyTemplateEnhancer::class.java).map { it.value }
38 override fun getWorkflowEnhancers(): List<BluePrintWorkflowEnhancer> {
39 return context.getBeansOfType(BluePrintWorkflowEnhancer::class.java).map { it.value }
42 override fun getNodeTemplateEnhancers(): List<BluePrintNodeTemplateEnhancer> {
43 return context.getBeansOfType(BluePrintNodeTemplateEnhancer::class.java).map { it.value }
46 override fun getNodeTypeEnhancers(): List<BluePrintNodeTypeEnhancer> {
47 return context.getBeansOfType(BluePrintNodeTypeEnhancer::class.java).map { it.value }
50 override fun getArtifactDefinitionEnhancers(): List<BluePrintArtifactDefinitionEnhancer> {
51 return context.getBeansOfType(BluePrintArtifactDefinitionEnhancer::class.java).map { it.value }
54 override fun getPolicyTypeEnhancers(): List<BluePrintPolicyTypeEnhancer> {
55 return context.getBeansOfType(BluePrintPolicyTypeEnhancer::class.java).map { it.value }
58 override fun getPropertyDefinitionEnhancers(): List<BluePrintPropertyDefinitionEnhancer> {
59 return context.getBeansOfType(BluePrintPropertyDefinitionEnhancer::class.java).map { it.value }
62 override fun getAttributeDefinitionEnhancers(): List<BluePrintAttributeDefinitionEnhancer> {
63 return context.getBeansOfType(BluePrintAttributeDefinitionEnhancer::class.java).map { it.value }