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.
16 package org.openecomp.sdc.be.datatypes.enums;
18 import lombok.AllArgsConstructor;
22 * Category Type Enum Any service category to be supported by SDC Ext API can be added here
28 public enum ExternalCategoryTypeEnum {
30 PARTNER_DOMAIN_SERVICE("Partner Domain Service", true);
32 private final String value;
33 private final boolean isAtomicType;
35 public static ExternalCategoryTypeEnum getType(String type) {
36 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
37 if (e.name().equals(type)) {
44 public static ExternalCategoryTypeEnum getTypeByName(String type) {
45 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
46 if (e.getValue().equalsIgnoreCase(type)) {
54 * Returns CategoryTypeEnum matching to received String ignore case
59 public static ExternalCategoryTypeEnum getTypeIgnoreCase(String type) {
60 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
61 if (e.getValue().equalsIgnoreCase(type)) {
69 * Checks if enum exist with given type
74 public static boolean containsName(String type) {
76 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
77 if (e.getValue().equals(type)) {
85 * Checks if enum exist with given type ignore case
90 public static boolean containsIgnoreCase(String type) {
92 for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
93 if (e.getValue().equalsIgnoreCase(type)) {