Class JobEndpoint
java.lang.Object
org.opencastproject.adminui.endpoint.JobEndpoint
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactivate(org.osgi.framework.BundleContext bundleContext) com.google.gson.JsonObjecterrorDetailToJson(org.opencastproject.util.data.Tuple<String, String> detail) com.google.gson.JsonObjectgetIncidentAsJSON(long id, Locale locale) Return an incident serialized as JSON.com.google.gson.JsonArraygetIncidentsAsJSON(long jobId, Locale locale, boolean cascade) Returns the list of incidents for a given workflow instancejavax.ws.rs.core.ResponseList<com.google.gson.JsonObject> getJobsAsJSON(List<org.opencastproject.adminui.endpoint.JobEndpoint.JobExtended> jobs) voidsetIncidentService(org.opencastproject.serviceregistry.api.IncidentService incidentService) OSGi callback for the incident service.voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) OSGi callback for the service registry.voidsetUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) voidsetWorkflowService(org.opencastproject.workflow.api.WorkflowService workflowService) OSGi callback for the workflow service.
-
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
-
getJobsAsJSON
-
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 idlocale- the language in which title and description shall be returnedcascade- if true, return the incidents of the given job and those of of its descendants- Returns:
- the list incidents as JSON array
- Throws:
JobEndpointExceptionorg.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 idlocale- the locale to be used to create title and description- Returns:
- JSON object
- Throws:
JobEndpointExceptionorg.opencastproject.util.NotFoundException
-
errorDetailToJson
-