Class JobEndpoint

java.lang.Object
org.opencastproject.adminui.endpoint.JobEndpoint

@Path("/admin-ng/job") public class JobEndpoint extends Object
  • Field Details

    • NOT_FOUND

      public static final javax.ws.rs.core.Response NOT_FOUND
  • Constructor Details

    • JobEndpoint

      public JobEndpoint()
  • Method Details

    • setWorkflowService

      public void setWorkflowService(WorkflowService workflowService)
      OSGi callback for the workflow service.
    • setServiceRegistry

      public void setServiceRegistry(ServiceRegistry serviceRegistry)
      OSGi callback for the service registry.
    • setIncidentService

      public void setIncidentService(IncidentService incidentService)
      OSGi callback for the incident service.
    • setUserDirectoryService

      public void setUserDirectoryService(UserDirectoryService userDirectoryService)
    • activate

      protected void activate(org.osgi.framework.BundleContext bundleContext)
    • getJobs

      @GET @Path("jobs.json") @Produces("application/json") public javax.ws.rs.core.Response getJobs(@QueryParam("limit") int limit, @QueryParam("offset") int offset, @QueryParam("filter") String filter, @QueryParam("sort") String sort)
    • getJobsAsJSON

      public List<com.google.gson.JsonObject> getJobsAsJSON(List<org.opencastproject.adminui.endpoint.JobEndpoint.JobExtended> jobs)
    • getIncidentsAsJSON

      public com.google.gson.JsonArray getIncidentsAsJSON(long jobId, Locale locale, boolean cascade) throws JobEndpointException, NotFoundException
      Returns the list of incidents for a given workflow instance
      Parameters:
      jobId - the workflow instance id
      locale - the language in which title and description shall be returned
      cascade - if true, return the incidents of the given job and those of of its descendants
      Returns:
      the list incidents as JSON array
      Throws:
      JobEndpointException
      NotFoundException
    • getIncidentAsJSON

      public com.google.gson.JsonObject getIncidentAsJSON(long id, Locale locale) throws JobEndpointException, NotFoundException
      Return an incident serialized as JSON.
      Parameters:
      id - incident id
      locale - the locale to be used to create title and description
      Returns:
      JSON object
      Throws:
      JobEndpointException
      NotFoundException
    • errorDetailToJson

      public com.google.gson.JsonObject errorDetailToJson(Tuple<String,String> detail)