class ViewSubResourceDefinition extends BaseResourceDefinition {

  @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;
  }

  public  ViewSubResourceDefinition(ViewEntity viewDefinition, ResourceConfig resourceConfiguration);

}