Klasse MockSlingHttpServletRequest

java.lang.Object
org.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.servlethelpers.MockSlingHttpServletRequest
org.apache.sling.testing.mock.sling.servlet.MockSlingHttpServletRequest
Alle implementierten Schnittstellen:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, org.apache.sling.api.adapter.Adaptable, org.apache.sling.api.SlingHttpServletRequest

public class MockSlingHttpServletRequest extends org.apache.sling.servlethelpers.MockSlingHttpServletRequest
Mock SlingHttpServletRequest implementation.
  • Feldübersicht

    Von Klasse geerbte Felder org.apache.sling.servlethelpers.MockSlingHttpServletRequest

    EMPTY_RESOURCE_BUNDLE

    Von Schnittstelle geerbte Felder javax.servlet.http.HttpServletRequest

    BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    MockSlingHttpServletRequest(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull org.osgi.framework.BundleContext bundleContext)
     
    MockSlingHttpServletRequest(@NotNull org.osgi.framework.BundleContext bundleContext)
    Instantiate with default resource resolver
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    getResourceBundle(String baseName, Locale locale)
     
    protected @NotNull MockHttpSession
     
    protected @NotNull MockRequestPathInfo
     

    Von Klasse geerbte Methoden org.apache.sling.servlethelpers.MockSlingHttpServletRequest

    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, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequestDispatcher, getRequestDispatcher, getRequestDispatcher, getRequestDispatcher, getRequestedSessionId, getRequestParameter, getRequestParameterList, getRequestParameterMap, getRequestParameters, getRequestPathInfo, getRequestProgressTracker, getRequestURI, getRequestURL, getResource, getResourceBundle, getResourceResolver, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getServletContext, getServletPath, getSession, getSession, getUserPrincipal, isAsyncStarted, isAsyncSupported, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, 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

    Von Klasse geerbte Methoden org.apache.sling.api.adapter.SlingAdaptable

    setAdapterManager, unsetAdapterManager

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • MockSlingHttpServletRequest

      public MockSlingHttpServletRequest(@NotNull @NotNull org.osgi.framework.BundleContext bundleContext)
      Instantiate with default resource resolver
      Parameter:
      bundleContext - Bundle context
    • MockSlingHttpServletRequest

      public MockSlingHttpServletRequest(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, @NotNull @NotNull org.osgi.framework.BundleContext bundleContext)
      Parameter:
      resourceResolver - Resource resolver
      bundleContext - Bundle context
  • Methodendetails

    • newMockRequestPathInfo

      @NotNull protected @NotNull MockRequestPathInfo newMockRequestPathInfo()
      Setzt außer Kraft:
      newMockRequestPathInfo in Klasse org.apache.sling.servlethelpers.MockSlingHttpServletRequest
    • newMockHttpSession

      @NotNull protected @NotNull MockHttpSession newMockHttpSession()
      Setzt außer Kraft:
      newMockHttpSession in Klasse org.apache.sling.servlethelpers.MockSlingHttpServletRequest
    • getResourceBundle

      public ResourceBundle getResourceBundle(String baseName, Locale locale)
      Angegeben von:
      getResourceBundle in Schnittstelle org.apache.sling.api.SlingHttpServletRequest
      Setzt außer Kraft:
      getResourceBundle in Klasse org.apache.sling.servlethelpers.MockSlingHttpServletRequest