private String getProperty(String type, String key, String instanceProperty) {
    String value;

    if (context.getCluster() != null) {
      value = getProperty(type, key);
    } else {
      value = getViewProperty(instanceProperty);
    }
    return value;
  }
takes context and any extra custom properties that needs to be included into config
@param context
@param customProperties
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java