diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2018-09-04 22:11:04 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2018-09-04 22:14:49 -0400 |
commit | 915e7b8e2b04a7418561d0e67aecb80d18b9ba1d (patch) | |
tree | 19f0def5b00e7c128de58112ca16040f80f9e6c1 /blueprints-processor/plugin/model-provider/src | |
parent | c09c0fa4ef4c1cd7e7e28a12c9469b783b75d4d8 (diff) |
SDN Controller Blueprints Processor Model Beans
Creating SDN Controller Blueprints Processor Model Java Beans to Parse Model
Change-Id: Ib0d1425d0e814ffecf4ce0d1798dd607aa3e2af0
Issue-ID: CCSDK-494
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Diffstat (limited to 'blueprints-processor/plugin/model-provider/src')
26 files changed, 2265 insertions, 0 deletions
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactDefinition.java new file mode 100644 index 000000000..7fcd79066 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactDefinition.java @@ -0,0 +1,105 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * ArtifactDefinition.java Purpose: Provide ArtifactDefinition TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class ArtifactDefinition {
+ @JsonIgnore
+ private String id;
+ private String type;
+ private String file;
+ private String repository;
+ private String description;
+ @JsonProperty("deploy_Path")
+ private String deployPath;
+ // Used for Template Type
+ private String content;
+ private String mappingContent;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ 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 getDeployPath() {
+ return deployPath;
+ }
+
+ public void setDeployPath(String deployPath) {
+ this.deployPath = deployPath;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public String getMappingContent() {
+ return mappingContent;
+ }
+
+ public void setMappingContent(String mappingContent) {
+ this.mappingContent = mappingContent;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactType.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactType.java new file mode 100644 index 000000000..b651b54fd --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactType.java @@ -0,0 +1,102 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ArtifactType {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private String version;
+ private Map<String, String> metadata;
+ @JsonProperty("derived_from")
+ private String derivedFrom;
+ private Map<String, PropertyDefinition> properties;
+ @JsonProperty("mime_type")
+ private String mimeType;
+ @JsonProperty("file_ext")
+ private List<String> fileExt;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public Map<String, String> getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map<String, String> metadata) {
+ this.metadata = metadata;
+ }
+
+ public String getDerivedFrom() {
+ return derivedFrom;
+ }
+
+ public void setDerivedFrom(String derivedFrom) {
+ this.derivedFrom = derivedFrom;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ public void setMimeType(String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ public List<String> getFileExt() {
+ return fileExt;
+ }
+
+ public void setFileExt(List<String> fileExt) {
+ this.fileExt = fileExt;
+ }
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityAssignment.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityAssignment.java new file mode 100644 index 000000000..45c79fb4d --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityAssignment.java @@ -0,0 +1,49 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * CapabilityAssignment.java Purpose: Provide CapabilityAssignment TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class CapabilityAssignment {
+ @JsonIgnore
+ private String id;
+ private Map<String, Object> properties;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityDefinition.java new file mode 100644 index 000000000..b64fa5eaa --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityDefinition.java @@ -0,0 +1,88 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * CapabilityDefinition.java Purpose: Provide CapabilityDefinition TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class CapabilityDefinition {
+ @JsonIgnore
+ private String id;
+ private String type;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ @JsonProperty("valid_source_types")
+ private List<String> validSourceTypes;
+ private List<Object> occurrences;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ 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 List<String> getValidSourceTypes() {
+ return validSourceTypes;
+ }
+
+ public void setValidSourceTypes(List<String> validSourceTypes) {
+ this.validSourceTypes = validSourceTypes;
+ }
+
+ public List<Object> getOccurrences() {
+ return occurrences;
+ }
+
+ public void setOccurrences(List<Object> occurrences) {
+ this.occurrences = occurrences;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ConstraintClause.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ConstraintClause.java new file mode 100644 index 000000000..12842b537 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ConstraintClause.java @@ -0,0 +1,150 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * ConstraintClause.java Purpose: 3.5.2 Constraint clause.
+ *
+ * @version 1.0
+ */
+public class ConstraintClause {
+ @JsonProperty("equal")
+ private Object equal;
+
+ @JsonProperty("greater_than")
+ private Object greaterThan;
+
+ @JsonProperty("greater_or_equal")
+ private Object greaterOrEqual;
+
+ @JsonProperty("less_than")
+ private Object lessThan;
+
+ @JsonProperty("less_or_equal")
+ private Object lessOrEqual;
+
+ @JsonProperty("in_range")
+ private Object inRange;
+
+ @JsonProperty("valid_values")
+ private List<Object> validValues;
+
+ @JsonProperty("length")
+ private Object length;
+
+ @JsonProperty("min_length")
+ private Object minLength;
+
+ @JsonProperty("max_length")
+ private Object maxLength;
+
+ @JsonProperty("pattern")
+ private String pattern;
+
+ public Object getEqual() {
+ return equal;
+ }
+
+ public void setEqual(Object equal) {
+ this.equal = equal;
+ }
+
+ public Object getGreaterThan() {
+ return greaterThan;
+ }
+
+ public void setGreaterThan(Object greaterThan) {
+ this.greaterThan = greaterThan;
+ }
+
+ public Object getGreaterOrEqual() {
+ return greaterOrEqual;
+ }
+
+ public void setGreaterOrEqual(Object greaterOrEqual) {
+ this.greaterOrEqual = greaterOrEqual;
+ }
+
+ public Object getLessThan() {
+ return lessThan;
+ }
+
+ public void setLessThan(Object lessThan) {
+ this.lessThan = lessThan;
+ }
+
+ public Object getLessOrEqual() {
+ return lessOrEqual;
+ }
+
+ public void setLessOrEqual(Object lessOrEqual) {
+ this.lessOrEqual = lessOrEqual;
+ }
+
+ public Object getInRange() {
+ return inRange;
+ }
+
+ public void setInRange(Object inRange) {
+ this.inRange = inRange;
+ }
+
+ public List<Object> getValidValues() {
+ return validValues;
+ }
+
+ public void setValidValues(List<Object> validValues) {
+ this.validValues = validValues;
+ }
+
+ public Object getLength() {
+ return length;
+ }
+
+ public void setLength(Object length) {
+ this.length = length;
+ }
+
+ public Object getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(Object minLength) {
+ this.minLength = minLength;
+ }
+
+ public Object getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(Object maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public String getPattern() {
+ return pattern;
+ }
+
+ public void setPattern(String pattern) {
+ this.pattern = pattern;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/DataType.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/DataType.java new file mode 100644 index 000000000..2a3bfa84f --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/DataType.java @@ -0,0 +1,88 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * DataType.java Purpose: Provide DataType TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class DataType {
+ @JsonIgnore
+ private String id;
+ private String version;
+ private String description;
+ @JsonProperty("derived_from")
+ private String derivedFrom;
+ private List<Map<String, Object>> constraints;
+ private Map<String, PropertyDefinition> properties;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ 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 getDerivedFrom() {
+ return derivedFrom;
+ }
+
+ public void setDerivedFrom(String derivedFrom) {
+ this.derivedFrom = derivedFrom;
+ }
+
+ public List<Map<String, Object>> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Map<String, Object>> constraints) {
+ this.constraints = constraints;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/EntrySchema.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/EntrySchema.java new file mode 100644 index 000000000..b98cfd338 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/EntrySchema.java @@ -0,0 +1,36 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+/**
+ * EntrySchema.java Purpose: Provide EntrySchema TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class EntrySchema {
+ private String type;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Implementation.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Implementation.java new file mode 100644 index 000000000..016a8cfa0 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Implementation.java @@ -0,0 +1,49 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Implementation.java Purpose: Provide Operation Implementation TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class Implementation {
+ @JsonIgnore
+ private String primary;
+ private List<String> dependencies;
+
+ public String getPrimary() {
+ return primary;
+ }
+
+ public void setPrimary(String primary) {
+ this.primary = primary;
+ }
+
+ public List<String> getDependencies() {
+ return dependencies;
+ }
+
+ public void setDependencies(List<String> dependencies) {
+ this.dependencies = dependencies;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceAssignment.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceAssignment.java new file mode 100644 index 000000000..fc7f56f71 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceAssignment.java @@ -0,0 +1,58 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * InterfaceAssignment.java Purpose: Provide InterfaceAssignment TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class InterfaceAssignment {
+ @JsonIgnore
+ private String id;
+ private String type;
+ private Map<String, OperationAssignment> operations;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Map<String, OperationAssignment> getOperations() {
+ return operations;
+ }
+
+ public void setOperations(Map<String, OperationAssignment> operations) {
+ this.operations = operations;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceDefinition.java new file mode 100644 index 000000000..d3cbbd539 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceDefinition.java @@ -0,0 +1,58 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * InterfaceAssignment.java Purpose: Provide InterfaceAssignment TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class InterfaceDefinition {
+ @JsonIgnore
+ private String id;
+ private String type;
+ private Map<String, OperationDefinition> operations;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Map<String, OperationDefinition> getOperations() {
+ return operations;
+ }
+
+ public void setOperations(Map<String, OperationDefinition> operations) {
+ this.operations = operations;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeTemplate.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeTemplate.java new file mode 100644 index 000000000..489a89b65 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeTemplate.java @@ -0,0 +1,112 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * NodeTemplate.java Purpose: Provide NodeTemplate TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class NodeTemplate {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private String type;
+ private Map<String, String> metadata;
+ private Map<String, Object> properties;
+ private Map<String, InterfaceAssignment> interfaces;
+ private Map<String, ArtifactDefinition> artifacts;
+ private Map<String, CapabilityAssignment> capabilities;
+ private Map<String, RequirementAssignment> requirements;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ 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 Map<String, String> getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map<String, String> metadata) {
+ this.metadata = metadata;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, InterfaceAssignment> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceAssignment> interfaces) {
+ this.interfaces = interfaces;
+ }
+
+ public Map<String, ArtifactDefinition> getArtifacts() {
+ return artifacts;
+ }
+
+ public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ public Map<String, CapabilityAssignment> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, CapabilityAssignment> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ public Map<String, RequirementAssignment> getRequirements() {
+ return requirements;
+ }
+
+ public void setRequirements(Map<String, RequirementAssignment> requirements) {
+ this.requirements = requirements;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeType.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeType.java new file mode 100644 index 000000000..5d55846ad --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeType.java @@ -0,0 +1,114 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * NodeType.java Purpose: Provide NodeType TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class NodeType {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private String version;
+ private Map<String, String> metadata;
+ @JsonProperty("derived_from")
+ private String derivedFrom;
+ private Map<String, PropertyDefinition> properties;
+ private Map<String, CapabilityDefinition> capabilities;
+ private Map<String, RequirementDefinition> requirements;
+ private Map<String, InterfaceDefinition> interfaces;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public Map<String, String> getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map<String, String> metadata) {
+ this.metadata = metadata;
+ }
+
+ public String getDerivedFrom() {
+ return derivedFrom;
+ }
+
+ public void setDerivedFrom(String derivedFrom) {
+ this.derivedFrom = derivedFrom;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, CapabilityDefinition> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, CapabilityDefinition> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ public Map<String, RequirementDefinition> getRequirements() {
+ return requirements;
+ }
+
+ public void setRequirements(Map<String, RequirementDefinition> requirements) {
+ this.requirements = requirements;
+ }
+
+ public Map<String, InterfaceDefinition> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
+ this.interfaces = interfaces;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationAssignment.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationAssignment.java new file mode 100644 index 000000000..8df81f5f5 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationAssignment.java @@ -0,0 +1,76 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * OperationAssignment.java Purpose: Provide OperationAssignment TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class OperationAssignment {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private String implementation;
+ private Map<String, Object> inputs;
+ private Map<String, Object> outputs;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getImplementation() {
+ return implementation;
+ }
+
+ public void setImplementation(String implementation) {
+ this.implementation = implementation;
+ }
+
+ public Map<String, Object> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(Map<String, Object> inputs) {
+ this.inputs = inputs;
+ }
+
+ public Map<String, Object> getOutputs() {
+ return outputs;
+ }
+
+ public void setOutputs(Map<String, Object> outputs) {
+ this.outputs = outputs;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationDefinition.java new file mode 100644 index 000000000..9a1d3ddc4 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationDefinition.java @@ -0,0 +1,76 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * OperationDefinition.java Purpose: Provide OperationDefinition TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class OperationDefinition {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private Implementation implementation;
+ private Map<String, PropertyDefinition> inputs;
+ private Map<String, PropertyDefinition> outputs;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Implementation getImplementation() {
+ return implementation;
+ }
+
+ public void setImplementation(Implementation implementation) {
+ this.implementation = implementation;
+ }
+
+ public Map<String, PropertyDefinition> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(Map<String, PropertyDefinition> inputs) {
+ this.inputs = inputs;
+ }
+
+ public Map<String, PropertyDefinition> getOutputs() {
+ return outputs;
+ }
+
+ public void setOutputs(Map<String, PropertyDefinition> outputs) {
+ this.outputs = outputs;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/PropertyDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/PropertyDefinition.java new file mode 100644 index 000000000..b4a3a8fac --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/PropertyDefinition.java @@ -0,0 +1,125 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.HashMap;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * PropertyDefinition.java Purpose: Provide PropertyDefinition TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class PropertyDefinition {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private Boolean required;
+ private String type;
+ @JsonProperty("default")
+ private Object defaultValue;
+ private String status;
+ private List<HashMap<String, Object>> constraints;
+ @JsonProperty("entry_schema")
+ private EntrySchema entrySchema;
+ private Object value;
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder("[");
+ builder.append(" type :" + getType());
+ builder.append(", value :" + getValue());
+ builder.append("]");
+ return builder.toString();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ 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 String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Object getDefaultValue() {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(Object defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public List<HashMap<String, Object>> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<HashMap<String, Object>> constraints) {
+ this.constraints = constraints;
+ }
+
+ public EntrySchema getEntrySchema() {
+ return entrySchema;
+ }
+
+ public void setEntrySchema(EntrySchema entrySchema) {
+ this.entrySchema = entrySchema;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RelationshipTemplate.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RelationshipTemplate.java new file mode 100644 index 000000000..b0de5878f --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RelationshipTemplate.java @@ -0,0 +1,56 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+
+/**
+ * RelationshipTemplate.java Purpose: Provide RelationshipTemplate TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class RelationshipTemplate {
+ private String description;
+ private String type;
+ private Map<String, PropertyDefinition> properties;
+
+ 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 Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementAssignment.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementAssignment.java new file mode 100644 index 000000000..b6d35d6c1 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementAssignment.java @@ -0,0 +1,67 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * RequirementAssignment.java Purpose: Provide RequirementAssignment TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class RequirementAssignment {
+ @JsonIgnore
+ private String id;
+ private String capability;
+ private String node;
+ // Relationship Type or Relationship Template
+ private String relationship;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ 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;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementDefinition.java new file mode 100644 index 000000000..68b2c41c0 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementDefinition.java @@ -0,0 +1,85 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * RequirementDefinition.java Purpose: Provide RequirementDefinition TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class RequirementDefinition {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private String capability;
+ private String node;
+ private String relationship;
+ private List<Object> occurrences;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ 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 List<Object> getOccurrences() {
+ return occurrences;
+ }
+
+ public void setOccurrences(List<Object> occurrences) {
+ this.occurrences = occurrences;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ResourceAssignment.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ResourceAssignment.java new file mode 100644 index 000000000..b84f6e3a2 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ResourceAssignment.java @@ -0,0 +1,165 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Date;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * ResourceAssignment.java Purpose: Provide ResourceAssignment Custom TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class ResourceAssignment {
+
+ private String name;
+
+ @JsonProperty("property")
+ private PropertyDefinition property;
+
+ @JsonProperty("input-param")
+ private Boolean inputParameter;
+
+ @JsonProperty("dictionary-name")
+ private String dictionaryName;
+
+ @JsonProperty("dictionary-source")
+ private String dictionarySource;
+
+ @JsonProperty("dependencies")
+ private List<String> dependencies;
+
+ @JsonProperty("version")
+ private int version;
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonProperty("message")
+ private String message;
+
+ @JsonProperty("updated-date")
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss")
+ private Date updatedDate;
+
+ @JsonProperty("updated-by")
+ private String updatedBy;
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder("[");
+ builder.append("name = " + name);
+ builder.append(", source = " + dictionarySource);
+ if (dependencies != null) {
+ builder.append(", dependencies = " + dependencies);
+ }
+ builder.append("]");
+ return builder.toString();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public PropertyDefinition getProperty() {
+ return property;
+ }
+
+ public void setProperty(PropertyDefinition property) {
+ this.property = property;
+ }
+
+ public Boolean getInputParameter() {
+ return inputParameter;
+ }
+
+ public void setInputParameter(Boolean inputParameter) {
+ this.inputParameter = inputParameter;
+ }
+
+ public String getDictionaryName() {
+ return dictionaryName;
+ }
+
+ public void setDictionaryName(String dictionaryName) {
+ this.dictionaryName = dictionaryName;
+ }
+
+ public String getDictionarySource() {
+ return dictionarySource;
+ }
+
+ public void setDictionarySource(String dictionarySource) {
+ this.dictionarySource = dictionarySource;
+ }
+
+ public List<String> getDependencies() {
+ return dependencies;
+ }
+
+ public void setDependencies(List<String> dependencies) {
+ this.dependencies = dependencies;
+ }
+
+ public int getVersion() {
+ return version;
+ }
+
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public Date getUpdatedDate() {
+ return updatedDate;
+ }
+
+ public void setUpdatedDate(Date updatedDate) {
+ this.updatedDate = updatedDate;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ServiceTemplate.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ServiceTemplate.java new file mode 100644 index 000000000..ea9efa1a9 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ServiceTemplate.java @@ -0,0 +1,118 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * ServiceTemplate.java Purpose: Provide ServiceTemplate TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class ServiceTemplate {
+ @JsonIgnore
+ private String id;
+ @JsonProperty("tosca_definitions_version")
+ private String toscaDefinitionsVersion;
+ private Map<String, String> metadata;
+ private String description;
+ @JsonProperty("dsl_definitions")
+ private Map<String, Object> dslDefinitions;
+ @JsonProperty("topology_template")
+ private TopologyTemplate topologyTemplate;
+ @JsonProperty("artifact_types")
+ private Map<String, ArtifactType> artifactTypes;
+ @JsonProperty("node_types")
+ private Map<String, NodeType> nodeTypes;
+ @JsonProperty("data_types")
+ private Map<String, DataType> dataTypes;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getToscaDefinitionsVersion() {
+ return toscaDefinitionsVersion;
+ }
+
+ public void setToscaDefinitionsVersion(String toscaDefinitionsVersion) {
+ this.toscaDefinitionsVersion = toscaDefinitionsVersion;
+ }
+
+ 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, Object> getDslDefinitions() {
+ return dslDefinitions;
+ }
+
+ public void setDslDefinitions(Map<String, Object> dslDefinitions) {
+ this.dslDefinitions = dslDefinitions;
+ }
+
+ public TopologyTemplate getTopologyTemplate() {
+ return topologyTemplate;
+ }
+
+ public void setTopologyTemplate(TopologyTemplate topologyTemplate) {
+ this.topologyTemplate = topologyTemplate;
+ }
+
+ public Map<String, NodeType> getNodeTypes() {
+ return nodeTypes;
+ }
+
+ public void setNodeTypes(Map<String, NodeType> nodeTypes) {
+ this.nodeTypes = nodeTypes;
+ }
+
+ public Map<String, DataType> getDataTypes() {
+ return dataTypes;
+ }
+
+ public void setDataTypes(Map<String, DataType> dataTypes) {
+ this.dataTypes = dataTypes;
+ }
+
+ public Map<String, ArtifactType> getArtifactTypes() {
+ return artifactTypes;
+ }
+
+ public void setArtifactTypes(Map<String, ArtifactType> artifactTypes) {
+ this.artifactTypes = artifactTypes;
+ }
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/TopologyTemplate.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/TopologyTemplate.java new file mode 100644 index 000000000..5e775f1a6 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/TopologyTemplate.java @@ -0,0 +1,97 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * TopologyTemplate.java Purpose: Provide TopologyTemplate TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class TopologyTemplate {
+ @JsonIgnore
+ private String id;
+ private String description;
+ private Map<String, PropertyDefinition> inputs;
+ @JsonProperty("node_templates")
+ private Map<String, NodeTemplate> nodeTemplates;
+ @JsonProperty("relationship_templates")
+ private Map<String, RelationshipTemplate> relationshipTemplates;
+ private Map<String, CapabilityAssignment> capabilities;
+ private Map<String, Workflow> workflows;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(Map<String, PropertyDefinition> inputs) {
+ this.inputs = inputs;
+ }
+
+ public Map<String, NodeTemplate> getNodeTemplates() {
+ return nodeTemplates;
+ }
+
+ public void setNodeTemplates(Map<String, NodeTemplate> nodeTemplates) {
+ this.nodeTemplates = nodeTemplates;
+ }
+
+ public Map<String, RelationshipTemplate> getRelationshipTemplates() {
+ return relationshipTemplates;
+ }
+
+ public void setRelationshipTemplates(Map<String, RelationshipTemplate> relationshipTemplates) {
+ this.relationshipTemplates = relationshipTemplates;
+ }
+
+ public Map<String, CapabilityAssignment> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, CapabilityAssignment> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ public Map<String, Workflow> getWorkflows() {
+ return workflows;
+ }
+
+ public void setWorkflows(Map<String, Workflow> workflows) {
+ this.workflows = workflows;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Workflow.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Workflow.java new file mode 100644 index 000000000..733743cbd --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Workflow.java @@ -0,0 +1,39 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Workflow.java Purpose: Provide Workflow TOSCO Model POJO bean.
+ *
+ * @version 1.0
+ */
+public class Workflow {
+ @JsonIgnore
+ private String id;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/ResourceDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/ResourceDefinition.java new file mode 100644 index 000000000..e374aeb95 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/ResourceDefinition.java @@ -0,0 +1,103 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data.dict;
+
+import java.util.Map;
+import org.onap.ccsdk.config.model.data.PropertyDefinition;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ResourceDefinition {
+ private String tags;
+
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ @JsonProperty(value = "property")
+ private PropertyDefinition property;
+
+ @JsonProperty(value = "updated-by")
+ private String updatedBy;
+
+ @JsonProperty(value = "resource-type", required = true)
+ private String resourceType;
+
+ @JsonProperty(value = "resource-path", required = true)
+ private String resourcePath;
+
+ @JsonProperty(value = "sources", required = true)
+ private Map<String, SourcesDefinition> sourcesDefinition;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public PropertyDefinition getProperty() {
+ return property;
+ }
+
+ public void setProperty(PropertyDefinition property) {
+ this.property = property;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ public String getResourceType() {
+ return resourceType;
+ }
+
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ public String getResourcePath() {
+ return resourcePath;
+ }
+
+ public void setResourcePath(String resourcePath) {
+ this.resourcePath = resourcePath;
+ }
+
+ public Map<String, SourcesDefinition> getSources() {
+ return sourcesDefinition;
+ }
+
+ public void setSources(Map<String, SourcesDefinition> sourcesDefinition) {
+ this.sourcesDefinition = sourcesDefinition;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesDefinition.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesDefinition.java new file mode 100644 index 000000000..6b9fc0ab6 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesDefinition.java @@ -0,0 +1,46 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data.dict;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class SourcesDefinition {
+
+ @JsonProperty(value = "type", required = true)
+ private String type;
+
+ @JsonProperty(value = "properties", required = true)
+ private SourcesProperties properties;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public SourcesProperties getProperties() {
+ return properties;
+ }
+
+ public void setProperties(SourcesProperties properties) {
+ this.properties = properties;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java new file mode 100644 index 000000000..581763127 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java @@ -0,0 +1,135 @@ +/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.model.data.dict;
+
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class SourcesProperties {
+
+ private String key;
+
+ @JsonProperty(value = "name")
+ private String name;
+
+ @JsonProperty(value = "base")
+ private String base;
+
+ @JsonProperty(value = "type")
+ private String type;
+
+ @JsonProperty(value = "query")
+ private String query;
+
+ @JsonProperty(value = "url-path")
+ private String urlPath;
+
+ @JsonProperty(value = "path")
+ private String path;
+
+ @JsonProperty("input-key-mapping")
+ private Map<String, String> inputKeyMapping;
+
+ @JsonProperty("output-key-mapping")
+ private Map<String, String> outputKeyMapping;
+
+ @JsonProperty("key-dependencies")
+ private List<String> dependencies;
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getBase() {
+ return base;
+ }
+
+ public void setBase(String base) {
+ this.base = base;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getQuery() {
+ return query;
+ }
+
+ public void setQuery(String query) {
+ this.query = query;
+ }
+
+ public String getUrlPath() {
+ return urlPath;
+ }
+
+ public void setUrlPath(String urlPath) {
+ this.urlPath = urlPath;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public Map<String, String> getInputKeyMapping() {
+ return inputKeyMapping;
+ }
+
+ public void setInputKeyMapping(Map<String, String> inputKeyMapping) {
+ this.inputKeyMapping = inputKeyMapping;
+ }
+
+ public Map<String, String> getOutputKeyMapping() {
+ return outputKeyMapping;
+ }
+
+ public void setOutputKeyMapping(Map<String, String> outputKeyMapping) {
+ this.outputKeyMapping = outputKeyMapping;
+ }
+
+ public List<String> getDependencies() {
+ return dependencies;
+ }
+
+ public void setDependencies(List<String> dependencies) {
+ this.dependencies = dependencies;
+ }
+
+}
diff --git a/blueprints-processor/plugin/model-provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/blueprints-processor/plugin/model-provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml new file mode 100644 index 000000000..2bfab86f8 --- /dev/null +++ b/blueprints-processor/plugin/model-provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017-2018 AT&T Intellectual Property.
+ Modifications Copyright © 2018 IBM.
+
+ 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.
+-->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ odl:use-default-for-reference-types="true">
+
+ <!-- Dependency -->
+
+ <reference id="configResourceService"
+ interface="org.onap.ccsdk.config.data.adaptor.service.ConfigResourceService" />
+
+ <reference id="configRestAdaptorService"
+ interface="org.onap.ccsdk.config.rest.adaptor.service.ConfigRestAdaptorService" />
+
+ <!-- Expose the Common Component Bean -->
+ <bean id="configModelNode"
+ class="org.onap.ccsdk.config.model.service.ConfigModelNode">
+ </bean>
+
+ <service ref="configModelNode"
+ interface="org.onap.ccsdk.config.model.service.ConfigModelNode" />
+
+ <bean id="configModelService"
+ class="org.onap.ccsdk.config.model.service.ConfigModelServiceImpl">
+ <argument ref="configRestAdaptorService" />
+ </bean>
+
+ <service ref="configModelService"
+ interface="org.onap.ccsdk.config.model.service.ConfigModelService" />
+
+
+ <!-- ComponentNode -->
+
+ <bean id="componentNodeService"
+ class="org.onap.ccsdk.config.model.service.ComponentNodeServiceImpl">
+ <argument ref="blueprintBundleContext" />
+ <argument ref="configResourceService" />
+ <argument ref="configRestAdaptorService" />
+ </bean>
+
+ <service ref="componentNodeService"
+ interface="org.onap.ccsdk.config.model.service.ComponentNodeService" />
+
+ <bean id="componentNodeDelegate"
+ class="org.onap.ccsdk.config.model.service.ComponentNodeDelegate">
+ <argument ref="componentNodeService" />
+ </bean>
+
+ <service ref="componentNodeDelegate"
+ interface="org.onap.ccsdk.config.model.service.ComponentNodeDelegate" />
+
+</blueprint>
|