public ViewEntity getDefinition(ResourceTypeEntity resourceTypeEntity) {

    for (ViewEntity viewEntity : viewDefinitions.values()) {
      if (viewEntity.isDeployed()) {
        if (viewEntity.getResourceType().equals(resourceTypeEntity)) {
          return viewEntity;
        }
      }
    }
    return null;
  }
Get the view definition for the given resource type.

@param resourceTypeEntity the resource type
@return the view definition for the given resource type or null
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java