Merge "Adding Junit"
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / Service.java
index 1caa348..37cad25 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
+ * ONAP - SO
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
@@ -39,8 +39,11 @@ public class Service extends MavenLikeVersioning implements Serializable {
        private Timestamp created;
        private String toscaCsarArtifactUUID;
        private String modelVersion;
+       private String category;
        private String serviceType;
        private String serviceRole;
+       private String environmentContext;
+       private String workloadContext;
        private Map<String,ServiceRecipe> recipes;
        private Set<ServiceToResourceCustomization> serviceResourceCustomizations;
        
@@ -115,8 +118,22 @@ public class Service extends MavenLikeVersioning implements Serializable {
                this.modelVersion = modelVersion;
        }
 
-       
-       public String getServiceType() {
+    /**
+     * @return Returns the category.
+     */
+    public String getCategory() {
+        return category;
+    }
+
+    
+    /**
+     * @param category The category to set.
+     */
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getServiceType() {
                return serviceType;
        }
 
@@ -131,18 +148,36 @@ public class Service extends MavenLikeVersioning implements Serializable {
        public void setServiceRole(String serviceRole) {
                this.serviceRole = serviceRole;
        }
+       public String getEnvironmentContext() {
+               return this.environmentContext;
+       }
+       public void setEnvironmentContext(String environmentContext) {
+               this.environmentContext = environmentContext;
+       }
+
+       public String getWorkloadContext() {
+               return this.workloadContext;
+       }
+       public void setWorkloadContext(String workloadContext) {
+               this.workloadContext = workloadContext;
+       }
 
        @Override
        public String toString() {
                StringBuilder sb = new StringBuilder();
-               sb.append("SERVICE: name=" + modelName + ",modelVersion=" + modelVersion + ",description=" + description+",modelInvariantUUID="+modelInvariantUUID+",toscaCsarArtifactUUID="+toscaCsarArtifactUUID+",serviceType="+serviceType+",serviceRole="+serviceRole);
+               sb.append("SERVICE: name=").append(modelName).append(",modelVersion=").append(modelVersion)
+                       .append(",description=").append(description).append(",modelInvariantUUID=").append(modelInvariantUUID)
+
+                       .append(",toscaCsarArtifactUUID=").append(toscaCsarArtifactUUID).append(",serviceType=").append(serviceType)
+                       .append(",serviceRole=").append(serviceRole).append(",envtContext=").append(this.environmentContext)
+                       .append(",workloadContext=").append(this.workloadContext);
                for (String recipeAction : recipes.keySet()) {
                        ServiceRecipe recipe = recipes.get(recipeAction);
-                       sb.append ("\n" + recipe.toString());
+                       sb.append("\n").append(recipe.toString());
                }
                
                for(ServiceToResourceCustomization serviceResourceCustomization : serviceResourceCustomizations) {
-                       sb.append("\n" + serviceResourceCustomization.toString());
+                       sb.append("\n").append(serviceResourceCustomization.toString());
                }
                if (created != null) {
                        sb.append (",created=");