Class IncidentServiceEndpoint
java.lang.Object
org.opencastproject.serviceregistry.impl.endpoint.IncidentServiceEndpoint
REST endpoint for Incident Service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprotected StringThis server's base URLprotected ServiceRegistryThe remote service managerprotected StringThe REST endpoint's base URLprotected IncidentServiceThe incident service -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) The method that is called, when the service is activatedjavax.ws.rs.core.ResponsegetIncident(long incidentId, String type) javax.ws.rs.core.ResponsegetIncidentsOfJobAsList(javax.servlet.http.HttpServletRequest request, List<Long> jobIds, String format, String type) javax.ws.rs.core.ResponsegetIncidentsOfJobAsTree(javax.servlet.http.HttpServletRequest request, long jobId, boolean cascade, String format, String type) javax.ws.rs.core.ResponsegetLocalization(long incidentId, String locale) javax.ws.rs.core.ResponsepostIncident(String jobXml, String date, String code, String severityString, String details, LocalHashMap params) voidsetIncidentService(IncidentService incidentService) OSGi callback for setting the incident service.
-
Field Details
-
FMT_FULL
- See Also:
-
FMT_DIGEST
- See Also:
-
FMT_SYS
- See Also:
-
svc
The incident service -
serviceRegistry
The remote service manager -
serverUrl
This server's base URL -
serviceUrl
The REST endpoint's base URL
-
-
Constructor Details
-
IncidentServiceEndpoint
public IncidentServiceEndpoint()
-
-
Method Details
-
setIncidentService
OSGi callback for setting the incident service. -
activate
public void activate(org.osgi.service.component.ComponentContext cc) The method that is called, when the service is activated- Parameters:
cc- The ComponentContext of this service
-
getIncidentsOfJobAsList
@GET @Produces({"application/xml","application/json"}) @Path("job/incidents.{type:xml|json}") public javax.ws.rs.core.Response getIncidentsOfJobAsList(@Context javax.servlet.http.HttpServletRequest request, @QueryParam("id") List<Long> jobIds, @QueryParam("format") @DefaultValue("sys") String format, @PathParam("type") String type) -
getIncidentsOfJobAsTree
@GET @Produces({"application/xml","application/json"}) @Path("job/{id}.{type:xml|json}") public javax.ws.rs.core.Response getIncidentsOfJobAsTree(@Context javax.servlet.http.HttpServletRequest request, @PathParam("id") long jobId, @QueryParam("cascade") @DefaultValue("false") boolean cascade, @QueryParam("format") @DefaultValue("sys") String format, @PathParam("type") String type) throws NotFoundException - Throws:
NotFoundException
-
getIncident
@GET @Produces({"application/xml","application/json"}) @Path("{id}.{type:xml|json}") public javax.ws.rs.core.Response getIncident(@PathParam("id") long incidentId, @PathParam("type") String type) throws NotFoundException - Throws:
NotFoundException
-
getLocalization
@GET @Produces("application/json") @Path("localization/{id}") public javax.ws.rs.core.Response getLocalization(@PathParam("id") long incidentId, @QueryParam("locale") String locale) throws NotFoundException - Throws:
NotFoundException
-
postIncident
@POST @Produces("application/xml") @Path("/") public javax.ws.rs.core.Response postIncident(@FormParam("job") String jobXml, @FormParam("date") String date, @FormParam("code") String code, @FormParam("severity") String severityString, @FormParam("details") String details, @FormParam("params") LocalHashMap params)
-