Package org.apache.sling.testing.mock.sling.servlet

# Class MockSlingJakartaHttpServletRequest

java.lang.Object
org.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest
org.apache.sling.testing.mock.sling.servlet.MockSlingJakartaHttpServletRequest

All Implemented Interfaces:
  `jakarta.servlet.http.HttpServletRequest`, `jakarta.servlet.ServletRequest`, `org.apache.sling.api.adapter.Adaptable`, `org.apache.sling.api.SlingJakartaHttpServletRequest`

public class MockSlingJakartaHttpServletRequest extends org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest
Mock `SlingJakartaHttpServletRequest` implementation.

## Field Summary

### Fields inherited from class org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest

`EMPTY_RESOURCE_BUNDLE, PLEASE_PROVDIDE_REQUEST_DISPATCHER_FACTORY`

### Fields inherited from interface jakarta.servlet.http.HttpServletRequest

`BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH`

## Constructor Summary

Constructors
Constructor
Description
`MockSlingJakartaHttpServletRequest(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull org.osgi.framework.BundleContext bundleContext)`
`MockSlingJakartaHttpServletRequest(@NotNull org.osgi.framework.BundleContext bundleContext)`
Instantiate with default resource resolver

## Method Summary

Modifier and Type
Method
Description
`ResourceBundle`
`getResourceBundle(String baseName, Locale locale)`
`protected @NotNull MockJakartaHttpSession`
`newMockHttpSession()`
`protected @NotNull MockRequestPathInfo`
`newMockRequestPathInfo()`

### Methods inherited from class org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest

`adaptTo, addCookie, addDateHeader, addHeader, addIntHeader, addPart, addRequestParameter, addRequestParameter, addRequestParameter, authenticate, changeSessionId, getAsyncContext, getAttribute, getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getContextPath, getCookie, getCookies, getDateHeader, getDispatcherType, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMethod, getParameter, getParameterMap, getParameterNames, getParameterValues, getPart, getParts, getPathInfo, getPathTranslated, getProtocol, getProtocolRequestId, getQueryString, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequestDispatcher, getRequestDispatcher, getRequestDispatcher, getRequestDispatcher, getRequestedSessionId, getRequestId, getRequestParameter, getRequestParameterList, getRequestParameterMap, getRequestParameters, getRequestPathInfo, getRequestProgressTracker, getRequestURI, getRequestURL, getResource, getResourceBundle, getResourceResolver, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, getServletPath, getSession, getSession, getUserPrincipal, isAsyncStarted, isAsyncSupported, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isUserInRole, login, logout, removeAttribute, setAttribute, setAuthType, setCharacterEncoding, setContent, setContentType, setContextPath, setDateHeader, setHeader, setIntHeader, setLocale, setMethod, setParameterMap, setPathInfo, setQueryString, setRemoteAddr, setRemoteHost, setRemotePort, setRemoteUser, setRequestDispatcherFactory, setResource, setResponseContentType, setScheme, setServerName, setServerPort, setServletPath, startAsync, startAsync, upgrade`

### Methods inherited from class org.apache.sling.api.adapter.SlingAdaptable

`setAdapterManager, unsetAdapterManager`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface jakarta.servlet.http.HttpServletRequest

`getHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilder`

## Constructor Details

### MockSlingJakartaHttpServletRequest

public MockSlingJakartaHttpServletRequest(@NotNull @NotNull org.osgi.framework.BundleContext bundleContext)
Instantiate with default resource resolver

Parameters:
  `bundleContext` - Bundle context

### MockSlingJakartaHttpServletRequest

public MockSlingJakartaHttpServletRequest(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull org.osgi.framework.BundleContext bundleContext)

Parameters:
  `resourceResolver` - Resource resolver
  `bundleContext` - Bundle context

## Method Details

### newMockRequestPathInfo

@NotNull protected @NotNull MockRequestPathInfo newMockRequestPathInfo()

Overrides:
  `newMockRequestPathInfo` in class `org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest`

### newMockHttpSession

@NotNull protected @NotNull MockJakartaHttpSession newMockHttpSession()

Overrides:
  `newMockHttpSession` in class `org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest`

### getResourceBundle

public ResourceBundle getResourceBundle(String baseName, Locale locale)

Specified by:
  `getResourceBundle` in interface `org.apache.sling.api.SlingJakartaHttpServletRequest`
Overrides:
  `getResourceBundle` in class `org.apache.sling.servlethelpers.MockSlingJakartaHttpServletRequest`