From 915e7b8e2b04a7418561d0e67aecb80d18b9ba1d Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Tue, 4 Sep 2018 22:11:04 -0400 Subject: 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) --- .../config/model/data/ArtifactDefinition.java | 105 +++++++++++++ .../onap/ccsdk/config/model/data/ArtifactType.java | 102 +++++++++++++ .../config/model/data/CapabilityAssignment.java | 49 ++++++ .../config/model/data/CapabilityDefinition.java | 88 +++++++++++ .../ccsdk/config/model/data/ConstraintClause.java | 150 +++++++++++++++++++ .../org/onap/ccsdk/config/model/data/DataType.java | 88 +++++++++++ .../onap/ccsdk/config/model/data/EntrySchema.java | 36 +++++ .../ccsdk/config/model/data/Implementation.java | 49 ++++++ .../config/model/data/InterfaceAssignment.java | 58 ++++++++ .../config/model/data/InterfaceDefinition.java | 58 ++++++++ .../onap/ccsdk/config/model/data/NodeTemplate.java | 112 ++++++++++++++ .../org/onap/ccsdk/config/model/data/NodeType.java | 114 ++++++++++++++ .../config/model/data/OperationAssignment.java | 76 ++++++++++ .../config/model/data/OperationDefinition.java | 76 ++++++++++ .../config/model/data/PropertyDefinition.java | 125 ++++++++++++++++ .../config/model/data/RelationshipTemplate.java | 56 +++++++ .../config/model/data/RequirementAssignment.java | 67 +++++++++ .../config/model/data/RequirementDefinition.java | 85 +++++++++++ .../config/model/data/ResourceAssignment.java | 165 +++++++++++++++++++++ .../ccsdk/config/model/data/ServiceTemplate.java | 118 +++++++++++++++ .../ccsdk/config/model/data/TopologyTemplate.java | 97 ++++++++++++ .../org/onap/ccsdk/config/model/data/Workflow.java | 39 +++++ .../config/model/data/dict/ResourceDefinition.java | 103 +++++++++++++ .../config/model/data/dict/SourcesDefinition.java | 46 ++++++ .../config/model/data/dict/SourcesProperties.java | 135 +++++++++++++++++ .../org/opendaylight/blueprint/impl-blueprint.xml | 68 +++++++++ 26 files changed, 2265 insertions(+) create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ArtifactType.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityAssignment.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/CapabilityDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ConstraintClause.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/DataType.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/EntrySchema.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Implementation.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceAssignment.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/InterfaceDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeTemplate.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/NodeType.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationAssignment.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/OperationDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/PropertyDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RelationshipTemplate.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementAssignment.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/RequirementDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ResourceAssignment.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/ServiceTemplate.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/TopologyTemplate.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/Workflow.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/ResourceDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesDefinition.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java create mode 100644 blueprints-processor/plugin/model-provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml (limited to 'blueprints-processor') 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 metadata; + @JsonProperty("derived_from") + private String derivedFrom; + private Map properties; + @JsonProperty("mime_type") + private String mimeType; + @JsonProperty("file_ext") + private List 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 getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public String getDerivedFrom() { + return derivedFrom; + } + + public void setDerivedFrom(String derivedFrom) { + this.derivedFrom = derivedFrom; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public String getMimeType() { + return mimeType; + } + + public void setMimeType(String mimeType) { + this.mimeType = mimeType; + } + + public List getFileExt() { + return fileExt; + } + + public void setFileExt(List 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 properties; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map 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 properties; + @JsonProperty("valid_source_types") + private List validSourceTypes; + private List 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 getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public List getValidSourceTypes() { + return validSourceTypes; + } + + public void setValidSourceTypes(List validSourceTypes) { + this.validSourceTypes = validSourceTypes; + } + + public List getOccurrences() { + return occurrences; + } + + public void setOccurrences(List 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 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 getValidValues() { + return validValues; + } + + public void setValidValues(List 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> constraints; + private Map 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> getConstraints() { + return constraints; + } + + public void setConstraints(List> constraints) { + this.constraints = constraints; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map 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 dependencies; + + public String getPrimary() { + return primary; + } + + public void setPrimary(String primary) { + this.primary = primary; + } + + public List getDependencies() { + return dependencies; + } + + public void setDependencies(List 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 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 getOperations() { + return operations; + } + + public void setOperations(Map 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 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 getOperations() { + return operations; + } + + public void setOperations(Map 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 metadata; + private Map properties; + private Map interfaces; + private Map artifacts; + private Map capabilities; + private Map 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 getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public Map getInterfaces() { + return interfaces; + } + + public void setInterfaces(Map interfaces) { + this.interfaces = interfaces; + } + + public Map getArtifacts() { + return artifacts; + } + + public void setArtifacts(Map artifacts) { + this.artifacts = artifacts; + } + + public Map getCapabilities() { + return capabilities; + } + + public void setCapabilities(Map capabilities) { + this.capabilities = capabilities; + } + + public Map getRequirements() { + return requirements; + } + + public void setRequirements(Map 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 metadata; + @JsonProperty("derived_from") + private String derivedFrom; + private Map properties; + private Map capabilities; + private Map requirements; + private Map 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 getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public String getDerivedFrom() { + return derivedFrom; + } + + public void setDerivedFrom(String derivedFrom) { + this.derivedFrom = derivedFrom; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public Map getCapabilities() { + return capabilities; + } + + public void setCapabilities(Map capabilities) { + this.capabilities = capabilities; + } + + public Map getRequirements() { + return requirements; + } + + public void setRequirements(Map requirements) { + this.requirements = requirements; + } + + public Map getInterfaces() { + return interfaces; + } + + public void setInterfaces(Map 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 inputs; + private Map 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 getInputs() { + return inputs; + } + + public void setInputs(Map inputs) { + this.inputs = inputs; + } + + public Map getOutputs() { + return outputs; + } + + public void setOutputs(Map 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 inputs; + private Map 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 getInputs() { + return inputs; + } + + public void setInputs(Map inputs) { + this.inputs = inputs; + } + + public Map getOutputs() { + return outputs; + } + + public void setOutputs(Map 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> 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> getConstraints() { + return constraints; + } + + public void setConstraints(List> 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 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 getProperties() { + return properties; + } + + public void setProperties(Map 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 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 getOccurrences() { + return occurrences; + } + + public void setOccurrences(List 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 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 getDependencies() { + return dependencies; + } + + public void setDependencies(List 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 metadata; + private String description; + @JsonProperty("dsl_definitions") + private Map dslDefinitions; + @JsonProperty("topology_template") + private TopologyTemplate topologyTemplate; + @JsonProperty("artifact_types") + private Map artifactTypes; + @JsonProperty("node_types") + private Map nodeTypes; + @JsonProperty("data_types") + private Map 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 getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Map getDslDefinitions() { + return dslDefinitions; + } + + public void setDslDefinitions(Map dslDefinitions) { + this.dslDefinitions = dslDefinitions; + } + + public TopologyTemplate getTopologyTemplate() { + return topologyTemplate; + } + + public void setTopologyTemplate(TopologyTemplate topologyTemplate) { + this.topologyTemplate = topologyTemplate; + } + + public Map getNodeTypes() { + return nodeTypes; + } + + public void setNodeTypes(Map nodeTypes) { + this.nodeTypes = nodeTypes; + } + + public Map getDataTypes() { + return dataTypes; + } + + public void setDataTypes(Map dataTypes) { + this.dataTypes = dataTypes; + } + + public Map getArtifactTypes() { + return artifactTypes; + } + + public void setArtifactTypes(Map 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 inputs; + @JsonProperty("node_templates") + private Map nodeTemplates; + @JsonProperty("relationship_templates") + private Map relationshipTemplates; + private Map capabilities; + private Map 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 getInputs() { + return inputs; + } + + public void setInputs(Map inputs) { + this.inputs = inputs; + } + + public Map getNodeTemplates() { + return nodeTemplates; + } + + public void setNodeTemplates(Map nodeTemplates) { + this.nodeTemplates = nodeTemplates; + } + + public Map getRelationshipTemplates() { + return relationshipTemplates; + } + + public void setRelationshipTemplates(Map relationshipTemplates) { + this.relationshipTemplates = relationshipTemplates; + } + + public Map getCapabilities() { + return capabilities; + } + + public void setCapabilities(Map capabilities) { + this.capabilities = capabilities; + } + + public Map getWorkflows() { + return workflows; + } + + public void setWorkflows(Map 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 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 getSources() { + return sourcesDefinition; + } + + public void setSources(Map 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 inputKeyMapping; + + @JsonProperty("output-key-mapping") + private Map outputKeyMapping; + + @JsonProperty("key-dependencies") + private List 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 getInputKeyMapping() { + return inputKeyMapping; + } + + public void setInputKeyMapping(Map inputKeyMapping) { + this.inputKeyMapping = inputKeyMapping; + } + + public Map getOutputKeyMapping() { + return outputKeyMapping; + } + + public void setOutputKeyMapping(Map outputKeyMapping) { + this.outputKeyMapping = outputKeyMapping; + } + + public List getDependencies() { + return dependencies; + } + + public void setDependencies(List 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg