From 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 31 Dec 2018 17:21:27 +0200 Subject: Merge from ECOMP's repository Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern --- .../java/org/onap/vid/mso/model/ModelInfo.java | 279 +++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/model/ModelInfo.java (limited to 'vid-app-common/src/main/java/org/onap/vid/mso/model/ModelInfo.java') diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/ModelInfo.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/ModelInfo.java new file mode 100644 index 000000000..091a241df --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/ModelInfo.java @@ -0,0 +1,279 @@ + +package org.onap.vid.mso.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + * fields describing the SDC entity being operated on by the request + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "modelCustomizationName", + "modelCustomizationId", + "modelInvariantId", + "modelVersionId", + "modelName", + "modelNameVersionId", + "modelType", + "modelVersion" +}) +public class ModelInfo { + + /** + * reference to the customized set of parameters associated with a model in a given service context + * + */ + @JsonProperty("modelCustomizationName") + private String modelCustomizationName; + /** + * reference to the customized set of parameters associated with a model in a given service context + * + */ + @JsonProperty("modelCustomizationId") + private String modelCustomizationId; + /** + * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative + * + */ + @JsonProperty("modelInvariantId") + private String modelInvariantId; + /** + * Version id for version + * + */ + @JsonProperty("modelVersionId") + private String modelVersionId; + /** + * name of the model as defined in SDC--not authoritative + * + */ + @JsonProperty("modelName") + private String modelName; + /** + * UUID for the model name and version combination as defined in SDC--authoritative + * + */ + @JsonProperty("modelNameVersionId") + private String modelNameVersionId; + /** + * short description of the entity being operated on + * (Required) + * + */ + @JsonProperty("modelType") + private String modelType; + /** + * the version of the model as defined in SDC--not authoritative + * + */ + @JsonProperty("modelVersion") + private String modelVersion; + + /** + * reference to the customized set of parameters associated with a model in a given service context + * + * @return + * The modelCustomizationName + */ + @JsonProperty("modelCustomizationName") + public String getModelCustomizationName() { + return modelCustomizationName; + } + + /** + * reference to the customized set of parameters associated with a model in a given service context + * + * @param modelCustomizationName + * The modelCustomizationName + */ + @JsonProperty("modelCustomizationName") + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + + /** + * reference to the customized set of parameters associated with a model in a given service context + * + * @return + * The modelCustomizationId + */ + @JsonProperty("modelCustomizationId") + public String getModelCustomizationId() { + return modelCustomizationId; + } + + /** + * reference to the customized set of parameters associated with a model in a given service context + * + * @param modelCustomizationId + * The modelCustomizationId + */ + @JsonProperty("modelCustomizationId") + public void setModelCustomizationId(String modelCustomizationId) { + this.modelCustomizationId = modelCustomizationId; + } + + /** + * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative + * + * @return + * The modelInvariantId + */ + @JsonProperty("modelInvariantId") + public String getModelInvariantId() { + return modelInvariantId; + } + + /** + * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative + * + * @param modelInvariantId + * The modelInvariantId + */ + @JsonProperty("modelInvariantId") + public void setModelInvariantId(String modelInvariantId) { + this.modelInvariantId = modelInvariantId; + } + + /** + * Version id for version + * + * @return + * The modelVersionId + */ + @JsonProperty("modelVersionId") + public String getModelVersionId() { + return modelVersionId; + } + + /** + * Version id for version + * + * @param modelVersionId + * The modelVersionId + */ + @JsonProperty("modelVersionId") + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + + /** + * name of the model as defined in SDC--not authoritative + * + * @return + * The modelName + */ + @JsonProperty("modelName") + public String getModelName() { + return modelName; + } + + /** + * name of the model as defined in SDC--not authoritative + * + * @param modelName + * The modelName + */ + @JsonProperty("modelName") + public void setModelName(String modelName) { + this.modelName = modelName; + } + + /** + * UUID for the model name and version combination as defined in SDC--authoritative + * + * @return + * The modelNameVersionId + */ + @JsonProperty("modelNameVersionId") + public String getModelNameVersionId() { + return modelNameVersionId; + } + + /** + * UUID for the model name and version combination as defined in SDC--authoritative + * + * @param modelNameVersionId + * The modelNameVersionId + */ + @JsonProperty("modelNameVersionId") + public void setModelNameVersionId(String modelNameVersionId) { + this.modelNameVersionId = modelNameVersionId; + } + + /** + * short description of the entity being operated on + * (Required) + * + * @return + * The modelType + */ + @JsonProperty("modelType") + public String getModelType() { + return modelType; + } + + /** + * short description of the entity being operated on + * (Required) + * + * @param modelType + * The modelType + */ + @JsonProperty("modelType") + public void setModelType(String modelType) { + this.modelType = modelType; + } + + /** + * the version of the model as defined in SDC--not authoritative + * + * @return + * The modelVersion + */ + @JsonProperty("modelVersion") + public String getModelVersion() { + return modelVersion; + } + + /** + * the version of the model as defined in SDC--not authoritative + * + * @param modelVersion + * The modelVersion + */ + @JsonProperty("modelVersion") + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(modelCustomizationName).append(modelCustomizationId).append(modelInvariantId).append(modelVersionId).append(modelName).append(modelNameVersionId).append(modelType).append(modelVersion).toHashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if (!(other instanceof ModelInfo)) { + return false; + } + ModelInfo rhs = ((ModelInfo) other); + return new EqualsBuilder().append(modelCustomizationName, rhs.modelCustomizationName).append(modelCustomizationId, rhs.modelCustomizationId).append(modelInvariantId, rhs.modelInvariantId).append(modelVersionId, rhs.modelVersionId).append(modelName, rhs.modelName).append(modelNameVersionId, rhs.modelNameVersionId).append(modelType, rhs.modelType).append(modelVersion, rhs.modelVersion).isEquals(); + } + +} -- cgit 1.2.3-korg