Class HtmlToApproximateMarkdownServicePlugin.NonModifyingRequestWrapper
- java.lang.Object
-
- javax.servlet.ServletRequestWrapper
-
- javax.servlet.http.HttpServletRequestWrapper
-
- org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
- com.composum.ai.backend.slingbase.impl.HtmlToApproximateMarkdownServicePlugin.NonModifyingRequestWrapper
-
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest,javax.servlet.ServletRequest,org.apache.sling.api.adapter.Adaptable,org.apache.sling.api.SlingHttpServletRequest
- Enclosing class:
- HtmlToApproximateMarkdownServicePlugin
protected class HtmlToApproximateMarkdownServicePlugin.NonModifyingRequestWrapper extends org.apache.sling.api.wrappers.SlingHttpServletRequestWrapperWraps the request to make sure nothing is modified.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanhadInvalidOperationprotected booleaninAdaptTo
-
Constructor Summary
Constructors Constructor Description NonModifyingRequestWrapper(org.apache.sling.api.SlingHttpServletRequest wrappedRequest, String debuginfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <AdapterType>
AdapterTypeadaptTo(Class<AdapterType> type)booleanauthenticate(javax.servlet.http.HttpServletResponse response)StringchangeSessionId()javax.servlet.AsyncContextgetAsyncContext()ObjectgetAttribute(String name)StringgetMethod()We render with GET, obviously.@Nullable javax.servlet.RequestDispatchergetRequestDispatcher(@NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions options)@Nullable javax.servlet.RequestDispatchergetRequestDispatcher(@NotNull org.apache.sling.api.resource.Resource resource)@Nullable javax.servlet.RequestDispatchergetRequestDispatcher(@NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions options)org.apache.sling.api.request.RequestParametergetRequestParameter(String name)List<org.apache.sling.api.request.RequestParameter>getRequestParameterList()org.apache.sling.api.request.RequestParameterMapgetRequestParameterMap()org.apache.sling.api.request.RequestParameter[]getRequestParameters(String name)javax.servlet.http.HttpSessiongetSession()javax.servlet.http.HttpSessiongetSession(boolean create)protected HtmlToApproximateMarkdownServicePlugin.UnsupportedOperationCalledlogAndThrow(String error)voidlogin(String username, String password)voidlogout()voidremoveAttribute(String name)voidsetAttribute(String name, Object o)voidsetCharacterEncoding(String env)javax.servlet.AsyncContextstartAsync()javax.servlet.AsyncContextstartAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse)<T extends javax.servlet.http.HttpUpgradeHandler>
Tupgrade(Class<T> handlerClass)-
Methods inherited from class org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
getCookie, getRequestPathInfo, getRequestProgressTracker, getResource, getResourceBundle, getResourceBundle, getResourceResolver, getResponseContentType, getResponseContentTypes, getSlingRequest
-
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
-
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, setRequest
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.servlet.http.HttpServletRequest
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
-
Methods inherited from interface javax.servlet.ServletRequest
getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure
-
-
-
-
Constructor Detail
-
NonModifyingRequestWrapper
public NonModifyingRequestWrapper(org.apache.sling.api.SlingHttpServletRequest wrappedRequest, String debuginfo)
-
-
Method Detail
-
logAndThrow
protected HtmlToApproximateMarkdownServicePlugin.UnsupportedOperationCalled logAndThrow(String error)
-
getRequestParameter
public org.apache.sling.api.request.RequestParameter getRequestParameter(String name)
- Specified by:
getRequestParameterin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestParameterin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestParameterMap
public org.apache.sling.api.request.RequestParameterMap getRequestParameterMap()
- Specified by:
getRequestParameterMapin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestParameterMapin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestParameterList
public List<org.apache.sling.api.request.RequestParameter> getRequestParameterList()
- Specified by:
getRequestParameterListin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestParameterListin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestParameters
public org.apache.sling.api.request.RequestParameter[] getRequestParameters(String name)
- Specified by:
getRequestParametersin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestParametersin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getMethod
public String getMethod()
We render with GET, obviously.- Specified by:
getMethodin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getMethodin classjavax.servlet.http.HttpServletRequestWrapper
-
getRequestDispatcher
@Nullable public @Nullable javax.servlet.RequestDispatcher getRequestDispatcher(@NotNull @NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions options)- Specified by:
getRequestDispatcherin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestDispatcherin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestDispatcher
@Nullable public @Nullable javax.servlet.RequestDispatcher getRequestDispatcher(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions options)- Specified by:
getRequestDispatcherin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestDispatcherin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestDispatcher
@Nullable public @Nullable javax.servlet.RequestDispatcher getRequestDispatcher(@NotNull @NotNull org.apache.sling.api.resource.Resource resource)- Specified by:
getRequestDispatcherin interfaceorg.apache.sling.api.SlingHttpServletRequest- Overrides:
getRequestDispatcherin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getSession
public javax.servlet.http.HttpSession getSession(boolean create)
- Specified by:
getSessionin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getSessionin classjavax.servlet.http.HttpServletRequestWrapper
-
getSession
public javax.servlet.http.HttpSession getSession()
- Specified by:
getSessionin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getSessionin classjavax.servlet.http.HttpServletRequestWrapper
-
changeSessionId
public String changeSessionId()
- Specified by:
changeSessionIdin interfacejavax.servlet.http.HttpServletRequest- Overrides:
changeSessionIdin classjavax.servlet.http.HttpServletRequestWrapper
-
authenticate
public boolean authenticate(javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException- Specified by:
authenticatein interfacejavax.servlet.http.HttpServletRequest- Overrides:
authenticatein classjavax.servlet.http.HttpServletRequestWrapper- Throws:
IOExceptionjavax.servlet.ServletException
-
login
public void login(String username, String password) throws javax.servlet.ServletException
- Specified by:
loginin interfacejavax.servlet.http.HttpServletRequest- Overrides:
loginin classjavax.servlet.http.HttpServletRequestWrapper- Throws:
javax.servlet.ServletException
-
logout
public void logout() throws javax.servlet.ServletException- Specified by:
logoutin interfacejavax.servlet.http.HttpServletRequest- Overrides:
logoutin classjavax.servlet.http.HttpServletRequestWrapper- Throws:
javax.servlet.ServletException
-
upgrade
public <T extends javax.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, javax.servlet.ServletException
- Specified by:
upgradein interfacejavax.servlet.http.HttpServletRequest- Overrides:
upgradein classjavax.servlet.http.HttpServletRequestWrapper- Throws:
IOExceptionjavax.servlet.ServletException
-
setCharacterEncoding
public void setCharacterEncoding(String env)
- Specified by:
setCharacterEncodingin interfacejavax.servlet.ServletRequest- Overrides:
setCharacterEncodingin classjavax.servlet.ServletRequestWrapper
-
setAttribute
public void setAttribute(String name, Object o)
- Specified by:
setAttributein interfacejavax.servlet.ServletRequest- Overrides:
setAttributein classjavax.servlet.ServletRequestWrapper
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfacejavax.servlet.ServletRequest- Overrides:
removeAttributein classjavax.servlet.ServletRequestWrapper
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttributein interfacejavax.servlet.ServletRequest- Overrides:
getAttributein classjavax.servlet.ServletRequestWrapper
-
startAsync
public javax.servlet.AsyncContext startAsync() throws IllegalStateException- Specified by:
startAsyncin interfacejavax.servlet.ServletRequest- Overrides:
startAsyncin classjavax.servlet.ServletRequestWrapper- Throws:
IllegalStateException
-
startAsync
public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws IllegalStateException- Specified by:
startAsyncin interfacejavax.servlet.ServletRequest- Overrides:
startAsyncin classjavax.servlet.ServletRequestWrapper- Throws:
IllegalStateException
-
getAsyncContext
public javax.servlet.AsyncContext getAsyncContext()
- Specified by:
getAsyncContextin interfacejavax.servlet.ServletRequest- Overrides:
getAsyncContextin classjavax.servlet.ServletRequestWrapper
-
adaptTo
public <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
- Specified by:
adaptToin interfaceorg.apache.sling.api.adapter.Adaptable- Overrides:
adaptToin classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
-