diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model')
38 files changed, 152 insertions, 2840 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java deleted file mode 100644 index 8461fef85f..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class ArtifactDefinition { - private String type; - private String file; - private String repository; - private String description; - private String deploy_path; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - - public String getRepository() { - return repository; - } - - public void setRepository(String repository) { - this.repository = repository; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getDeploy_path() { - return deploy_path; - } - - public void setDeploy_path(String deployPath) { - this.deploy_path = deployPath; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java deleted file mode 100644 index 80580e97f3..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java +++ /dev/null @@ -1,83 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class ArtifactType { - - private String derived_from; - private String version; - private String description; - private String mime_type; - private List<String> file_ext; - private Map<String, PropertyDefinition> properties; - - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getMime_type() { - return mime_type; - } - - public void setMime_type(String mimeType) { - this.mime_type = mimeType; - } - - public List<String> getFile_ext() { - return file_ext; - } - - public void setFile_ext(List<String> fileExt) { - this.file_ext = fileExt; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java deleted file mode 100644 index 13c93a283d..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java +++ /dev/null @@ -1,85 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class AttributeDefinition { - - private String type; - private String description; - private Object _default; - private Status status; - private EntrySchema entry_schema; - - public AttributeDefinition() { - status = Status.SUPPORTED; - } - - public EntrySchema getEntry_schema() { - return entry_schema; - } - - public void setEntry_schema(EntrySchema entrySchema) { - this.entry_schema = entrySchema; - } - - public Status getStatus() { - return status; - } - - public void setStatus(Status status) { - this.status = status; - } - - public Object get_default() { - return _default; - } - - public void set_default(Object defaultValue) { - this._default = defaultValue; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public AttributeDefinition clone() { - AttributeDefinition attributeDefinition = new AttributeDefinition(); - attributeDefinition.setType(this.getType()); - attributeDefinition.setDescription(this.getDescription()); - attributeDefinition.set_default(this.get_default()); - attributeDefinition.setStatus(this.getStatus()); - attributeDefinition.setEntry_schema(this.getEntry_schema().clone()); - return attributeDefinition; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java deleted file mode 100644 index b548f7855c..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.Map; - -public class CapabilityAssignment { - - private Map<String, Object> properties; - private Map<String, Object> attributes; - - public Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public Map<String, Object> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, Object> attributes) { - this.attributes = attributes; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java deleted file mode 100644 index 36dccad6eb..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java +++ /dev/null @@ -1,113 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.DataModelUtil; -import org.openecomp.sdc.tosca.services.ToscaConstants; - -import java.util.List; -import java.util.Map; - -public class CapabilityDefinition { - - private String type; - private String description; - private Map<String, PropertyDefinition> properties; - private Map<String, AttributeDefinition> attributes; - private List<String> valid_source_types; - private Object[] occurrences; - - - /** - * Instantiates a new Capability definition. - */ - public CapabilityDefinition() { - occurrences = new Object[2]; - occurrences[0] = 1; - occurrences[1] = ToscaConstants.UNBOUNDED; - } - - 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 Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } - - public Map<String, AttributeDefinition> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, AttributeDefinition> attributes) { - this.attributes = attributes; - } - - public List<String> getValid_source_types() { - return valid_source_types; - } - - public void setValid_source_types(List<String> validSourceTypes) { - this.valid_source_types = validSourceTypes; - } - - public Object[] getOccurrences() { - return occurrences; - } - - public void setOccurrences(Object[] occurrences) { - this.occurrences = occurrences; - } - - @Override - public CapabilityDefinition clone() { - CapabilityDefinition capabilityDefinition = new CapabilityDefinition(); - capabilityDefinition - .setOccurrences(new Object[]{this.getOccurrences()[0], this.getOccurrences()[1]}); - capabilityDefinition - .setProperties(DataModelUtil.clonePropertyDefinitions(this.getProperties())); - capabilityDefinition.setType(this.getType()); - capabilityDefinition - .setAttributes(DataModelUtil.cloneAttributeDefinitions(this.getAttributes())); - capabilityDefinition.setDescription(this.getDescription()); - capabilityDefinition - .setValid_source_types(DataModelUtil.cloneValidSourceTypes(this.getValid_source_types())); - return capabilityDefinition; - - } - -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java deleted file mode 100644 index 3678583384..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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 CapabilityFilterDefinition { - List<Constraint> properties; - - public List<Constraint> getProperties() { - return properties; - } - - public void setProperties(List<Constraint> properties) { - this.properties = properties; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java deleted file mode 100644 index b0281b4ca0..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java +++ /dev/null @@ -1,82 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class CapabilityType { - - private String derived_from; - private String version; - private String description; - private Map<String, PropertyDefinition> properties; - private Map<String, AttributeDefinition> attributes; - private List<String> valid_source_types; - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } - - public Map<String, AttributeDefinition> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, AttributeDefinition> attributes) { - this.attributes = attributes; - } - - public List<String> getValid_source_types() { - return valid_source_types; - } - - public void setValid_source_types(List<String> validSourceTypes) { - this.valid_source_types = validSourceTypes; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java deleted file mode 100644 index 2c39ce3902..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java +++ /dev/null @@ -1,181 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.ArrayList; -import java.util.List; - -public class Constraint { - private Object equal; - private Object greater_or_equal; - private Object greater_than; - private Object less_than; - private Object less_or_equal; - private Object[] in_range; - private List<Object> valid_values; - private Integer length; - private Integer min_length; - private Integer max_length; - private Object pattern; - - public Constraint() { - } - - public Object getGreater_or_equal() { - return greater_or_equal; - } - - public void setGreater_or_equal(Object greaterOrEqual) { - this.greater_or_equal = greaterOrEqual; - } - - public Object getEqual() { - return equal; - } - - public void setEqual(Object equal) { - this.equal = equal; - } - - public Object getGreater_than() { - return greater_than; - } - - public void setGreater_than(Object greaterThan) { - this.greater_than = greaterThan; - } - - public Object getLess_than() { - return less_than; - } - - public void setLess_than(Object lessThan) { - this.less_than = lessThan; - } - - public Object getLess_or_equal() { - return less_or_equal; - } - - public void setLess_or_equal(Object lessOrEqual) { - this.less_or_equal = lessOrEqual; - } - - public Object[] getIn_range() { - return in_range; - } - - /** - * Sets in range. - * - * @param inRange the in range - */ - public void setIn_range(Object[] inRange) { - this.in_range = new Object[2]; - this.in_range[0] = inRange[0]; - this.in_range[1] = inRange[1]; - } - - public List<Object> getValid_values() { - return valid_values; - } - - public void setValid_values(List<Object> validValues) { - this.valid_values = validValues; - } - - /** - * Add valid value. - * - * @param validValue the valid value - */ - public void addValidValue(Object validValue) { - if (this.valid_values == null) { - this.valid_values = new ArrayList<>(); - } - valid_values.add(validValue); - } - - public Integer getLength() { - return length; - } - - public void setLength(Integer length) { - this.length = length; - } - - public Integer getMin_length() { - return min_length; - } - - public void setMin_length(Integer minLength) { - this.min_length = minLength; - } - - public Integer getMax_length() { - return max_length; - } - - public void setMax_length(Integer maxLength) { - this.max_length = maxLength; - } - - public Object getPattern() { - return pattern; - } - - public void setPattern(Object pattern) { - this.pattern = pattern; - } - - @Override - public Constraint clone() { - Constraint constraint = new Constraint(); - constraint.setEqual(this.getEqual()); - constraint.setGreater_or_equal(this.getGreater_or_equal()); - constraint.setGreater_than(this.getGreater_than()); - cloneInRange(constraint); - constraint.setLength(this.getLength()); - constraint.setLess_or_equal(this.getLess_or_equal()); - constraint.setLess_than(this.getLess_than()); - constraint.setMax_length(this.getMax_length()); - constraint.setMin_length(this.getMin_length()); - constraint.setPattern(this.getPattern()); - cloneValidValues(constraint); - - return constraint; - } - - private void cloneInRange(Constraint constraint) { - if (this.getIn_range() != null) { - constraint.setIn_range(new Object[]{this.getIn_range()[0], this.getIn_range()[1]}); - } - } - - private void cloneValidValues(Constraint constraint) { - if (this.getValid_values() != null) { - constraint.setValid_values(new ArrayList<>()); - for (Object entry : this.getValid_values()) { - constraint.getValid_values().add(entry); - } - } - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java deleted file mode 100644 index 866c5774d8..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class DataType { - - private String derived_from; - private String version; - private String description; - private List<Constraint> constraints; - private Map<String, PropertyDefinition> properties; - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List<Constraint> getConstraints() { - return constraints; - } - - public void setConstraints(List<Constraint> constraints) { - this.constraints = constraints; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java deleted file mode 100644 index 078a6449ea..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public enum Directive { - - - SELECTABLE("selectable"), - SUBSTITUTABLE("substitutable"); - - private String displayName; - - Directive(String displayName) { - this.displayName = displayName; - } - - public String getDisplayName() { - return displayName; - } - - -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java deleted file mode 100644 index 8b08e54c01..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.DataModelUtil; - -import java.util.List; - -public class EntrySchema { - - private String description; - private String type; - private List<Constraint> constraints; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public List<Constraint> getConstraints() { - return constraints; - } - - public void setConstraints(List<Constraint> constraints) { - this.constraints = constraints; - } - - @Override - public EntrySchema clone() { - EntrySchema entrySchema = new EntrySchema(); - entrySchema.setDescription(this.getDescription()); - entrySchema.setType(this.getType()); - entrySchema.setConstraints(DataModelUtil.cloneConstraints(this.getConstraints())); - return entrySchema; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java deleted file mode 100644 index 807bf260c3..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class GroupDefinition { - - private String type; - private String description; - private Map<String, Object> properties; - private List<String> members; - - 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 Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public List<String> getMembers() { - return members; - } - - public void setMembers(List<String> members) { - this.members = members; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java deleted file mode 100644 index 4bbb861286..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java +++ /dev/null @@ -1,82 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class GroupType { - - private String derived_from; - private String version; - private String description; - private Map<String, PropertyDefinition> properties; - private List<String> members; - private Map<String, InterfaceDefinition> interfaces; - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } - - public List<String> getMembers() { - return members; - } - - public void setMembers(List<String> members) { - this.members = members; - } - - public Map<String, InterfaceDefinition> getInterfaces() { - return interfaces; - } - - public void setInterfaces(Map<String, InterfaceDefinition> interfaces) { - this.interfaces = interfaces; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java deleted file mode 100644 index 207a1b520a..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class Import { - - private String file; - private String repository; - private String namespace_uri; - private String namespace_prefix; - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - - public String getRepository() { - return repository; - } - - public void setRepository(String repository) { - this.repository = repository; - } - - public String getNamespace_uri() { - return namespace_uri; - } - - public void setNamespace_uri(String namespaceUri) { - this.namespace_uri = namespaceUri; - } - - public String getNamespace_prefix() { - return namespace_prefix; - } - - public void setNamespace_prefix(String namespacePrefix) { - this.namespace_prefix = namespacePrefix; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java deleted file mode 100644 index cf09510083..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class InterfaceDefinition { -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java deleted file mode 100644 index b177b0660a..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class InterfaceType { -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java deleted file mode 100644 index 162e693dba..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.Map; - -public class Metadata { - - private String template_name; - private String template_author; - private String template_version; - - - public String getTemplate_name() { - return template_name; - } - - public void setTemplate_name(String templateName) { - this.template_name = templateName; - } - - public String getTemplate_author() { - return template_author; - } - - public void setTemplate_author(String templateAuthor) { - this.template_author = templateAuthor; - } - - public String getTemplate_version() { - return template_version; - } - - public void setTemplate_version(String templateVersion) { - this.template_version = templateVersion; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java deleted file mode 100644 index d87dcd7b1d..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class NodeFilter { - - Map<String, List<Constraint>> properties; - Map<String, CapabilityFilterDefinition> capabilities; - - public Map<String, List<Constraint>> getProperties() { - - return properties; - } - - public void setProperties(Map<String, List<Constraint>> properties) { - this.properties = properties; - } - - public Map<String, CapabilityFilterDefinition> getCapabilities() { - return capabilities; - } - - public void setCapabilities(Map<String, CapabilityFilterDefinition> capabilities) { - this.capabilities = capabilities; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java deleted file mode 100644 index 41ac232605..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java +++ /dev/null @@ -1,127 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class NodeTemplate implements Template { - - private String type; - private String description; - private List<String> directives; - private Map<String, Object> properties; - private Map<String, Object> attributes; - private List<Map<String, RequirementAssignment>> requirements; - private List<Map<String, CapabilityAssignment>> capabilities; - private Map<String, InterfaceDefinition> interfaces; - private Map<String, ArtifactDefinition> artifacts; - private NodeFilter node_filter; - private String copy; - - 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 List<String> getDirectives() { - return directives; - } - - public void setDirectives(List<String> directives) { - this.directives = directives; - } - - public Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public Map<String, Object> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, Object> attributes) { - this.attributes = attributes; - } - - public List<Map<String, RequirementAssignment>> getRequirements() { - return requirements; - } - - public void setRequirements(List<Map<String, RequirementAssignment>> requirements) { - this.requirements = requirements; - } - - public List<Map<String, CapabilityAssignment>> getCapabilities() { - return capabilities; - } - - public void setCapabilities(List<Map<String, CapabilityAssignment>> capabilities) { - this.capabilities = capabilities; - } - - public Map<String, InterfaceDefinition> getInterfaces() { - return interfaces; - } - - public void setInterfaces(Map<String, InterfaceDefinition> interfaces) { - this.interfaces = interfaces; - } - - public Map<String, ArtifactDefinition> getArtifacts() { - return artifacts; - } - - public void setArtifacts(Map<String, ArtifactDefinition> artifacts) { - this.artifacts = artifacts; - } - - public NodeFilter getNode_filter() { - return node_filter; - } - - public void setNode_filter(NodeFilter nodeFilter) { - this.node_filter = nodeFilter; - } - - public String getCopy() { - return copy; - } - - public void setCopy(String copy) { - this.copy = copy; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java deleted file mode 100644 index d477f286ee..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java +++ /dev/null @@ -1,125 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class NodeType { - - private String derived_from; - private String version; - private String description; - private Map<String, PropertyDefinition> properties; - private Map<String, AttributeDefinition> attributes; - private List<Map<String, RequirementDefinition>> requirements; - private Map<String, CapabilityDefinition> capabilities; - private Map<String, InterfaceDefinition> interfaces; - private Map<String, ArtifactDefinition> artifacts; - - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } - - public Map<String, AttributeDefinition> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, AttributeDefinition> attributes) { - this.attributes = attributes; - } - - public List<Map<String, RequirementDefinition>> getRequirements() { - return requirements; - } - - public void setRequirements(List<Map<String, RequirementDefinition>> requirements) { - this.requirements = requirements; - } - - public Map<String, CapabilityDefinition> getCapabilities() { - return capabilities; - } - - public void setCapabilities(Map<String, CapabilityDefinition> capabilities) { - this.capabilities = capabilities; - } - - public Map<String, InterfaceDefinition> getInterfaces() { - return interfaces; - } - - public void setInterfaces(Map<String, InterfaceDefinition> interfaces) { - this.interfaces = interfaces; - } - - public Map<String, ArtifactDefinition> getArtifacts() { - return artifacts; - } - - public void setArtifacts(Map<String, ArtifactDefinition> artifacts) { - this.artifacts = artifacts; - } - - @Override - public NodeType clone() { - NodeType clone = new NodeType(); - clone.setCapabilities(this.getCapabilities()); - clone.setDerived_from(this.getDerived_from()); - clone.setProperties(this.getProperties()); - clone.setRequirements(this.getRequirements()); - clone.setDescription(this.getDescription()); - clone.setAttributes(this.getAttributes()); - clone.setInterfaces(this.getInterfaces()); - clone.setVersion(this.getVersion()); - clone.setArtifacts(this.getArtifacts()); - return clone; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Old1610ServiceTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Old1610ServiceTemplate.java new file mode 100644 index 0000000000..2ee7bca5bc --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Old1610ServiceTemplate.java @@ -0,0 +1,152 @@ +package org.openecomp.sdc.tosca.datatypes.model; + +import org.openecomp.sdc.tosca.datatypes.model.ArtifactType; +import org.openecomp.sdc.tosca.datatypes.model.CapabilityType; +import org.openecomp.sdc.tosca.datatypes.model.DataType; +import org.openecomp.sdc.tosca.datatypes.model.GroupType; +import org.openecomp.sdc.tosca.datatypes.model.Import; +import org.openecomp.sdc.tosca.datatypes.model.InterfaceType; +import org.openecomp.sdc.tosca.datatypes.model.NodeType; +import org.openecomp.sdc.tosca.datatypes.model.PolicyType; +import org.openecomp.sdc.tosca.datatypes.model.RelationshipType; +import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; +import org.openecomp.sdc.tosca.datatypes.model.Template; +import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate; + +import java.util.List; +import java.util.Map; + +/** + * Created by Talio on 3/30/2017. + */ +public class Old1610ServiceTemplate { + + private String tosca_definitions_version; + private Map<String, String> metadata; + private String description; + private Map<String, Import> imports; + private Map<String, ArtifactType> artifact_types; + private Map<String, DataType> data_types; + private Map<String, CapabilityType> capability_types; + private Map<String, Object> interface_types; + private Map<String, RelationshipType> relationship_types; + private Map<String, NodeType> node_types; + private Map<String, GroupType> group_types; + private Map<String, PolicyType> policy_types; + private TopologyTemplate topology_template; + + public String getTosca_definitions_version() { + return tosca_definitions_version; + } + + public void setTosca_definitions_version(String tosca_definitions_version) { + this.tosca_definitions_version = tosca_definitions_version; + } + + public Map<String, String> getMetadata() { + return metadata; + } + + public void setMetadata(Map<String, String> metadata) { + this.metadata = metadata; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public Map<String, Import> getImports() { + return this.imports; + } + + public void setImports( + Map<String, Import> imports) { + this.imports = imports; + } + + public Map<String, ArtifactType> getArtifact_types() { + return artifact_types; + } + + public void setArtifact_types( + Map<String, ArtifactType> artifact_types) { + this.artifact_types = artifact_types; + } + + public Map<String, DataType> getData_types() { + return data_types; + } + + public void setData_types( + Map<String, DataType> data_types) { + this.data_types = data_types; + } + + public Map<String, CapabilityType> getCapability_types() { + return capability_types; + } + + public void setCapability_types( + Map<String, CapabilityType> capability_types) { + this.capability_types = capability_types; + } + + public Map<String, Object> getInterface_types() { + return interface_types; + } + + public void setInterface_types(Map<String, Object> interface_types) { + this.interface_types = interface_types; + } + + public Map<String, RelationshipType> getRelationship_types() { + return relationship_types; + } + + public void setRelationship_types( + Map<String, RelationshipType> relationship_types) { + this.relationship_types = relationship_types; + } + + public Map<String, NodeType> getNode_types() { + return node_types; + } + + public void setNode_types( + Map<String, NodeType> node_types) { + this.node_types = node_types; + } + + public Map<String, GroupType> getGroup_types() { + return group_types; + } + + public void setGroup_types( + Map<String, GroupType> group_types) { + this.group_types = group_types; + } + + public Map<String, PolicyType> getPolicy_types() { + return policy_types; + } + + public void setPolicy_types( + Map<String, PolicyType> policy_types) { + this.policy_types = policy_types; + } + + public TopologyTemplate getTopology_template() { + return topology_template; + } + + public void setTopology_template( + TopologyTemplate topology_template) { + this.topology_template = topology_template; + } +} + diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java deleted file mode 100644 index 6ef4c782f5..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java +++ /dev/null @@ -1,99 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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 { - - 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 defaultValue) { - this._default = defaultValue; - } - - 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 entrySchema) { - this.entry_schema = entrySchema; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java deleted file mode 100644 index 90f44ae36a..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class PolicyDefinition implements Template { - private String type; - private String description; - private Map<String, Object> properties; - private List<String> targets; - - 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 Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public List<String> getTargets() { - return targets; - } - - public void setTargets(List<String> targets) { - this.targets = targets; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java deleted file mode 100644 index 07412cda59..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class PolicyType { - - private String derived_from; - private String version; - private String description; - private Map<String, PropertyDefinition> properties; - private List<String> targets; - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } - - public List<String> getTargets() { - return targets; - } - - public void setTargets(List<String> targets) { - this.targets = targets; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java deleted file mode 100644 index cf47d0b113..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.DataModelUtil; - -import java.util.List; - -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 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 defaultValue) { - this._default = defaultValue; - } - - 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 entrySchema) { - this.entry_schema = entrySchema; - } - - @Override - public PropertyDefinition clone() { - PropertyDefinition propertyDefinition = new PropertyDefinition(); - propertyDefinition.setType(this.getType()); - propertyDefinition.setDescription(this.getDescription()); - propertyDefinition.setRequired(this.getRequired()); - propertyDefinition.set_default(this.get_default()); - propertyDefinition.setStatus(this.getStatus()); - propertyDefinition.setEntry_schema(this.getEntry_schema().clone()); - propertyDefinition.setConstraints(DataModelUtil.cloneConstraints(this.getConstraints())); - return propertyDefinition; - } - - -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java deleted file mode 100644 index 3fdd9bba0e..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java +++ /dev/null @@ -1,117 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * The enum Property type. - */ -public enum PropertyType { - - /** - * String property type. - */ - STRING("string"), - /** - * Integer property type. - */ - INTEGER("integer"), - /** - * Float property type. - */ - FLOAT("float"), - /** - * Boolean property type. - */ - BOOLEAN("boolean"), - /** - * Timestamp property type. - */ - TIMESTAMP("timestamp"), - /** - * Null property type. - */ - NULL("null"), - /** - * Map property type. - */ - MAP("map"), - /** - * List property type. - */ - LIST("list"), - /** - * Scalar unit size property type. - */ - SCALAR_UNIT_SIZE("scalar-unit.size"); - - private static final Map<String, PropertyType> mMap = - Collections.unmodifiableMap(initializeMapping()); - private String displayName; - - PropertyType(String displayName) { - - this.displayName = displayName; - } - - /** - * Initialize mapping map. - * - * @return the map - */ - public static Map<String, PropertyType> initializeMapping() { - Map<String, PropertyType> typeMap = new HashMap<String, PropertyType>(); - for (PropertyType v : PropertyType.values()) { - typeMap.put(v.displayName, v); - } - return typeMap; - } - - /** - * Gets property type by display name. - * - * @param displayName the display name - * @return the property type by display name - */ - public static PropertyType getPropertyTypeByDisplayName(String displayName) { - if (mMap == null) { - initializeMapping(); - } - if (mMap.containsKey(displayName)) { - return mMap.get(displayName); - } - return null; - } - - /** - * Gets display name. - * - * @return the display name - */ - public String getDisplayName() { - return displayName; - } - - -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java deleted file mode 100644 index c3a1195565..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java +++ /dev/null @@ -1,99 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.Map; - -public class RelationshipTemplate implements Template { - - private String type; - private String description; - private Map<String, Object> properties; - private Map<String, Object> attributes; - private Map<String, RequirementAssignment> requirements; - private Map<String, CapabilityAssignment> capabilities; - private Map<String, InterfaceDefinition> interfaces; - private String copy; - - 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 Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public Map<String, Object> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, Object> attributes) { - this.attributes = attributes; - } - - public Map<String, RequirementAssignment> getRequirements() { - return requirements; - } - - public void setRequirements(Map<String, RequirementAssignment> requirements) { - this.requirements = requirements; - } - - public Map<String, CapabilityAssignment> getCapabilities() { - return capabilities; - } - - public void setCapabilities(Map<String, CapabilityAssignment> capabilities) { - this.capabilities = capabilities; - } - - public Map<String, InterfaceDefinition> getInterfaces() { - return interfaces; - } - - public void setInterfaces(Map<String, InterfaceDefinition> interfaces) { - this.interfaces = interfaces; - } - - public String getCopy() { - return copy; - } - - public void setCopy(String copy) { - this.copy = copy; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java deleted file mode 100644 index 173a8a0f64..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class RelationshipType { - - private String derived_from; - private String version; - private String description; - private Map<String, PropertyDefinition> properties; - private Map<String, AttributeDefinition> attributes; - private Map<String, InterfaceDefinition> interfaces; - private List<String> valid_target_types; - //An optional list of one or more names of Capability Types that are valid targets - //for this relationship - - public String getDerived_from() { - return derived_from; - } - - public void setDerived_from(String derivedFrom) { - this.derived_from = derivedFrom; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, PropertyDefinition> getProperties() { - return properties; - } - - public void setProperties(Map<String, PropertyDefinition> properties) { - this.properties = properties; - } - - public Map<String, AttributeDefinition> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, AttributeDefinition> attributes) { - this.attributes = attributes; - } - - public Map<String, InterfaceDefinition> getInterfaces() { - return interfaces; - } - - public void setInterfaces(Map<String, InterfaceDefinition> interfaces) { - this.interfaces = interfaces; - } - - public List<String> getValid_target_types() { - return valid_target_types; - } - - public void setValid_target_types(List<String> validTargetTypes) { - this.valid_target_types = validTargetTypes; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java deleted file mode 100644 index 445063a3ed..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java +++ /dev/null @@ -1,70 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class RequirementAssignment { - - private String capability; - private String node; - private String relationship; - private NodeFilter node_filter; - private Object[] occurrences; - - public String getCapability() { - return capability; - } - - public void setCapability(String capability) { - this.capability = capability; - } - - public String getNode() { - return node; - } - - public void setNode(String node) { - this.node = node; - } - - public String getRelationship() { - return relationship; - } - - public void setRelationship(String relationship) { - this.relationship = relationship; - } - - public NodeFilter getNode_filter() { - return node_filter; - } - - public void setNode_filter(NodeFilter nodeFilter) { - this.node_filter = nodeFilter; - } - - public Object[] getOccurrences() { - return occurrences; - } - - public void setOccurrences(Object[] occurrences) { - this.occurrences = occurrences; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java deleted file mode 100644 index fe3238f1b5..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java +++ /dev/null @@ -1,82 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class RequirementDefinition { - - private String capability; - private String node; - private String relationship; - private Object[] occurrences; - - /** - * Instantiates a new Requirement definition. - */ - public RequirementDefinition() { - occurrences = new Object[2]; - occurrences[0] = 1; - occurrences[1] = 1; - } - - public String getCapability() { - return capability; - } - - public void setCapability(String capability) { - this.capability = capability; - } - - public String getNode() { - return node; - } - - public void setNode(String node) { - this.node = node; - } - - public String getRelationship() { - return relationship; - } - - public void setRelationship(String relationship) { - this.relationship = relationship; - } - - public Object[] getOccurrences() { - return occurrences; - } - - public void setOccurrences(Object[] occurrences) { - this.occurrences = occurrences; - } - - @Override - public RequirementDefinition clone() { - RequirementDefinition requirementDefinition = new RequirementDefinition(); - requirementDefinition.setNode(this.getNode()); - requirementDefinition.setRelationship(this.getRelationship()); - requirementDefinition.setCapability(this.getCapability()); - requirementDefinition - .setOccurrences(new Object[]{this.getOccurrences()[0], this.getOccurrences()[1]}); - return requirementDefinition; - } - -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java deleted file mode 100644 index 619ac510b0..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public class Scalar { - - private Float value; - - public Float getValue() { - return value; - } - - public void setValue(Float value) { - this.value = value; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java deleted file mode 100644 index 98da0104b8..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java +++ /dev/null @@ -1,144 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.Map; - -public class ServiceTemplate implements Template { - - private String tosca_definitions_version; - private Metadata metadata; - private String description; - private Map<String, Import> imports; - private Map<String, ArtifactType> artifact_types; - private Map<String, DataType> data_types; - private Map<String, CapabilityType> capability_types; - private Map<String, InterfaceType> interface_types; - private Map<String, RelationshipType> relationship_types; - private Map<String, NodeType> node_types; - private Map<String, GroupType> group_types; - private Map<String, PolicyType> policy_types; - private TopologyTemplate topology_template; - - public String getTosca_definitions_version() { - return tosca_definitions_version; - } - - public void setTosca_definitions_version(String toscaDefinitionsVersion) { - this.tosca_definitions_version = toscaDefinitionsVersion; - } - - public Metadata getMetadata() { - return metadata; - } - - public void setMetadata(Metadata metadata) { - this.metadata = metadata; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, Import> getImports() { - return imports; - } - - public void setImports(Map<String, Import> imports) { - this.imports = imports; - } - - public Map<String, ArtifactType> getArtifact_types() { - return artifact_types; - } - - public void setArtifact_types(Map<String, ArtifactType> artifactTypes) { - this.artifact_types = artifactTypes; - } - - public Map<String, DataType> getData_types() { - return data_types; - } - - public void setData_types(Map<String, DataType> dataTypes) { - this.data_types = dataTypes; - } - - public Map<String, CapabilityType> getCapability_types() { - return capability_types; - } - - public void setCapability_types(Map<String, CapabilityType> capabilityTypes) { - this.capability_types = capabilityTypes; - } - - public Map<String, RelationshipType> getRelationship_types() { - return relationship_types; - } - - public void setRelationship_types(Map<String, RelationshipType> relationshipTypes) { - this.relationship_types = relationshipTypes; - } - - public Map<String, NodeType> getNode_types() { - return node_types; - } - - public void setNode_types(Map<String, NodeType> nodeTypes) { - this.node_types = nodeTypes; - } - - public Map<String, GroupType> getGroup_types() { - return group_types; - } - - public void setGroup_types(Map<String, GroupType> groupTypes) { - this.group_types = groupTypes; - } - - public Map<String, InterfaceType> getInterface_types() { - return interface_types; - } - - public void setInterface_types(Map<String, InterfaceType> interfaceTypes) { - this.interface_types = interfaceTypes; - } - - public Map<String, PolicyType> getPolicy_types() { - return policy_types; - } - - public void setPolicy_types(Map<String, PolicyType> policyTypes) { - this.policy_types = policyTypes; - } - - public TopologyTemplate getTopology_template() { - return topology_template; - } - - public void setTopology_template(TopologyTemplate topologyTemplate) { - this.topology_template = topologyTemplate; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java deleted file mode 100644 index 0805982a54..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.Map; - -public enum Status { - - SUPPORTED("supported"), - UNSUPPORTED("unsupported"), - EXPERIMENTAL("experimental"), - DEPRECATED("deprecated"),; - private String displayName; - - Status(String displayName) { - this.displayName = displayName; - } - - public String getDisplayName() { - return displayName; - } - - -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java deleted file mode 100644 index 50c262dc42..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; -import java.util.Map; - -public class SubstitutionMapping { - private String node_type; - private Map<String, List<String>> capabilities; - private Map<String, List<String>> requirements; - - public String getNode_type() { - return node_type; - } - - public void setNode_type(String nodeType) { - this.node_type = nodeType; - } - - public Map<String, List<String>> getRequirements() { - return requirements; - } - - public void setRequirements(Map<String, List<String>> requirements) { - this.requirements = requirements; - } - - public Map<String, List<String>> getCapabilities() { - return capabilities; - } - - public void setCapabilities(Map<String, List<String>> capabilities) { - this.capabilities = capabilities; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java deleted file mode 100644 index 128bb3c0a9..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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; - -public interface Template { -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java deleted file mode 100644 index 288242946a..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java +++ /dev/null @@ -1,114 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.HashMap; -import java.util.Map; -import java.util.Objects; - -public class TopologyTemplate { - - private String description; - private Map<String, ParameterDefinition> inputs; - private Map<String, NodeTemplate> node_templates; - private Map<String, RelationshipTemplate> relationship_templates; - private Map<String, GroupDefinition> groups; - private Map<String, ParameterDefinition> outputs; - private SubstitutionMapping substitution_mappings; - private Map<String, PolicyDefinition> policies; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, ParameterDefinition> getInputs() { - return inputs; - } - - public void setInputs(Map<String, ParameterDefinition> inputs) { - this.inputs = inputs; - } - - public Map<String, NodeTemplate> getNode_templates() { - return node_templates; - } - - public void setNode_templates(Map<String, NodeTemplate> nodeTemplates) { - this.node_templates = nodeTemplates; - } - - public Map<String, RelationshipTemplate> getRelationship_templates() { - return relationship_templates; - } - - public void setRelationship_templates(Map<String, RelationshipTemplate> relationshipTemplates) { - this.relationship_templates = relationshipTemplates; - } - - public Map<String, GroupDefinition> getGroups() { - return groups; - } - - public void setGroups(Map<String, GroupDefinition> groups) { - this.groups = groups; - } - - /** - * Add group. - * - * @param groupKey the group key - * @param groupDefinition the group definition - */ - public void addGroup(String groupKey, GroupDefinition groupDefinition) { - if (Objects.isNull(this.groups)) { - this.groups = new HashMap<>(); - } - this.groups.put(groupKey, groupDefinition); - } - - public Map<String, ParameterDefinition> getOutputs() { - return outputs; - } - - public void setOutputs(Map<String, ParameterDefinition> outputs) { - this.outputs = outputs; - } - - public SubstitutionMapping getSubstitution_mappings() { - return substitution_mappings; - } - - public void setSubstitution_mappings(SubstitutionMapping substitutionMapping) { - this.substitution_mappings = substitutionMapping; - } - - public Map<String, PolicyDefinition> getPolicies() { - return policies; - } - - public void setPolicies(Map<String, PolicyDefinition> policies) { - this.policies = policies; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java deleted file mode 100644 index bde81108de..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.heatextend; - - -import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition; - -public class ParameterDefinitionExt extends ParameterDefinition { - - String label; - Boolean hidden; - Boolean immutable; - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public Boolean getHidden() { - return hidden; - } - - public void setHidden(Boolean hidden) { - this.hidden = hidden; - } - - public Boolean getImmutable() { - return immutable; - } - - public void setImmutable(Boolean immutable) { - this.immutable = immutable; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java deleted file mode 100644 index f92d674070..0000000000 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java +++ /dev/null @@ -1,85 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.heatextend; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * The enum Property type ext. - */ -public enum PropertyTypeExt { - - /** - * Json property type ext. - */ - JSON("json"); - - private static final Map<String, PropertyTypeExt> mMap = - Collections.unmodifiableMap(initializeMapping()); - private String displayName; - - PropertyTypeExt(String displayName) { - - this.displayName = displayName; - } - - /** - * Initialize mapping map. - * - * @return the map - */ - public static Map<String, PropertyTypeExt> initializeMapping() { - Map<String, PropertyTypeExt> typeMap = new HashMap<String, PropertyTypeExt>(); - for (PropertyTypeExt v : PropertyTypeExt.values()) { - typeMap.put(v.displayName, v); - } - return typeMap; - } - - /** - * Gets property type by display name. - * - * @param displayName the display name - * @return the property type by display name - */ - public static PropertyTypeExt getPropertyTypeByDisplayName(String displayName) { - if (mMap == null) { - initializeMapping(); - } - if (mMap.containsKey(displayName)) { - return mMap.get(displayName); - } - return null; - } - - /** - * Gets display name. - * - * @return the display name - */ - public String getDisplayName() { - return displayName; - } - - -} |