2 * Copyright (C) 2019 Telstra Intellectual Property. All rights reserved.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * 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
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 package org.openecomp.sdc.be.datatypes.enums;
17 import lombok.AllArgsConstructor;
21 * Category Type Enum Any service category to be supported by SDC Ext API can be added here
27 public enum ExternalCategoryTypeEnum {
28 PARTNER_DOMAIN_SERVICE("Partner Domain Service", true);
29 private final String value;
30 private final boolean isAtomicType;
32 public static ExternalCategoryTypeEnum getType(String type) {
33 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
34 if (e.name().equals(type)) {
41 public static ExternalCategoryTypeEnum getTypeByName(String type) {
42 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
43 if (e.getValue().equalsIgnoreCase(type)) {
51 * Returns CategoryTypeEnum matching to received String ignore case
56 public static ExternalCategoryTypeEnum getTypeIgnoreCase(String type) {
57 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
58 if (e.getValue().equalsIgnoreCase(type)) {
66 * Checks if enum exist with given type
71 public static boolean containsName(String type) {
72 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
73 if (e.getValue().equals(type)) {
81 * Checks if enum exist with given type ignore case
86 public static boolean containsIgnoreCase(String type) {
87 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
88 if (e.getValue().equalsIgnoreCase(type)) {