+
+ public static void setSupportedInstanceGroups(List<String> supportedInstanceGroups) {
+ instanceGroups = supportedInstanceGroups;
+ }
+
+ public static boolean isSupportedInstanceGroup(String groupType) {
+ return instanceGroups.contains(groupType);
+ }
+
+ public static Optional<Resource> createModelFromType(String typePrefix) {
+ return Optional.ofNullable(typeToWidget.get(typePrefix));
+ }
+
+ public static void setWidgetMappings(List<WidgetMapping> mappings) {
+ for (WidgetMapping mapping : mappings) {
+ Resource resource = new Resource(Widget.Type.valueOf(mapping.widget), mapping.deleteFlag);
+ resource.setIsResource(mapping.type.equalsIgnoreCase("resource"));
+ typeToWidget.put(mapping.prefix, resource);
+ }
+ }