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.SlingHttpServletRequestWrapper
Wraps the request to make sure nothing is modified.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
hadInvalidOperation
protected boolean
inAdaptTo
-
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)
boolean
authenticate(javax.servlet.http.HttpServletResponse response)
String
changeSessionId()
javax.servlet.AsyncContext
getAsyncContext()
Object
getAttribute(String name)
String
getMethod()
We render with GET, obviously.@Nullable javax.servlet.RequestDispatcher
getRequestDispatcher(@NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions options)
@Nullable javax.servlet.RequestDispatcher
getRequestDispatcher(@NotNull org.apache.sling.api.resource.Resource resource)
@Nullable javax.servlet.RequestDispatcher
getRequestDispatcher(@NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions options)
org.apache.sling.api.request.RequestParameter
getRequestParameter(String name)
List<org.apache.sling.api.request.RequestParameter>
getRequestParameterList()
org.apache.sling.api.request.RequestParameterMap
getRequestParameterMap()
org.apache.sling.api.request.RequestParameter[]
getRequestParameters(String name)
javax.servlet.http.HttpSession
getSession()
javax.servlet.http.HttpSession
getSession(boolean create)
protected HtmlToApproximateMarkdownServicePlugin.UnsupportedOperationCalled
logAndThrow(String error)
void
login(String username, String password)
void
logout()
void
removeAttribute(String name)
void
setAttribute(String name, Object o)
void
setCharacterEncoding(String env)
javax.servlet.AsyncContext
startAsync()
javax.servlet.AsyncContext
startAsync(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:
getRequestParameter
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestParameter
in classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestParameterMap
public org.apache.sling.api.request.RequestParameterMap getRequestParameterMap()
- Specified by:
getRequestParameterMap
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestParameterMap
in classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestParameterList
public List<org.apache.sling.api.request.RequestParameter> getRequestParameterList()
- Specified by:
getRequestParameterList
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestParameterList
in classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getRequestParameters
public org.apache.sling.api.request.RequestParameter[] getRequestParameters(String name)
- Specified by:
getRequestParameters
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestParameters
in classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getMethod
public String getMethod()
We render with GET, obviously.- Specified by:
getMethod
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getMethod
in 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:
getRequestDispatcher
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestDispatcher
in 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:
getRequestDispatcher
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestDispatcher
in 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:
getRequestDispatcher
in interfaceorg.apache.sling.api.SlingHttpServletRequest
- Overrides:
getRequestDispatcher
in classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
getSession
public javax.servlet.http.HttpSession getSession(boolean create)
- Specified by:
getSession
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getSession
in classjavax.servlet.http.HttpServletRequestWrapper
-
getSession
public javax.servlet.http.HttpSession getSession()
- Specified by:
getSession
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
getSession
in classjavax.servlet.http.HttpServletRequestWrapper
-
changeSessionId
public String changeSessionId()
- Specified by:
changeSessionId
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
changeSessionId
in classjavax.servlet.http.HttpServletRequestWrapper
-
authenticate
public boolean authenticate(javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- Specified by:
authenticate
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
authenticate
in classjavax.servlet.http.HttpServletRequestWrapper
- Throws:
IOException
javax.servlet.ServletException
-
login
public void login(String username, String password) throws javax.servlet.ServletException
- Specified by:
login
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
login
in classjavax.servlet.http.HttpServletRequestWrapper
- Throws:
javax.servlet.ServletException
-
logout
public void logout() throws javax.servlet.ServletException
- Specified by:
logout
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
logout
in 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:
upgrade
in interfacejavax.servlet.http.HttpServletRequest
- Overrides:
upgrade
in classjavax.servlet.http.HttpServletRequestWrapper
- Throws:
IOException
javax.servlet.ServletException
-
setCharacterEncoding
public void setCharacterEncoding(String env)
- Specified by:
setCharacterEncoding
in interfacejavax.servlet.ServletRequest
- Overrides:
setCharacterEncoding
in classjavax.servlet.ServletRequestWrapper
-
setAttribute
public void setAttribute(String name, Object o)
- Specified by:
setAttribute
in interfacejavax.servlet.ServletRequest
- Overrides:
setAttribute
in classjavax.servlet.ServletRequestWrapper
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interfacejavax.servlet.ServletRequest
- Overrides:
removeAttribute
in classjavax.servlet.ServletRequestWrapper
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttribute
in interfacejavax.servlet.ServletRequest
- Overrides:
getAttribute
in classjavax.servlet.ServletRequestWrapper
-
startAsync
public javax.servlet.AsyncContext startAsync() throws IllegalStateException
- Specified by:
startAsync
in interfacejavax.servlet.ServletRequest
- Overrides:
startAsync
in classjavax.servlet.ServletRequestWrapper
- Throws:
IllegalStateException
-
startAsync
public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws IllegalStateException
- Specified by:
startAsync
in interfacejavax.servlet.ServletRequest
- Overrides:
startAsync
in classjavax.servlet.ServletRequestWrapper
- Throws:
IllegalStateException
-
getAsyncContext
public javax.servlet.AsyncContext getAsyncContext()
- Specified by:
getAsyncContext
in interfacejavax.servlet.ServletRequest
- Overrides:
getAsyncContext
in classjavax.servlet.ServletRequestWrapper
-
adaptTo
public <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
- Specified by:
adaptTo
in interfaceorg.apache.sling.api.adapter.Adaptable
- Overrides:
adaptTo
in classorg.apache.sling.api.wrappers.SlingHttpServletRequestWrapper
-
-