private ResourceInstance createResource(String viewName, String version) {
    Map<Resource.Type,String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.View, viewName);
    mapIds.put(Resource.Type.ViewVersion, version);
    return createResource(Resource.Type.ViewVersion, mapIds);
  }
Get the permissions sub-resource

@param version  the version

@return the permission service

  @Path("{version}/permissions")
  public ViewPermissionService getPermissionHandler(@PathParam("version") String version) {

    return new ViewPermissionService(viewName, version);
  }

  // ----- helper methods ----------------------------------------------------

  /**
Create a view resource.

@param viewName view name

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