public class DestroyJob extends UWSAction
The "Destroy Job" action of a UWS.
Note: The corresponding name is UWSAction.DESTROY_JOB
.
This action destroys the job specified in the UWS URL. The response of this action is a redirection to the jobs list.
ADD_JOB, DESTROY_JOB, GET_JOB_PARAM, HOME_PAGE, JOB_SUMMARY, LIST_JOBS, SET_JOB_PARAM, SET_UWS_PARAMETER, uws
Constructor and Description |
---|
DestroyJob(UWSService u) |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(UWSUrl urlInterpreter,
JobOwner user,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Gets the specified jobs list (throw an error if not found),
gets the specified job (throw an error if not found),
destroys the job and makes a redirection to the jobs list.
|
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: the existence of the jobs list is not checked),
a job ID is given in the UWS URL (note: the existence of the job is not checked),
no job attribute is specified in the URL (i.e.
|
public DestroyJob(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.DESTROY_JOB
,
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
PARAM_ACTION
(=ACTION) with the value ACTION_DELETE
(=DELETE).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.getJobsList(UWSUrl)
,
UWSAction.getJob(UWSUrl, JobList)
,
JobList.destroyJob(String,JobOwner)
,
UWSService.redirect(String, HttpServletRequest, JobOwner, String, HttpServletResponse)
,
UWSAction.apply(UWSUrl, JobOwner, HttpServletRequest, HttpServletResponse)