+ /**
+ * Process the service TOSCA.
+ *
+ * @param service model of the service artifact
+ * @param idTypeStore ID->Type mapping
+ * @param nodeTemplates a list of service nodes
+ *
+ */
+ public void processServiceTosca(Service service, Map<String, String> idTypeStore,
+ List<NodeTemplate> nodeTemplates) {
+ log.debug("Inside Service Tosca ");
+
+ // Get the resource/widgets in the service according to the node-template types
+ for (NodeTemplate node : nodeTemplates) {
+ if (node.getMetaData() != null) {
+ Model model = Model.getModelFor(correctNodeType(node));
+ if (model != null) {
+ model.populateModelIdentificationInformation(node.getMetaData().getAllProperties());
+ if (model instanceof Resource) {
+ // Keeping track of resource types and
+ // their uuid for identification during resource tosca processing
+ idTypeStore.put(model.getModelNameVersionId(), correctNodeType(node));
+ service.addResource((Resource) model);
+ } else {
+ service.addWidget((Widget) model);
+ }
+ }
+ } else {
+ log.warn(ApplicationMsgs.MISSING_SERVICE_METADATA, node.getName());
+ }
+ }
+ }
+