public class WorkbenchRequest
extends javax.servlet.http.HttpServletRequestWrapper
TransformationServlet
.Constructor and Description |
---|
WorkbenchRequest(Repository repository,
javax.servlet.http.HttpServletRequest request,
Map<String,String> defaults)
Wrap a request with an object aware of the current repository and application defaults.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentFileName()
Get the name of any uploaded file that is part of this request.
|
InputStream |
getContentParameter()
Get the content of any uploaded file that is part of this request.
|
int |
getInt(String name)
Get the integer value associated with the given parameter name.
|
String |
getParameter(String name) |
String[] |
getParameterValues(String name) |
Resource |
getResource(String name)
Returns a
Resource corresponding to the value of the given parameter name. |
Map<String,String> |
getSingleParameterMap()
Gets a map of the all parameters with values, also caching them in this
WorkbenchRequest . |
String |
getTypeParameter()
Gets the value of the 'type' parameter.
|
IRI |
getURI(String name)
Gets the URI referred to by the parameter value.
|
URL |
getUrl(String name)
Gets the URL referred to by the parameter value.
|
Value |
getValue(String name)
Gets the
Value referred to by the parameter value. |
boolean |
isParameterPresent(String name)
Returns whether a non-null, non-empty value is available for the given parameter name.
|
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgrade
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
public WorkbenchRequest(Repository repository, javax.servlet.http.HttpServletRequest request, Map<String,String> defaults) throws RepositoryException, IOException, org.apache.commons.fileupload.FileUploadException
repository
- currently connected repositoryrequest
- current requestdefaults
- application default parameter valuesRepositoryException
- if there is an issue retrieving the parameter mapIOException
- if there is an issue retrieving the parameter maporg.apache.commons.fileupload.FileUploadException
- if there is an issue retrieving the parameter mappublic InputStream getContentParameter()
public String getContentFileName()
public int getInt(String name) throws BadRequestException
BadRequestException
- if the parameter is present but does not parse as an integerpublic String getParameter(String name)
getParameter
in interface javax.servlet.ServletRequest
getParameter
in class javax.servlet.ServletRequestWrapper
public String[] getParameterValues(String name)
getParameterValues
in interface javax.servlet.ServletRequest
getParameterValues
in class javax.servlet.ServletRequestWrapper
public boolean isParameterPresent(String name)
name
- parameter name to checkpublic Resource getResource(String name) throws BadRequestException, RepositoryException
Resource
corresponding to the value of the given parameter name.name
- of parameter to retrieve resource fromBadRequestException
- if a problem occurs parsing the parameter valueRepositoryException
public Map<String,String> getSingleParameterMap()
WorkbenchRequest
.public String getTypeParameter()
public IRI getURI(String name) throws BadRequestException, RepositoryException
name
- of the parameter to checkBadRequestException
- if the value doesn't parse as a URIRepositoryException
- if the name space prefix is not resolvablepublic URL getUrl(String name) throws BadRequestException
name
- of the parameter to checkBadRequestException
- if the value doesn't parse as a URLpublic Value getValue(String name) throws BadRequestException, RepositoryException
Value
referred to by the parameter value.name
- of the parameter to checkBadRequestException
- if the value doesn't parse as a URIRepositoryException
- if any name space prefix is not resolvableCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.