diff options
Diffstat (limited to 'common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java index d0f1c23545..88ff61b6d1 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.sdc.be.datatypes.enums; import java.util.Arrays; @@ -27,20 +26,23 @@ import lombok.Getter; @Getter @AllArgsConstructor public enum ResourceTypeEnum { - + // @formatter:off VFC("VFC"/* (Virtual Function Component)"*/, true), VF("VF"/* (Virtual Function)" */, false), + CR("CR"/* (Complex Resource"*/, false), CP("CP"/* (Connection Point)"*/, true), + PNF("PNF"/* (Physical Network Function)" */, false), CVFC("CVFC"/* Complex Virtual Function Component*/, false), + VL("VL"/* (Virtual Link)"*/, true), VFCMT("VFCMT"/* (VFC Monitoring Template)"*/, true), - Configuration("Configuration", true), - ServiceProxy("ServiceProxy", true), + Configuration("Configuration", true), ServiceProxy("ServiceProxy", true), //Generic VFC/VF/PNF/Service Type ABSTRACT("Abstract", true), SERVICE("Service"/*(Network Service)"*/, false); + // @formatter:on private final String value; private final boolean isAtomicType; @@ -75,9 +77,7 @@ public enum ResourceTypeEnum { if (type == null) { return null; } - return Arrays.stream(ResourceTypeEnum.values()) - .filter(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type)) - .findFirst() + return Arrays.stream(ResourceTypeEnum.values()).filter(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type)).findFirst() .orElse(null); } @@ -91,8 +91,7 @@ public enum ResourceTypeEnum { if (type == null) { return false; } - return Arrays.stream(ResourceTypeEnum.values()) - .anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equals(type)); + return Arrays.stream(ResourceTypeEnum.values()).anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equals(type)); } /** @@ -105,8 +104,6 @@ public enum ResourceTypeEnum { if (type == null) { return false; } - return Arrays.stream(ResourceTypeEnum.values()) - .anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type)); + return Arrays.stream(ResourceTypeEnum.values()).anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type)); } - } |