2 * Copyright (c) 2020 TechMahindra
\r
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
\r
5 * the License. You may obtain a copy of the License at
\r
7 * http://www.apache.org/licenses/LICENSE-2.0
\r
9 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
\r
10 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
\r
11 * specific language governing permissions and limitations under the License.
\r
14 package org.onap.nbi.apis.serviceorder.utils;
\r
16 import java.util.Map;
\r
18 import org.onap.nbi.apis.serviceorder.model.orchestrator.ServiceOrderItemInfo;
\r
20 public class MacroServiceUtils {
\r
21 public static boolean isMacroService(ServiceOrderItemInfo serviceOrderItemInfo) {
\r
22 Map<String, Object> sdcInfos = serviceOrderItemInfo.getCatalogResponse();
\r
23 boolean macroService = false;
\r
24 if (sdcInfos.get("instantiationType") != null) {
\r
25 String instantiationType = ((String) sdcInfos.get("instantiationType")).toLowerCase();
\r
26 if (instantiationType.equals("macro")) {
\r
27 macroService = true;
\r
30 return macroService;
\r