protected ResourceInstance createPermissionResource(String viewName, String viewVersion, String permissionId) {
    Map<Resource.Type,String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.View, viewName);
    mapIds.put(Resource.Type.ViewVersion, viewVersion);
    mapIds.put(Resource.Type.ViewPermission, permissionId);

    return createResource(Resource.Type.ViewPermission, mapIds);
  }
Create a permission resource.

@param permissionId permission name

@return a permission resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java