aboutsummaryrefslogtreecommitdiffstats
path: root/common/openecomp-tosca-datatype
diff options
context:
space:
mode:
authorshiria <shiri.amichai@amdocs.com>2018-03-21 09:04:07 +0200
committerOren Kleks <orenkle@amdocs.com>2018-03-21 12:24:55 +0000
commitf928f5983a4722b728ff4366f1dd3eb3453e02d8 (patch)
treec51598d7b3ed423d78c69ae94991e290a5492954 /common/openecomp-tosca-datatype
parent298c383225d728eb6a04e4b8cb03472f4990de7e (diff)
Add support in TOSCA isTypeOf
Add support for InterfaceDefinitionType entity type Add support for PropertyDefinition entity type Add support for ParameterDefinition entity type Change-Id: I10ba0f6c3f16a0d476e254d40b4fcd463392cb52 Issue-ID: SDC-1153 Signed-off-by: shiria <shiri.amichai@amdocs.com>
Diffstat (limited to 'common/openecomp-tosca-datatype')
-rw-r--r--common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DefinitionOfDataType.java96
-rw-r--r--common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java91
-rw-r--r--common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java85
3 files changed, 110 insertions, 162 deletions
diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DefinitionOfDataType.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DefinitionOfDataType.java
new file mode 100644
index 0000000000..a963598ad9
--- /dev/null
+++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DefinitionOfDataType.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+
+public class DefinitionOfDataType {
+
+ protected String type;
+ protected String description;
+ protected Object value;
+ protected Boolean required;
+ protected Object _default;
+ protected Status status;
+ protected List<Constraint> constraints;
+ protected EntrySchema entry_schema;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ public Boolean getRequired() {
+ return required;
+ }
+
+ public void setRequired(Boolean required) {
+ this.required = required;
+ }
+
+ public Object get_default() {
+ return _default;
+ }
+
+ public void set_default(Object _default) {
+ this._default = _default;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public List<Constraint> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Constraint> constraints) {
+ this.constraints = constraints;
+ }
+
+ public EntrySchema getEntry_schema() {
+ return entry_schema;
+ }
+
+ public void setEntry_schema(EntrySchema entry_schema) {
+ this.entry_schema = entry_schema;
+ }
+
+}
diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java
index 4d2baf090f..f579c5364f 100644
--- a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java
+++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java
@@ -1,101 +1,22 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=========================================================
*/
package org.openecomp.sdc.tosca.datatypes.model;
-import java.util.List;
+public class ParameterDefinition extends DefinitionOfDataType {
-
-public class ParameterDefinition {
-
- private String type;
- private String description;
- private Object value;
- private Boolean required;
- private Object _default;
- private Status status;
- private List<Constraint> constraints;
- private EntrySchema entry_schema;
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Object getValue() {
- return value;
- }
-
- public void setValue(Object value) {
- this.value = value;
- }
-
- public Boolean getRequired() {
- return required;
- }
-
- public void setRequired(Boolean required) {
- this.required = required;
- }
-
- public Object get_default() {
- return _default;
- }
-
- public void set_default(Object _default) {
- this._default = _default;
- }
-
- public Status getStatus() {
- return status;
- }
-
- public void setStatus(Status status) {
- this.status = status;
- }
-
- public List<Constraint> getConstraints() {
- return constraints;
- }
-
- public void setConstraints(List<Constraint> constraints) {
- this.constraints = constraints;
- }
-
- public EntrySchema getEntry_schema() {
- return entry_schema;
- }
-
- public void setEntry_schema(EntrySchema entry_schema) {
- this.entry_schema = entry_schema;
- }
}
diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java
index c5363eda79..9472b539ab 100644
--- a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java
+++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java
@@ -1,99 +1,30 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=========================================================
*/
package org.openecomp.sdc.tosca.datatypes.model;
import org.openecomp.sdc.tosca.services.DataModelCloneUtil;
-import java.util.List;
import java.util.Objects;
-public class PropertyDefinition {
-
- private String type;
- private String description;
- private Boolean required;
- private Object _default;
- private Status status;
- private List<Constraint> constraints;
- private EntrySchema entry_schema;
+public class PropertyDefinition extends DefinitionOfDataType {
public PropertyDefinition() {
- status = Status.SUPPORTED;
- required = true;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Boolean getRequired() {
- return required;
- }
-
- public void setRequired(Boolean required) {
- this.required = required;
- }
-
- public Object get_default() {
- return _default;
- }
-
- public void set_default(Object _default) {
- this._default = _default;
- }
-
- public Status getStatus() {
- return status;
- }
-
- public void setStatus(Status status) {
- this.status = status;
- }
-
- public List<Constraint> getConstraints() {
- return constraints;
- }
-
- public void setConstraints(List<Constraint> constraints) {
- this.constraints = constraints;
- }
-
- public EntrySchema getEntry_schema() {
- return entry_schema;
- }
-
- public void setEntry_schema(EntrySchema entry_schema) {
- this.entry_schema = entry_schema;
+ this.status = Status.SUPPORTED;
+ this.required = true;
}
@Override