summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IElementOperation.java4
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java12
2 files changed, 16 insertions, 0 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IElementOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IElementOperation.java
index e942ee1fde..05568b42f6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IElementOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/api/IElementOperation.java
@@ -98,6 +98,10 @@ public interface IElementOperation {
String getDefaultBaseType(String categoryName);
+ default boolean isDoNotExtendBaseType(String categoryName) {
+ return false;
+ }
+
Either<CategoryDefinition, ActionStatus> getCategory(NodeTypeEnum nodeType, String categoryId);
Either<SubCategoryDefinition, ActionStatus> getSubCategoryUniqueForType(NodeTypeEnum nodeType, String normalizedName);
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java
index bf74a264f8..882a34dfed 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java
@@ -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()) {