public class ShowHomePage extends UWSAction
The "Show UWS Home Page" action of a UWS.
Note: The corresponding name is UWSAction.HOME_PAGE.
This action displays the UWS home page.
ADD_JOB, DESTROY_JOB, GET_JOB_PARAM, HOME_PAGE, JOB_SUMMARY, LIST_JOBS, SET_JOB_PARAM, SET_UWS_PARAMETER, uws| Constructor and Description |
|---|
ShowHomePage(UWSService u) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(UWSUrl urlInterpreter,
JobOwner user,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Writes the UWS home page in the given HttpServletResponse.
|
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 there is no jobs list name.
|
public ShowHomePage(UWSService u)
public java.lang.String getName()
UWSActionGets the name of this UWS action. MUST BE UNIQUE !
Note: By default the name of the class is returned (Class.getName()).
getName in class UWSActionUWSAction.HOME_PAGE,
UWSAction.getName()public java.lang.String getDescription()
UWSActionGets the description of this UWS action.
Note: By default an empty string is returned.
getDescription in class UWSActionpublic boolean match(UWSUrl urlInterpreter, JobOwner user, javax.servlet.http.HttpServletRequest request) throws UWSException
match in class UWSActionurlInterpreter - 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(uws.service.UWSUrl, uws.job.user.JobOwner, javax.servlet.http.HttpServletRequest)public boolean apply(UWSUrl urlInterpreter, JobOwner user, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws UWSException, java.io.IOException
Writes the UWS home page in the given HttpServletResponse. 3 cases are possible:
UWSService.isDefaultHomePage() returns true):
write the appropriate (considering the Accept header of the HTTP-Request) serialization of this UWS.UWSService.isHomePageRedirection() = true): call UWSService.redirect(String, HttpServletRequest, JobOwner, String, HttpServletResponse) with the UWSService.getHomePage() URL.UWSService.isHomePageRedirection() = false)): read the content of the resource at the UWSService.getHomePage() URL and copy it in the given HttpServletResponse.apply in class UWSActionurlInterpreter - 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 there is an error, mainly during the redirection.java.io.IOException - If there is an error while reading at a custom home page URL
or while writing in the given HttpServletResponse.UWSAction.apply(UWSUrl, JobOwner, HttpServletRequest, HttpServletResponse),
UWSService.redirect(String, HttpServletRequest, JobOwner, String, HttpServletResponse)