Refactor models for common type handling 67/118767/1
authorliamfallon <liam.fallon@est.tech>
Tue, 2 Mar 2021 10:55:31 +0000 (10:55 +0000)
committerliamfallon <liam.fallon@est.tech>
Wed, 3 Mar 2021 18:09:26 +0000 (18:09 +0000)
commited11e882d9128616156a2be08744e5a9bdb01111
treeeaa79473e7dea79813062dcfa31330a8722233da
parentfcbf3698fa3e3fbc6ea3364d80d4a3f3a8d37650
Refactor models for common type handling

Currently we have handling for "type" and "type_version" on TOSCA Policy
class. However, the concept of a "type" and "type_version" also exists
on the ToscaCapabilityAssignment, the ToscaNodeTemplate, and the
ToscaRequriement classes.

This review makes the type handling on Policy generic, thus extending it
to the other three types.

Issue-ID: POLICY-2983
Change-Id: Ia20e3a8c485f4841257075df08e0784eac415770
Signed-off-by: liamfallon <liam.fallon@est.tech>
16 files changed:
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaCapabilityAssignment.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaNodeTemplate.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicy.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaRequirement.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaWithTypeAndObjectProperties.java [moved from models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaWithObjectProperties.java with 60% similarity]
models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaCapabilityAssignment.java
models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaNodeTemplate.java
models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java
models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaRequirement.java
models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithTypeAndStringProperties.java [moved from models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithStringProperties.java with 57% similarity]
models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java
models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaWithTypeAndObjectPropertiesTest.java [moved from models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaWithObjectPropertiesTest.java with 73% similarity]
models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaCapabilityAssignmentTest.java
models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTest.java
models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithStringPropertiesTest.java
models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java