Fixing Blueprint Typo's and docs
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / blueprints / blueprint-core / src / main / kotlin / org / onap / ccsdk / cds / controllerblueprints / core / annotations / BluePrintsAnnotations.kt
1 /*
2  *  Copyright © 2019 IBM.
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 package org.onap.ccsdk.cds.controllerblueprints.core.annotations
18
19 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
20 import kotlin.reflect.KClass
21
22 @Target(AnnotationTarget.CLASS)
23 annotation class BluePrintsDataType(
24     val name: String,
25     val version: String = BluePrintConstants.DEFAULT_VERSION_NUMBER,
26     val description: String,
27     val derivedFrom: String = "tosca.datatypes.root"
28 )
29
30 @Target(AnnotationTarget.CLASS)
31 annotation class BluePrintsWorkflowInput
32
33 @Target(AnnotationTarget.CLASS)
34 annotation class BluePrintsWorkflowOutput
35
36 @Target(AnnotationTarget.CLASS)
37 annotation class BluePrintsNodeType(
38     val propertiesType: KClass<*>,
39     val attributesType: KClass<*>,
40     val inputsType: KClass<*>,
41     val outputsType: KClass<*>
42 )
43
44 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
45 annotation class BluePrintsProperty(
46     val name: String = "",
47     val description: String = ""
48 )
49
50 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
51 @Repeatable
52 annotation class BluePrintsConstrain()
53
54 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
55 annotation class PropertyDefaultValue(val value: String)
56
57 annotation class PropertyValidValue(val value: String)
58
59 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
60 annotation class InputExpression(
61     val propertyName: String
62 )
63
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 = ""
70 )
71
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 = ""
78 )
79
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
86 )
87
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 = ""
95 )
96
97 @Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
98 annotation class DSLExpression(
99     val propertyName: String
100 )