summaryrefslogtreecommitdiffstats
path: root/common/onap-tosca-datatype
diff options
context:
space:
mode:
Diffstat (limited to 'common/onap-tosca-datatype')
-rw-r--r--common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinition.java7
-rw-r--r--common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionType.java121
-rw-r--r--common/onap-tosca-datatype/src/main/resources/globalTypes/tosca/groups.yml2
3 files changed, 62 insertions, 68 deletions
diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinition.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinition.java
index 28e871a454..053f0b33ec 100644
--- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinition.java
+++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinition.java
@@ -13,13 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.sdc.tosca.datatypes.model;
-import java.util.Map;
+package org.onap.sdc.tosca.datatypes.model;
public abstract class InterfaceDefinition {
- protected Map<String, OperationDefinition> operations;
-
- public abstract void addOperation(String operationName, OperationDefinition operationDefinition);
+ public abstract void addOperation(String operationName, OperationDefinition operationDefinition);
}
diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionType.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionType.java
index 800786c1af..a8207ba828 100644
--- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionType.java
+++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/InterfaceDefinitionType.java
@@ -24,75 +24,72 @@ import java.util.Map;
public class InterfaceDefinitionType extends InterfaceDefinition {
- private String type;
- private Map<String, PropertyDefinition> inputs;
- protected Map<String, OperationDefinitionType> operations;
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public Map<String, PropertyDefinition> getInputs() {
- return inputs;
- }
-
- public void setInputs(
- Map<String, PropertyDefinition> inputs) {
- this.inputs = inputs;
- }
-
- public Map<String, OperationDefinitionType> getOperations() {
- return operations;
- }
-
- public void setOperations(
- Map<String, OperationDefinitionType> operations) {
- this.operations = operations;
- }
-
- public void addOperation(String operationName, OperationDefinitionType operation) {
- if(MapUtils.isEmpty(this.operations)) {
- this.operations = new HashMap<>();
+ private String type;
+ private Map<String, PropertyDefinition> inputs;
+ private Map<String, OperationDefinitionType> operations;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Map<String, PropertyDefinition> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(Map<String, PropertyDefinition> inputs) {
+ this.inputs = inputs;
}
- this.operations.put(operationName, operation);
- }
+ public Map<String, OperationDefinitionType> getOperations() {
+ return operations;
+ }
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
+ public void setOperations(Map<String, OperationDefinitionType> operations) {
+ this.operations = operations;
}
- if (!(o instanceof InterfaceDefinitionType)) {
- return false;
+
+ public void addOperation(String operationName, OperationDefinitionType operation) {
+ if (MapUtils.isEmpty(this.operations)) {
+ this.operations = new HashMap<>();
+ }
+
+ this.operations.put(operationName, operation);
}
- InterfaceDefinitionType that = (InterfaceDefinitionType) o;
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof InterfaceDefinitionType)) {
+ return false;
+ }
+
+ InterfaceDefinitionType that = (InterfaceDefinitionType) o;
+
+ if (getType() != null ? !getType().equals(that.getType()) : that.getType() != null) {
+ return false;
+ }
+ if (getInputs() != null ? !getInputs().equals(that.getInputs()) : that.getInputs() != null) {
+ return false;
+ }
+ return getOperations() != null ? getOperations().equals(that.getOperations()) : that.getOperations() == null;
+ }
- if (getType() != null ? !getType().equals(that.getType()) : that.getType() != null) {
- return false;
+ @Override
+ public int hashCode() {
+ int result = getType() != null ? getType().hashCode() : 0;
+ result = 31 * result + (getInputs() != null ? getInputs().hashCode() : 0);
+ result = 31 * result + (getOperations() != null ? getOperations().hashCode() : 0);
+ return result;
}
- if (getInputs() != null ? !getInputs().equals(that.getInputs()) : that.getInputs() != null) {
- return false;
+
+ @Override
+ public void addOperation(String operationName, OperationDefinition operationDefinition) {
+ addOperation(operationName, (OperationDefinitionType) operationDefinition);
}
- return getOperations() != null ? getOperations().equals(that.getOperations())
- : that.getOperations() == null;
- }
-
- @Override
- public int hashCode() {
- int result = getType() != null ? getType().hashCode() : 0;
- result = 31 * result + (getInputs() != null ? getInputs().hashCode() : 0);
- result = 31 * result + (getOperations() != null ? getOperations().hashCode() : 0);
- return result;
- }
-
- @Override
- public void addOperation(String operationName, OperationDefinition operationDefinition) {
- addOperation(operationName, (OperationDefinitionType)operationDefinition);
- }
}
diff --git a/common/onap-tosca-datatype/src/main/resources/globalTypes/tosca/groups.yml b/common/onap-tosca-datatype/src/main/resources/globalTypes/tosca/groups.yml
index 0ddc15175c..907a9b8c22 100644
--- a/common/onap-tosca-datatype/src/main/resources/globalTypes/tosca/groups.yml
+++ b/common/onap-tosca-datatype/src/main/resources/globalTypes/tosca/groups.yml
@@ -26,5 +26,5 @@ group_types:
tosca.groups.Root:
description: This is the default (root) TOSCA Group Type definition that all other TOSCA base Group Types derive from.
interfaces:
- standard:
+ Standard:
type: tosca.interfaces.node.lifecycle.Standard