summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2017-04-11 13:30:42 +0200
committerxg353y <xg353y@intl.att.com>2017-04-11 15:34:19 +0200
commitb6b7bef8bdcad15af01ac88a038dd763ce59f68f (patch)
tree399d39da23aaa37701e487df064e3e0c27709ef3 /mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans
parent19340cad94eeaa1b580f7c0c99531de499e8ca14 (diff)
[MSO-8] Update the maven dependency
Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes. Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans')
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java123
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java18
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java29
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java28
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java198
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java180
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java140
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java141
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java42
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java67
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java68
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java89
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java82
13 files changed, 1132 insertions, 73 deletions
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
new file mode 100644
index 0000000000..21cef1ea9f
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+import java.sql.Timestamp;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class AllottedResourceCustomization extends MavenLikeVersioning {
+
+ private String modelCustomizationUuid;
+ private String modelUuid;
+ private String modelInvariantUuid;
+ private String modelVersion = null; // duplicate of version kept in parent class
+ private String modelName;
+ private String description;
+ private Timestamp created;
+ private String modelInstanceName;
+
+ public AllottedResourceCustomization() {
+ super();
+ }
+
+ public String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+
+ public String getModelUuid() {
+ return this.modelUuid;
+ }
+ public void setModelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
+ }
+
+ public String getModelInvariantUuid() {
+ return this.modelInvariantUuid;
+ }
+ public void setModelInvariantUuid(String modelInvariantUuid) {
+ this.modelInvariantUuid = modelInvariantUuid;
+ }
+
+ public String getModelName() {
+ return this.modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Timestamp getCreated() {
+ return this.created;
+ }
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ public String getModelInstanceName() {
+ return this.modelInstanceName;
+ }
+ public void setModelInstanceName(String modelInstanceName) {
+ this.modelInstanceName = modelInstanceName;
+ }
+ public String getModelVersion() {
+ return this.modelVersion;
+ }
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
+ @Override
+ public String toString () {
+ StringBuffer sb = new StringBuffer();
+ sb.append("modelName=");
+ sb.append(this.modelName);
+ sb.append(",modelVersion=");
+ sb.append(this.modelVersion);
+ sb.append(",version=");
+ sb.append(this.version);
+ sb.append(",modelUuid=");
+ sb.append(this.modelUuid);
+ sb.append(",modelInvariantUuid=");
+ sb.append(this.modelInvariantUuid);
+ sb.append(",modelCustomizationUuid=");
+ sb.append(this.modelCustomizationUuid);
+ sb.append(",modelInstanceName=");
+ sb.append(this.modelInstanceName);
+ sb.append(",description=");
+ sb.append(this.description);
+ sb.append(",modelInstanceName=");
+ sb.append(this.modelInstanceName);
+ sb.append(",created=");
+ sb.append(this.created);
+
+ return sb.toString();
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
index 69db27e989..a920375bcd 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
@@ -7,9 +7,9 @@
* 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.
@@ -35,9 +35,10 @@ public class HeatEnvironment extends MavenLikeVersioning {
private String asdcUuid;
private String asdcResourceName;
private String asdcLabel;
+ private String artifactChecksum;
private Timestamp created;
-
+
public HeatEnvironment() {}
public int getId() {
@@ -92,8 +93,15 @@ public class HeatEnvironment extends MavenLikeVersioning {
this.asdcLabel = asdcLabel;
}
+ public String getArtifactChecksum() {
+ return artifactChecksum;
+ }
- /**
+ public void setArtifactChecksum(String artifactChecksum) {
+ this.artifactChecksum = artifactChecksum;
+ }
+
+ /**
* @return the asdcResourceName
*/
public String getAsdcResourceName () {
@@ -115,7 +123,7 @@ public class HeatEnvironment extends MavenLikeVersioning {
public void setCreated(Timestamp created) {
this.created = created;
}
-
+
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
index a1b6f228e1..d379c2471a 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
@@ -7,9 +7,9 @@
* 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.
@@ -36,38 +36,39 @@ public class HeatFiles extends MavenLikeVersioning {
private String asdcUuid;
private String asdcLabel;
private String asdcResourceName;
-
+ private String artifactChecksum;
+
public HeatFiles() {}
-
+
public int getId() {
return this.id;
}
-
+
public void setId(int id) {
this.id = id;
}
-
+
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
-
+
public String getFileName() {
return this.fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
-
+
public String getFileBody() {
return this.fileBody;
}
public void setFileBody(String fileBody) {
this.fileBody = fileBody;
}
-
+
public int getVnfResourceId() {
return this.vnfResourceId;
}
@@ -82,7 +83,7 @@ public class HeatFiles extends MavenLikeVersioning {
public void setCreated(Timestamp created) {
this.created = created;
}
-
+
public String getAsdcUuid() {
return this.asdcUuid;
}
@@ -103,6 +104,14 @@ public class HeatFiles extends MavenLikeVersioning {
this.asdcResourceName = asdcResourceName;
}
+ public String getArtifactChecksum() {
+ return artifactChecksum;
+ }
+
+ public void setArtifactChecksum(String artifactChecksum) {
+ this.artifactChecksum = artifactChecksum;
+ }
+
@Override
public String toString () {
StringBuffer sb = new StringBuffer();
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
index a80fa598b9..5762837bfb 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
@@ -7,9 +7,9 @@
* 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.
@@ -46,9 +46,10 @@ public class HeatTemplate extends MavenLikeVersioning {
private String asdcUuid;
private String asdcResourceName;
private String asdcLabel;
-
+ private String artifactChecksum;
+
private Timestamp created;
-
+
public enum TemplateStatus {
PARENT, CHILD, PARENT_COMPLETE
}
@@ -103,7 +104,7 @@ public class HeatTemplate extends MavenLikeVersioning {
public void setParameters (Set <HeatTemplateParam> parameters) {
this.parameters = parameters;
}
-
+
public String getDescription() {
return description;
}
@@ -131,7 +132,7 @@ public class HeatTemplate extends MavenLikeVersioning {
} catch (Exception e) {
LOGGER.debug ("Error reading template file " + templatePath, e);
}
-
+
return body;
}
@@ -150,7 +151,7 @@ public class HeatTemplate extends MavenLikeVersioning {
public void setAsdcUuid(String asdcUuidp) {
this.asdcUuid = asdcUuidp;
}
-
+
public String getAsdcResourceName() {
return asdcResourceName;
}
@@ -164,8 +165,15 @@ public class HeatTemplate extends MavenLikeVersioning {
public void setAsdcLabel(String asdcLabel) {
this.asdcLabel = asdcLabel;
}
-
- public Timestamp getCreated() {
+
+ public String getArtifactChecksum() {
+ return artifactChecksum;
+ }
+
+ public void setArtifactChecksum(String artifactChecksum) {
+ this.artifactChecksum = artifactChecksum;
+ }
+ public Timestamp getCreated() {
return created;
}
@@ -197,7 +205,7 @@ public class HeatTemplate extends MavenLikeVersioning {
sb.append (",created=");
sb.append (DateFormat.getInstance().format(created));
}
-
+
if (parameters != null && !parameters.isEmpty ()) {
sb.append (",params=[");
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java
new file mode 100644
index 0000000000..51153c912b
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java
@@ -0,0 +1,198 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.util.Map;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class Model extends MavenLikeVersioning {
+ private int id;
+ private String modelCustomizationId;
+ private String modelCustomizationName;
+ private String modelInvariantId;
+ private String modelName;
+ private String modelType;
+ private String modelVersion;
+ private String modelVersionId;
+ private Timestamp created;
+ private Map<String,ServiceRecipe> recipes;
+
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @return the modelCustomizationId
+ */
+ public String getModelCustomizationId() {
+ return modelCustomizationId;
+ }
+
+ /**
+ * @param modelCustomizationId the modelCustomizationId to set
+ */
+ public void setModelCustomizationId(String modelCustomizationId) {
+ this.modelCustomizationId = modelCustomizationId;
+ }
+
+ /**
+ * @return the modelCustomizationName
+ */
+ public String getModelCustomizationName() {
+ return modelCustomizationName;
+ }
+
+ /**
+ * @param modelCustomizationName the modelCustomizationName to set
+ */
+ public void setModelCustomizationName(String modelCustomizationName) {
+ this.modelCustomizationName = modelCustomizationName;
+ }
+
+ /**
+ * @return the modelInvariantId
+ */
+ public String getModelInvariantId() {
+ return modelInvariantId;
+ }
+
+ /**
+ * @param modelInvariantId the modelInvariantId to set
+ */
+ public void setModelInvariantId(String modelInvariantId) {
+ this.modelInvariantId = modelInvariantId;
+ }
+
+ /**
+ * @return the modelName
+ */
+ public String getModelName() {
+ return modelName;
+ }
+
+ /**
+ * @param modelName the modelName to set
+ */
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ /**
+ * @return the modelType
+ */
+ public String getModelType() {
+ return modelType;
+ }
+
+ /**
+ * @param modelType the modelType to set
+ */
+ public void setModelType(String modelType) {
+ this.modelType = modelType;
+ }
+
+ /**
+ * @return the modelVersion
+ */
+ public String getModelVersion() {
+ return modelVersion;
+ }
+
+ /**
+ * @param modelVersion the modelVersion to set
+ */
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
+ /**
+ * @return the modelVersionId
+ */
+ public String getModelVersionId() {
+ return modelVersionId;
+ }
+
+ /**
+ * @param modelVersionId the modelVersionId to set
+ */
+ public void setModelVersionId(String modelVersionId) {
+ this.modelVersionId = modelVersionId;
+ }
+
+ /**
+ * @return the created
+ */
+ public Timestamp getCreated() {
+ return created;
+ }
+
+ /**
+ * @param created the created to set
+ */
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ /**
+ * @return the recipes
+ */
+ public Map<String, ServiceRecipe> getRecipes() {
+ return recipes;
+ }
+
+ /**
+ * @param recipes the recipes to set
+ */
+ public void setRecipes(Map<String, ServiceRecipe> recipes) {
+ this.recipes = recipes;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Model: ");
+ sb.append("modelCustomizationId=" + modelCustomizationId);
+ sb.append(",modelCustomizationName=" + modelCustomizationName);
+ sb.append(",modelInvariantId=" + modelInvariantId);
+ sb.append(",modelName=" + modelName);
+ sb.append(",modelType=" + modelType);
+ sb.append(",modelVersion=" + modelVersion);
+ sb.append(",modelVersionId=" + modelVersionId);
+ if (created != null) {
+ sb.append (",created=");
+ sb.append (DateFormat.getInstance().format(created));
+ }
+ return sb.toString();
+ }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java
new file mode 100644
index 0000000000..83fb773a8c
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java
@@ -0,0 +1,180 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class ModelRecipe extends MavenLikeVersioning {
+ private int id;
+ private Integer modelId;
+ private String action;
+ private String schemaVersion;
+ private String description;
+ private String orchestrationUri;
+ private String modelParamXSD;
+ private Integer recipeTimeout;
+ private Timestamp created;
+
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @return the modelId
+ */
+ public Integer getModelId() {
+ return modelId;
+ }
+
+ /**
+ * @param modelId the modelId to set
+ */
+ public void setModelId(Integer modelId) {
+ this.modelId = modelId;
+ }
+
+ /**
+ * @return the action
+ */
+ public String getAction() {
+ return action;
+ }
+
+ /**
+ * @param action the action to set
+ */
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ /**
+ * @return the versionStr
+ */
+ public String getSchemaVersion() {
+ return schemaVersion;
+ }
+
+ /**
+ * @param versionStr the versionStr to set
+ */
+ public void setSchemaVersion(String schemaVersion) {
+ this.schemaVersion = schemaVersion;
+ }
+
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the orchestrationUri
+ */
+ public String getOrchestrationUri() {
+ return orchestrationUri;
+ }
+
+ /**
+ * @param orchestrationUri the orchestrationUri to set
+ */
+ public void setOrchestrationUri(String orchestrationUri) {
+ this.orchestrationUri = orchestrationUri;
+ }
+
+ /**
+ * @return the modelParamXSD
+ */
+ public String getModelParamXSD() {
+ return modelParamXSD;
+ }
+
+ /**
+ * @param modelParamXSD the modelParamXSD to set
+ */
+ public void setModelParamXSD(String modelParamXSD) {
+ this.modelParamXSD = modelParamXSD;
+ }
+
+ /**
+ * @return the recipeTimeout
+ */
+ public Integer getRecipeTimeout() {
+ return recipeTimeout;
+ }
+
+ /**
+ * @param recipeTimeout the recipeTimeout to set
+ */
+ public void setRecipeTimeout(Integer recipeTimeout) {
+ this.recipeTimeout = recipeTimeout;
+ }
+
+ /**
+ * @return the created
+ */
+ public Timestamp getCreated() {
+ return created;
+ }
+
+ /**
+ * @param created the created to set
+ */
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("ModelRecipe: ");
+ sb.append("modelId=" + modelId.toString());
+ sb.append(",action=" + action);
+ sb.append(",schemaVersion=" + schemaVersion);
+ sb.append(",orchestrationUri=" + orchestrationUri);
+ sb.append(",modelParamXSD=" + modelParamXSD);
+ sb.append(",recipeTimeout=" + recipeTimeout.toString());
+ if (created != null) {
+ sb.append (",created=");
+ sb.append (DateFormat.getInstance().format(created));
+ }
+ return sb.toString();
+ }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
new file mode 100644
index 0000000000..0c49f1b1a4
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+import java.sql.Timestamp;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class NetworkResourceCustomization extends MavenLikeVersioning{
+
+ private String modelCustomizationUuid;
+ private String modelName;
+ private String modelInstanceName;
+ private String modelUuid;
+ private String modelVersion;
+ private String modelInvariantUuid;
+ private int networkResourceId = 0;
+ private Timestamp created;
+
+ // These fields are not in the table directly - but I'm adding them here for storage in the objects we're dealing with
+ private NetworkResource networkResource = null;
+ private String networkType = null;
+
+ public NetworkResourceCustomization() {
+ super();
+ }
+
+ public int getNetworkResourceId() {
+ return this.networkResourceId;
+ }
+ public void setNetworkResourceId(int networkResourceId) {
+ this.networkResourceId = networkResourceId;
+ }
+
+ public String getModelUuid() {
+ return this.modelUuid;
+ }
+ public void setModelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
+ }
+
+ public String getModelInvariantUuid() {
+ return this.modelInvariantUuid;
+ }
+ public void setModelInvariantUuid(String modelInvariantUuid) {
+ this.modelInvariantUuid = modelInvariantUuid;
+ }
+
+ public String getModelVersion() {
+ return this.modelVersion;
+ }
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
+ public String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+
+ public String getModelInstanceName() {
+ return this.modelInstanceName;
+ }
+ public void setModelInstanceName(String modelInstanceName) {
+ this.modelInstanceName = modelInstanceName;
+ }
+
+ public String getModelName() {
+ return this.modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public NetworkResource getNetworkResource() {
+ return this.networkResource;
+ }
+ public void setNetworkResource(NetworkResource networkResource) {
+ this.networkResource = networkResource;
+ }
+
+ public String getNetworkType() {
+ return this.networkType;
+ }
+ public void setNetworkType(String networkType) {
+ this.networkType = networkType;
+ }
+ public Timestamp getCreated() {
+ return this.created;
+ }
+ public void setCreated(Timestamp timestamp) {
+ this.created = timestamp;
+ }
+
+
+ @Override
+ public String toString () {
+ StringBuffer sb = new StringBuffer();
+ sb.append("modelName=");
+ sb.append(this.modelName);
+ sb.append("modelUuid=");
+ sb.append(this.modelUuid);
+ sb.append("modelUuid=");
+ sb.append(this.modelUuid);
+ sb.append("modelInvariantUuid=");
+ sb.append(this.modelInvariantUuid);
+ sb.append("modelVersion=");
+ sb.append(this.modelVersion);
+ sb.append("modelCustomizationUuid=");
+ sb.append(this.modelCustomizationUuid);
+ sb.append("modelInstanceName=");
+ sb.append(this.modelInstanceName);
+ sb.append("networkResourceId=");
+ sb.append(this.networkResourceId);
+ sb.append("networkType=");
+ sb.append(this.networkType);
+
+ return sb.toString();
+ }
+
+} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
new file mode 100644
index 0000000000..01369c4ecd
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import java.util.ArrayList;
+
+/*
+ * A simple holder for Service and its associated elements:
+ * VnfResource, 1-n VfModule, Network TBD
+ */
+
+public class ServiceMacroHolder {
+
+ private Service service;
+ private ArrayList<VnfResource> vnfResources;
+ private ArrayList<NetworkResourceCustomization> networkResourceCustomizations;
+ private ArrayList<AllottedResourceCustomization> allottedResourceCustomizations;
+
+ public ServiceMacroHolder() {
+ super();
+ this.service = null;
+ this.vnfResources = new ArrayList<VnfResource>();
+ this.networkResourceCustomizations = new ArrayList<NetworkResourceCustomization>();
+ this.allottedResourceCustomizations = new ArrayList<AllottedResourceCustomization>();
+ }
+ public ServiceMacroHolder(Service service) {
+ this();
+ this.service = service;
+ }
+
+ public Service getService() {
+ return this.service;
+ }
+ public void setService(Service service) {
+ this.service = service;
+ }
+
+ public void setVnfResources(ArrayList<VnfResource> vnfResources) {
+ this.vnfResources = vnfResources;
+ }
+ public ArrayList<VnfResource> getVnfResources() {
+ return this.vnfResources;
+ }
+ public void addVnfResource(VnfResource vr) {
+ if (vr != null) {
+ if (this.vnfResources != null) {
+ this.vnfResources.add(vr);
+ } else {
+ this.vnfResources = new ArrayList<VnfResource>();
+ this.vnfResources.add(vr);
+ }
+ }
+ }
+
+ public void setNetworkResourceCustomization(ArrayList<NetworkResourceCustomization> networkResourceCustomizations) {
+ this.networkResourceCustomizations = networkResourceCustomizations;
+ }
+ public ArrayList<NetworkResourceCustomization> getNetworkResourceCustomization() {
+ return this.networkResourceCustomizations;
+ }
+ public void addNetworkResourceCustomization(NetworkResourceCustomization nrc) {
+ if (this.networkResourceCustomizations != null) {
+ this.networkResourceCustomizations.add(nrc);
+ } else {
+ this.networkResourceCustomizations = new ArrayList<NetworkResourceCustomization>();
+ this.networkResourceCustomizations.add(nrc);
+ }
+ }
+
+ public void setAllottedResourceCustomization(ArrayList<AllottedResourceCustomization> allottedResourceCustomizations) {
+ this.allottedResourceCustomizations = allottedResourceCustomizations;
+ }
+ public ArrayList<AllottedResourceCustomization> getAllottedResourceCustomization() {
+ return this.allottedResourceCustomizations;
+ }
+ public void addAllottedResourceCustomization(AllottedResourceCustomization arc) {
+ if (this.allottedResourceCustomizations != null) {
+ this.allottedResourceCustomizations.add(arc);
+ } else {
+ this.allottedResourceCustomizations = new ArrayList<AllottedResourceCustomization>();
+ this.allottedResourceCustomizations.add(arc);
+ }
+ }
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("ServicePlus: ");
+ if (this.service != null) {
+ sb.append("service: " + this.service.toString());
+ } else {
+ sb.append("service: null");
+ }
+ if (this.vnfResources != null && this.vnfResources.size() > 0) {
+ int i=0;
+ sb.append("VnfResources: ");
+ for (VnfResource vr : this.vnfResources) {
+ sb.append(", vnfResource[" + i++ + "]:" + vr.toString());
+ }
+ } else {
+ sb.append("none");
+ }
+ if (this.networkResourceCustomizations != null && this.networkResourceCustomizations.size() > 0) {
+ int i=0;
+ sb.append("NetworkResourceCustomizations:");
+ for (NetworkResourceCustomization nrc : this.networkResourceCustomizations) {
+ sb.append("NRC[" + i++ + "]: " + nrc.toString());
+ }
+ }
+ if (this.allottedResourceCustomizations != null && this.allottedResourceCustomizations.size() > 0) {
+ int i=0;
+ sb.append("AllottedResourceCustomizations:");
+ for (AllottedResourceCustomization arc : this.allottedResourceCustomizations) {
+ sb.append("ARC[" + i++ + "]: " + arc.toString());
+ }
+ }
+
+ return sb.toString();
+ }
+
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
index 53ec3ba278..cc203ff98d 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
@@ -7,9 +7,9 @@
* 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.
@@ -26,6 +26,9 @@ package org.openecomp.mso.db.catalog.beans;
import java.sql.Timestamp;
import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import java.util.Date;
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import org.openecomp.mso.logger.MsoLogger;
public class ServiceRecipe extends MavenLikeVersioning {
private int id;
@@ -36,9 +39,38 @@ public class ServiceRecipe extends MavenLikeVersioning {
private String serviceParamXSD;
private int recipeTimeout;
private Integer serviceTimeoutInterim;
-
+
private Timestamp created;
-
+
+
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+ // This 'default' CTR is now needed for backward compatibility since a new CTR was added below
+ public ServiceRecipe() {
+ super();
+ }
+
+ // This CTR is needed by the HQL SELECT JOIN between the SERVICE and SERVICE_RECIPE tables
+ // in CatalogDatabase::getServiceRecipe()
+ public ServiceRecipe(int id, int serviceId, String action,
+ String description, String orchestrationUri,
+ String serviceParamXSD, int recipeTimeout,
+ int serviceTimeoutInterim, Date created) {
+ super();
+ LOGGER.debug("ServiceRecipe id=" + id + ", serviceId=" + serviceId + ", action=" + action + ", description=" + description +
+ ", orchestrationUri=" + orchestrationUri + ", serviceParamXSD=" + serviceParamXSD +
+ ", recipeTimeout=" + recipeTimeout + ", serviceTimeoutInterim=" + serviceTimeoutInterim + ", created=" + created);
+ this.id = id;
+ this.serviceId = serviceId;
+ this.action = action;
+ this.description = description;
+ this.orchestrationUri = orchestrationUri;
+ this.serviceParamXSD = serviceParamXSD;
+ this.recipeTimeout = recipeTimeout;
+ this.serviceTimeoutInterim = serviceTimeoutInterim;
+ long date = created.getTime();
+ this.created = new Timestamp(date);
+ }
public int getId() {
return id;
@@ -96,7 +128,7 @@ public class ServiceRecipe extends MavenLikeVersioning {
public void setServiceTimeoutInterim(Integer serviceTimeoutInterim) {
this.serviceTimeoutInterim = serviceTimeoutInterim;
}
-
+
public Timestamp getCreated() {
return created;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
new file mode 100644
index 0000000000..1fc93be6f5
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+public class ServiceToAllottedResources implements Serializable {
+
+ private String serviceModelUuid;
+ private String arModelCustomizationUuid;
+ private Timestamp created;
+
+ public static final long serialVersionUID = -1322322139926390329L;
+
+ public ServiceToAllottedResources() {
+ super();
+ }
+
+ public String getServiceModelUuid() {
+ return this.serviceModelUuid;
+ }
+ public void setServiceModelUuid(String serviceModelUuid) {
+ this.serviceModelUuid = serviceModelUuid;
+ }
+ public String getArModelCustomizationUuid() {
+ return this.arModelCustomizationUuid;
+ }
+ public void setArModelCustomizationUuid(String arModelCustomizationUuid) {
+ this.arModelCustomizationUuid = arModelCustomizationUuid;
+ }
+ public Timestamp getCreated() {
+ return this.created;
+ }
+ public void setCreated(Timestamp created) {
+ this.created = created;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("serviceModelUuid=");
+ sb.append(this.serviceModelUuid);
+ sb.append("arModelCustomizationUuid=");
+ sb.append(this.arModelCustomizationUuid);
+
+ return sb.toString();
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
new file mode 100644
index 0000000000..5ea171e93b
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.db.catalog.beans;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+public class ServiceToNetworks implements Serializable {
+
+ // This maps to SERVICE.SERVICE_NAME_VERSION_ID / Service.serviceNameVersionId in SERVICE/Service table
+ private String serviceModelUuid;
+ // This maps to NETWORK_RESOURCE_CUSTOMIZATION.MODEL_CUSTOMIZATION_UUID / NetworkResourceCustomization.ModelCustomizationUuid
+ private String networkModelCustomizationUuid;
+ private Timestamp created;
+ public static final long serialVersionUID = -1322322139926390329L;
+
+ public ServiceToNetworks() {
+ super();
+ }
+
+ public String getServiceModelUuid() {
+ return this.serviceModelUuid;
+ }
+ public void setServiceModelUuid(String serviceModelUuid) {
+ this.serviceModelUuid = serviceModelUuid;
+ }
+
+ public String getNetworkModelCustomizationUuid() {
+ return this.networkModelCustomizationUuid;
+ }
+ public void setNetworkModelCustomizationUuid(String networkCustomizationUuid) {
+ this.networkModelCustomizationUuid = networkCustomizationUuid;
+ }
+
+ public Timestamp getCreated() {
+ return this.created;
+ }
+ public void setCreated(Timestamp timestamp) {
+ this.created = timestamp;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("ServiceToNetworks mapping: ");
+ sb.append("serviceModelUuid=" + this.serviceModelUuid);
+ sb.append(",networkModelCustomizationUuid=" + networkModelCustomizationUuid);
+ return sb.toString();
+ }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
index 505b3bba9a..a551ef864e 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
@@ -7,9 +7,9 @@
* 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.
@@ -28,7 +28,7 @@ import java.text.DateFormat;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
public class VfModule extends MavenLikeVersioning {
-
+
private int id;
private Integer vnfResourceId;
private String type;
@@ -40,35 +40,40 @@ public class VfModule extends MavenLikeVersioning {
private Integer volEnvironmentId;
private String description;
private String asdcUuid;
- private Timestamp created;
+ private Timestamp created;
private String modelInvariantUuid;
private String modelVersion;
-
+ private String modelCustomizationUuid = null;
+ private Integer minInstances;
+ private Integer maxInstances;
+ private Integer initialCount;
+ private String label;
+
public VfModule() {
super();
}
-
+
public int getId(){
return this.id;
}
public void setId(int id) {
this.id = id;
}
-
+
public Integer getVnfResourceId() {
return this.vnfResourceId;
}
public void setVnfResourceId(Integer vnfResourceId) {
this.vnfResourceId = vnfResourceId;
}
-
+
public String getModelName() {
return this.modelName;
}
public void setModelName(String modelName) {
this.modelName = modelName;
}
-
+
public String getType() {
return type;
}
@@ -90,14 +95,14 @@ public class VfModule extends MavenLikeVersioning {
return true;
}
}
-
+
public Integer getTemplateId() {
return this.templateId;
}
public void setTemplateId(Integer templateId) {
this.templateId = templateId;
}
-
+
public Integer getEnvironmentId() {
return this.environmentId;
}
@@ -111,21 +116,21 @@ public class VfModule extends MavenLikeVersioning {
public void setVolTemplateId(Integer volTemplateId) {
this.volTemplateId = volTemplateId;
}
-
+
public Integer getVolEnvironmentId() {
return this.volEnvironmentId;
}
public void setVolEnvironmentId(Integer volEnvironmentId) {
this.volEnvironmentId = volEnvironmentId;
}
-
+
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
-
+
public String getAsdcUuid() {
return asdcUuid;
}
@@ -133,7 +138,7 @@ public class VfModule extends MavenLikeVersioning {
public void setAsdcUuid(String asdcUuidp) {
this.asdcUuid = asdcUuidp;
}
-
+
public Timestamp getCreated() {
return created;
}
@@ -147,19 +152,49 @@ public class VfModule extends MavenLikeVersioning {
public void setModelInvariantUuid(String modelInvariantUuid) {
this.modelInvariantUuid = modelInvariantUuid;
}
-
-
+
+
public String getModelVersion() {
return this.modelVersion;
}
public void setModelVersion(String modelVersion) {
this.modelVersion = modelVersion;
}
-
- @Override
+ public String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+ public Integer getMinInstances() {
+ return this.minInstances;
+ }
+ public void setMinInstances(Integer minInstances) {
+ this.minInstances = minInstances;
+ }
+ public Integer getMaxInstances() {
+ return this.maxInstances;
+ }
+ public void setMaxInstances(Integer maxInstances) {
+ this.maxInstances = maxInstances;
+ }
+ public Integer getInitialCount() {
+ return this.initialCount;
+ }
+ public void setInitialCount(Integer initialCount) {
+ this.initialCount = initialCount;
+ }
+ public String getLabel() {
+ return this.label;
+ }
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ @Override
public String toString () {
StringBuffer buf = new StringBuffer();
-
+
buf.append("VF=");
buf.append(this.type);
buf.append(",modelName=");
@@ -184,12 +219,22 @@ public class VfModule extends MavenLikeVersioning {
buf.append(asdcUuid);
buf.append(",modelVersion=");
buf.append(this.modelVersion);
-
+ buf.append(",modelCustomizationUuid=");
+ buf.append(this.modelCustomizationUuid);
+ buf.append(",minInstances=");
+ buf.append(this.minInstances);
+ buf.append(",maxInstances=");
+ buf.append(this.maxInstances);
+ buf.append(",initialCount=");
+ buf.append(this.initialCount);
+ buf.append(",label=");
+ buf.append(this.label);
+
if (this.created != null) {
buf.append (",created=");
buf.append (DateFormat.getInstance().format(this.created));
}
return buf.toString();
}
-
+
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
index 60c7ef216e..72f143dcc0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
@@ -7,9 +7,9 @@
* 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.
@@ -23,6 +23,7 @@ package org.openecomp.mso.db.catalog.beans;
import java.sql.Timestamp;
import java.text.DateFormat;
+import java.util.ArrayList;
import java.util.Map;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
@@ -31,30 +32,35 @@ public class VnfResource extends MavenLikeVersioning {
private int id;
private String vnfType;
-
+
private String orchestrationMode = null;
private String description = null;
private Integer templateId;
private Integer environmentId = null;
-
+
private Map <String, HeatFiles> heatFiles;
-
+
private String asdcUuid;
- private Timestamp created;
-
+ private Timestamp created;
+
private String aicVersionMin = null;
private String aicVersionMax = null;
-
+
private String modelInvariantUuid = null;
private String modelVersion = null;
private String modelCustomizationName = null;
-
+
private String modelName = null;
private String serviceModelInvariantUUID = null;
-
+ private String modelCustomizationUuid = null;
+
+ private ArrayList<VfModule> vfModules;
+
public VnfResource () {
+ super();
+ this.vfModules = new ArrayList<VfModule>();
}
public int getId () {
@@ -104,7 +110,7 @@ public class VnfResource extends MavenLikeVersioning {
public void setEnvironmentId (Integer environmentId) {
this.environmentId = environmentId;
}
-
+
public Map <String, HeatFiles> getHeatFiles () {
return this.heatFiles;
}
@@ -120,7 +126,7 @@ public class VnfResource extends MavenLikeVersioning {
public void setAsdcUuid(String asdcUuidp) {
this.asdcUuid = asdcUuidp;
}
-
+
public Timestamp getCreated() {
return created;
}
@@ -128,38 +134,38 @@ public class VnfResource extends MavenLikeVersioning {
public void setCreated(Timestamp created) {
this.created = created;
}
-
+
public String getAicVersionMin() {
return this.aicVersionMin;
}
-
+
public void setAicVersionMin(String aicVersionMin) {
this.aicVersionMin = aicVersionMin;
}
-
+
public String getAicVersionMax() {
return this.aicVersionMax;
}
-
+
public void setAicVersionMax(String aicVersionMax) {
this.aicVersionMax = aicVersionMax;
}
-
+
public String getModelInvariantUuid() {
return this.modelInvariantUuid;
}
-
+
public void setModelInvariantUuid(String modelInvariantUuid) {
this.modelInvariantUuid = modelInvariantUuid;
}
-
+
public String getModelVersion() {
return this.modelVersion;
}
public void setModelVersion(String modelVersion) {
this.modelVersion = modelVersion;
}
-
+
public String getModelCustomizationName() {
return modelCustomizationName;
}
@@ -184,6 +190,29 @@ public class VnfResource extends MavenLikeVersioning {
this.serviceModelInvariantUUID = serviceModelInvariantUUID;
}
+ public String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+
+ public ArrayList<VfModule> getVfModules() {
+ return this.vfModules;
+ }
+ public void setVfModules(ArrayList<VfModule> vfModules) {
+ this.vfModules = vfModules;
+ }
+ public void addVfModule(VfModule vfm) {
+ if (vfm != null) {
+ if (this.vfModules != null) {
+ this.vfModules.add(vfm);
+ } else {
+ this.vfModules = new ArrayList<VfModule>();
+ this.vfModules.add(vfm);
+ }
+ }
+ }
@Override
public String toString () {
StringBuffer buf = new StringBuffer();
@@ -214,11 +243,22 @@ public class VnfResource extends MavenLikeVersioning {
buf.append(this.modelName);
buf.append(",serviceModelInvariantUUID=");
buf.append(this.serviceModelInvariantUUID);
-
+ buf.append(",modelCustomizationUuid=");
+ buf.append(this.modelCustomizationUuid);
+
if (created != null) {
buf.append(",created=");
buf.append(DateFormat.getInstance().format(created));
}
+ if (this.vfModules != null && this.vfModules.size() > 0) {
+ buf.append("VfModules:");
+ int i=0;
+ for (VfModule vfm : this.vfModules) {
+ buf.append("vfModule[" + i++ + "]:" + vfm.toString());
+ }
+ } else {
+ buf.append("VfModules: NONE");
+ }
return buf.toString();
}