@Override
  public Renderer getRenderer(String name) {
    if (name == null || name.equals("default")) {
      return new DefaultRenderer();
    } else if (name.equals("minimal")) {
      return new MinimalRenderer();
    } else if (name.contains("null_padding")
              || name.contains("no_padding")
              || name.contains("zero_padding")) {
      return new MetricsPaddingRenderer(name);
    } else {
      throw new IllegalArgumentException("Invalid renderer name for resource of type " + m_type);
    }
  }
Constructor.

@param resourceType the resource type
@param subTypes     the sub-resource types
@param directives   a map of directives for request types for this resource
ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java