SDN Controller Blueprints Data Adaptor
[ccsdk/features.git] / blueprints-processor / plugin / assignment-provider / src / main / java / org / onap / ccsdk / config / assignment / service / ResourceModelService.java
index 7eb2196..9f3013b 100644 (file)
@@ -1,15 +1,18 @@
 /*\r
  * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * Modifications Copyright © 2018 IBM.\r
  * \r
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except\r
- * in compliance with the License. You may obtain a copy of the License at\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
  * \r
  * http://www.apache.org/licenses/LICENSE-2.0\r
  * \r
- * Unless required by applicable law or agreed to in writing, software distributed under the License\r
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\r
- * or implied. See the License for the specific language governing permissions and limitations under\r
- * the License.\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
  */\r
 \r
 package org.onap.ccsdk.config.assignment.service;\r
@@ -30,13 +33,13 @@ import com.att.eelf.configuration.EELFManager;
 \r
 public class ResourceModelService {\r
     private static EELFLogger logger = EELFManager.getInstance().getLogger(ResourceModelService.class);\r
-    \r
+\r
     private ConfigModelService configModelService;\r
-    \r
+\r
     public ResourceModelService(ConfigModelService configModelService) {\r
         this.configModelService = configModelService;\r
     }\r
-    \r
+\r
     public Map<String, String> getTemplatesContents(SvcLogicContext ctx, List<String> templateNames)\r
             throws SvcLogicException {\r
         Map<String, String> templatesContents = new HashMap<>();\r
@@ -53,7 +56,7 @@ public class ResourceModelService {
         }\r
         return templatesContents;\r
     }\r
-    \r
+\r
     public Map<String, List<ResourceAssignment>> getTemplatesResourceAssignments(SvcLogicContext ctx,\r
             List<String> templateNames) throws SvcLogicException {\r
         Map<String, List<ResourceAssignment>> templatesResourceAssignments = new HashMap<>();\r
@@ -63,12 +66,12 @@ public class ResourceModelService {
                     String resourceMappingContent = this.configModelService.getNodeTemplateMapping(ctx, templateName);\r
                     logger.info("Processing template ({}) with resource assignment content : {}", templateName,\r
                             resourceMappingContent);\r
-                    \r
+\r
                     if (StringUtils.isNotBlank(resourceMappingContent)) {\r
-                        \r
+\r
                         List<ResourceAssignment> resourceAssignments =\r
                                 TransformationUtils.getListfromJson(resourceMappingContent, ResourceAssignment.class);\r
-                        \r
+\r
                         if (resourceAssignments != null) {\r
                             ResourceAssignmentValidator resourceAssignmentValidator =\r
                                     new ResourceAssignmentValidator(resourceAssignments);\r
@@ -88,7 +91,7 @@ public class ResourceModelService {
         } catch (Exception e) {\r
             throw new SvcLogicException(e.getMessage());\r
         }\r
-        \r
+\r
         return templatesResourceAssignments;\r
     }\r
 }\r