Enable using substitution mapping type directly
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / operations / impl / ElementOperation.java
index bf74a26..882a34d 100644 (file)
@@ -454,6 +454,18 @@ public class ElementOperation implements IElementOperation {
         return categoryBaseTypeConfig.isRequired();
     }
 
+    @Override
+    public boolean isDoNotExtendBaseType(final String categoryName) {
+        final Map<String, CategoryBaseTypeConfig> categoriesSpecificBaseTypeMap = getConfiguration().getServiceBaseNodeTypes();
+        if (MapUtils.isEmpty(categoriesSpecificBaseTypeMap)) {
+            return false;
+        }
+        final CategoryBaseTypeConfig categoryBaseTypeConfig = categoriesSpecificBaseTypeMap.get(categoryName);
+        if (categoryBaseTypeConfig == null) {
+            return false;
+        }
+        return categoryBaseTypeConfig.isDoNotExtendBaseType();
+    }
     private List<String> getCategoryBaseTypes(final String categoryName) {
         final Optional<CategoryBaseTypeConfig> categoryBaseTypeConfigOptional = getCategoryBaseTypeConfig(categoryName);
         if (categoryBaseTypeConfigOptional.isEmpty()) {