private static Map<Resource.Type, String> getKeyPropertyIds(String pkField, Resource.Type type) {

    Map<Resource.Type, String> keyPropertyIds = new HashMap<>();

    keyPropertyIds.put(Resource.Type.View, VIEW_NAME_PROPERTY_ID);
    keyPropertyIds.put(Resource.Type.ViewVersion, VIEW_VERSION_PROPERTY_ID);
    keyPropertyIds.put(Resource.Type.ViewInstance, INSTANCE_NAME_PROPERTY_ID);
    keyPropertyIds.put(type, pkField);

    return keyPropertyIds;
  }
Construct a view resource provider for the given resource type and bean class.

@param type            the resource type
@param clazz           the resource bean class
@param pkField         the primary key field name
@param viewDefinition  the associated view definition

@throws IntrospectionException if an exception occurs during introspection of the resource bean class
ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java