+ return addResourceToGroupInternal(groupName, castedResource);
+ }
+
+ /*
+ * Method child classes can overload if they need application specific
+ * checks on the resource
+ */
+ protected Status addResourceToGroupInternal(String groupName, T resource) {
+ Set<T> group = resourceGroups.get(groupName);
+ // Update group and cluster
+ group.add(resource);
+ resourceGroups.put(groupName, group);
+
+ return new Status(StatusCode.SUCCESS, "Resource added successfully");
+