2 * Copyright © 2019 IBM.
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.core.annotations
20 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
21 import kotlin.reflect.KClass
23 @Target(AnnotationTarget.CLASS)
24 annotation class BluePrintsDataType(
26 val version: String = BluePrintConstants.DEFAULT_VERSION_NUMBER,
27 val description: String,
28 val derivedFrom: String = "tosca.datatypes.root"
31 @Target(AnnotationTarget.CLASS)
32 annotation class BluePrintsWorkflowInput
34 @Target(AnnotationTarget.CLASS)
35 annotation class BluePrintsWorkflowOutput
37 @Target(AnnotationTarget.CLASS)
38 annotation class BluePrintsNodeType(val propertiesType: KClass<*>, val attributesType: KClass<*>,
39 val inputsType: KClass<*>, val outputsType: KClass<*>)
41 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
42 annotation class BluePrintsProperty(
43 val name: String = "",
44 val description: String = ""
47 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
49 annotation class BluePrintsConstrain()
51 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
52 annotation class PropertyDefaultValue(val value: String)
54 annotation class PropertyValidValue(val value: String)
56 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
57 annotation class InputExpression(
58 val propertyName: String
61 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
62 annotation class PropertyExpression(
63 val modelableEntityName: String = "SELF",
64 val reqOrCapEntityName: String = "",
65 val propertyName: String,
66 val subPropertyName: String = ""
69 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
70 annotation class AttributeExpression(
71 val modelableEntityName: String = "SELF",
72 val reqOrCapEntityName: String = "",
73 val attributeName: String,
74 val subAttributeName: String = ""
77 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
78 annotation class ArtifactExpression(
79 val modelableEntityName: String = "SELF",
80 val artifactName: String,
81 val location: String = "LOCAL_FILE",
82 val remove: Boolean = false
85 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
86 annotation class OperationOutputExpression(
87 val modelableEntityName: String = "SELF",
88 val interfaceName: String,
89 val operationName: String,
90 val propertyName: String,
91 val subPropertyName: String = ""
94 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
95 annotation class DSLExpression(
96 val propertyName: String