Class ExecuteRestEndpoint
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.execute.impl.endpoint.ExecuteRestEndpoint
The REST endpoint for
ExecuteServices-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExecuteServiceThe execute serviceprotected ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckNotNull(Object... services) Checks if the service or services are available, if not it handles it by returning a 503 with a messagejavax.ws.rs.core.Responseexecute(String exec, String params, Float loadParam, String inputElementStr, String inputMpStr, String outputFileName, String elementTypeStr) Returns the job producer that is backing this REST endpoint.Return the service registry.voidsetExecuteService(ExecuteService service) Sets the serviceprotected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
serviceRegistry
The service registry -
service
The execute service
-
-
Constructor Details
-
ExecuteRestEndpoint
public ExecuteRestEndpoint()
-
-
Method Details
-
execute
@POST @Produces("text/xml") @Path("execute") public javax.ws.rs.core.Response execute(@FormParam("exec") String exec, @FormParam("params") String params, @FormParam("load") Float loadParam, @FormParam("inputElement") String inputElementStr, @FormParam("inputMediaPackage") String inputMpStr, @FormParam("outputFilename") String outputFileName, @FormParam("expectedType") String elementTypeStr) -
setExecuteService
Sets the service- Parameters:
service-
-
getService
Returns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
- See Also:
-
checkNotNull
Checks if the service or services are available, if not it handles it by returning a 503 with a message- Parameters:
services- an array of services to check
-
setServiceRegistry
Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
getServiceRegistry
Return the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint- See Also:
-