2 * Copyright (c) 2018 Huawei
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5 * the License. You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11 * specific language governing permissions and limitations under the License.
14 package org.onap.nbi.apis.serviceorder.utils;
18 import org.onap.nbi.apis.serviceorder.model.orchestrator.ServiceOrderItemInfo;
20 public class E2EServiceUtils {
21 public static boolean isE2EService(ServiceOrderItemInfo serviceOrderItemInfo){
22 Map<String,Object> sdcInfos = serviceOrderItemInfo.getCatalogResponse();
23 boolean e2eService = false;
24 if(sdcInfos.get("category")!=null){
25 String category = ((String)sdcInfos.get("category")).toLowerCase();
26 // Until SO comes up with one consolidated API for Service CRUD, ExtAPI has to be handle SO (serviceInstance and e2eServiceInstances )APIs for service CRUD
27 // All E2E Services are required to be created in SDC under category "E2E Services" until SO fixes the multiple API issue.
28 if(category.startsWith("e2e")) {