Sync Integ to Master
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / enums / ResourceTypeEnum.java
index a4efafb..8e026b1 100644 (file)
@@ -27,27 +27,34 @@ package org.openecomp.sdc.be.datatypes.enums;
  */
 public enum ResourceTypeEnum {
 
-       VFC("VFC (Virtual Function Component)"), 
-       VF("VF"/* (Virtual Function)" */), 
-       CP("CP (Connection Point)"), 
-       PNF("PNF"/* (Physical Network Function)" */),
-       CVFC("CVFC"/*Complex Virtual Function Component*/),
-       VL( "VL (Virtual Link)"), 
-       VFCMT("VFCMT (VFC Monitoring Template)"),
-       Configuration("Configuration ()"),
-       ServiceProxy("ServiceProxy ()"),
-       ABSTRACT("Abstract (Generic VFC/VF/PNF/Service Type)");
+       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),
+       ABSTRACT("Abstract (Generic VFC/VF/PNF/Service Type)", true);
 
        private String value;
+       private boolean isAtomicType;
 
-       private ResourceTypeEnum(String value) {
+       private ResourceTypeEnum(String value, boolean isAtomicType) {
                this.value = value;
+               this.isAtomicType = isAtomicType;
        }
 
        public String getValue() {
                return value;
        }
-       
+
+       public boolean isAtomicType() {
+               return isAtomicType;
+       }
+
        public static ResourceTypeEnum getType(String type) {
                for (ResourceTypeEnum e : ResourceTypeEnum.values()) {
                        if (e.name().equals(type)) {
@@ -56,7 +63,7 @@ public enum ResourceTypeEnum {
                }
                return null;
        }
-       
+
        public static ResourceTypeEnum getTypeByName(String type) {
                for (ResourceTypeEnum e : ResourceTypeEnum.values()) {
                        if (e.name().equalsIgnoreCase(type)) {
@@ -65,11 +72,13 @@ public enum ResourceTypeEnum {
                }
                return null;
        }
-/**
- * Returns ResourceTypeEnum matching to received String ignore case
- * @param type
- * @return
- */
+
+       /**
+        * Returns ResourceTypeEnum matching to received String ignore case
+        *
+        * @param type
+        * @return
+        */
        public static ResourceTypeEnum getTypeIgnoreCase(String type) {
                for (ResourceTypeEnum e : ResourceTypeEnum.values()) {
                        if (e.name().toLowerCase().equals(type.toLowerCase())) {
@@ -78,8 +87,10 @@ public enum ResourceTypeEnum {
                }
                return null;
        }
+
        /**
         * Checks if enum exist with given type
+        *
         * @param type
         * @return
         */
@@ -92,8 +103,10 @@ public enum ResourceTypeEnum {
                }
                return false;
        }
+
        /**
         * Checks if enum exist with given type ignore case
+        *
         * @param type
         * @return
         */
@@ -106,4 +119,5 @@ public enum ResourceTypeEnum {
                }
                return false;
        }
-}
+
+}
\ No newline at end of file