public class SetUWSParameter extends UWSAction
The UWS action which lets set the phase (RUN or ABORT), the execution duration and the destruction time of a job with a POST or PUT request on {job-id}/{uws-param}.
Note: The corresponding name is UWSAction.SET_UWS_PARAMETER
.
ADD_JOB, DESTROY_JOB, GET_JOB_PARAM, HOME_PAGE, JOB_SUMMARY, LIST_JOBS, SET_JOB_PARAM, SET_UWS_PARAMETER, uws
Constructor and Description |
---|
SetUWSParameter(UWSService u) |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(UWSUrl urlInterpreter,
JobOwner user,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the specified job (throw an error if not found),
and update the specified UWS standard parameter.
|
java.lang.String |
getDescription()
Gets the description of this UWS action.
|
java.lang.String |
getName()
Gets the name of this UWS action.
|
boolean |
match(UWSUrl urlInterpreter,
JobOwner user,
javax.servlet.http.HttpServletRequest request)
Checks whether:
a job list name is specified in the given UWS URL (note: by default, the existence of the jobs list is not checked),
a job ID is given in the UWS URL (note: by default, the existence of the job is not yet checked),
the job attribute "phase", "runID", "executionduration" or "destruction" is used in the UWS URL,
the HTTP method is HTTP-POST or HTTP-PUT.
|
public SetUWSParameter(UWSService u)
public java.lang.String getName()
UWSAction
Gets the name of this UWS action. MUST BE UNIQUE !
Note: By default the name of the class is returned (Class.getName()
).
getName
in class UWSAction
UWSAction.SET_UWS_PARAMETER
,
UWSAction.getName()
public java.lang.String getDescription()
UWSAction
Gets the description of this UWS action.
Note: By default an empty string is returned.
getDescription
in class UWSAction
public boolean match(UWSUrl urlInterpreter, JobOwner user, javax.servlet.http.HttpServletRequest request) throws UWSException
match
in class UWSAction
urlInterpreter
- The UWS URL of the given request.user
- The user who has sent the given request.request
- The received request.UWSException
- If any error occurs during the tests.UWSAction.match(UWSUrl, JobOwner, HttpServletRequest)
public boolean apply(UWSUrl urlInterpreter, JobOwner user, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws UWSException, java.io.IOException
apply
in class UWSAction
urlInterpreter
- The UWS URL of the given request.user
- The user who has sent the given request.request
- The received request.response
- The response of the given request (MUST BE UPDATED).UWSException
- If any error occurs during the action application.java.io.IOException
- If there is an error while the result is written in the given response.UWSAction.getJob(UWSUrl)
,
UWSJob.addOrUpdateParameter(String, Object)
,
UWSService.redirect(String, HttpServletRequest, JobOwner, String, HttpServletResponse)
,
UWSAction.apply(UWSUrl, JobOwner, HttpServletRequest, HttpServletResponse)