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
19 import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
20 import kotlin.reflect.KClass
22 @Target(AnnotationTarget.CLASS)
23 annotation class BlueprintsDataType(
25 val version: String = BlueprintConstants.DEFAULT_VERSION_NUMBER,
26 val description: String,
27 val derivedFrom: String = "tosca.datatypes.root"
30 @Target(AnnotationTarget.CLASS)
31 annotation class BlueprintsWorkflowInput
33 @Target(AnnotationTarget.CLASS)
34 annotation class BlueprintsWorkflowOutput
36 @Target(AnnotationTarget.CLASS)
37 annotation class BlueprintsNodeType(
38 val propertiesType: KClass<*>,
39 val attributesType: KClass<*>,
40 val inputsType: KClass<*>,
41 val outputsType: KClass<*>
44 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
45 annotation class BlueprintsProperty(
46 val name: String = "",
47 val description: String = ""
50 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
52 annotation class BlueprintsConstrain()
54 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
55 annotation class PropertyDefaultValue(val value: String)
57 annotation class PropertyValidValue(val value: String)
59 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
60 annotation class InputExpression(
61 val propertyName: String
64 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
65 annotation class PropertyExpression(
66 val modelableEntityName: String = "SELF",
67 val reqOrCapEntityName: String = "",
68 val propertyName: String,
69 val subPropertyName: String = ""
72 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
73 annotation class AttributeExpression(
74 val modelableEntityName: String = "SELF",
75 val reqOrCapEntityName: String = "",
76 val attributeName: String,
77 val subAttributeName: String = ""
80 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
81 annotation class ArtifactExpression(
82 val modelableEntityName: String = "SELF",
83 val artifactName: String,
84 val location: String = "LOCAL_FILE",
85 val remove: Boolean = false
88 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
89 annotation class OperationOutputExpression(
90 val modelableEntityName: String = "SELF",
91 val interfaceName: String,
92 val operationName: String,
93 val propertyName: String,
94 val subPropertyName: String = ""
97 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
98 annotation class DSLExpression(
99 val propertyName: String