@Override
  public synchronized Set<SubResourceDefinition> getSubResourceDefinitions() {
    if (definitions == null) {
      definitions = new HashSet<>();
      List<String> subResourceNames = resourceConfiguration.getSubResourceNames();
      if (subResourceNames != null) {
        for (String subType : subResourceNames) {
          Resource.Type type = Resource.Type.valueOf(
              viewDefinition.getQualifiedResourceTypeName(subType));
          definitions.add(new SubResourceDefinition(type));
        }
      }
    }
    return definitions;
  }
Construct a sub-resource definition.

@param viewDefinition         the view definition
@param resourceConfiguration  the resource configuration
ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceDefinition.java