Class JobEndpoint

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final javax.ws.rs.core.Response
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    activate(org.osgi.framework.BundleContext bundleContext)
     
    com.google.gson.JsonObject
    errorDetailToJson(org.opencastproject.util.data.Tuple<String,String> detail)
     
    com.google.gson.JsonObject
    getIncidentAsJSON(long id, Locale locale)
    Return an incident serialized as JSON.
    com.google.gson.JsonArray
    getIncidentsAsJSON(long jobId, Locale locale, boolean cascade)
    Returns the list of incidents for a given workflow instance
    javax.ws.rs.core.Response
    getJobs(int limit, int offset, String filter, String sort)
     
    List<com.google.gson.JsonObject>
    getJobsAsJSON(List<org.opencastproject.adminui.endpoint.JobEndpoint.JobExtended> jobs)
     
    void
    setIncidentService(org.opencastproject.serviceregistry.api.IncidentService incidentService)
    OSGi callback for the incident service.
    void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    OSGi callback for the service registry.
    void
    setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
     
    void
    setWorkflowService(org.opencastproject.workflow.api.WorkflowService workflowService)
    OSGi callback for the workflow service.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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(org.opencastproject.workflow.api.WorkflowService workflowService)
      OSGi callback for the workflow service.
    • setServiceRegistry

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

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

      public void setUserDirectoryService(org.opencastproject.security.api.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, org.opencastproject.util.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
      org.opencastproject.util.NotFoundException
    • getIncidentAsJSON

      public com.google.gson.JsonObject getIncidentAsJSON(long id, Locale locale) throws JobEndpointException, org.opencastproject.util.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
      org.opencastproject.util.NotFoundException
    • errorDetailToJson

      public com.google.gson.JsonObject errorDetailToJson(org.opencastproject.util.data.Tuple<String,String> detail)