Class MockSlingScriptHelper
- java.lang.Object
-
- org.apache.sling.testing.mock.sling.MockSlingScriptHelper
-
- All Implemented Interfaces:
org.apache.sling.api.scripting.SlingScriptHelper
public final class MockSlingScriptHelper extends Object implements org.apache.sling.api.scripting.SlingScriptHelper
MockSlingScriptHelper
implementation.
-
-
Constructor Summary
Constructors Constructor Description MockSlingScriptHelper(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull org.apache.sling.api.SlingHttpServletResponse response, @NotNull org.osgi.framework.BundleContext bundleContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
forward(@NotNull String path)
void
forward(@NotNull String path, String requestDispatcherOptions)
void
forward(@NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
void
forward(@NotNull org.apache.sling.api.resource.Resource resource)
void
forward(@NotNull org.apache.sling.api.resource.Resource resource, String requestDispatcherOptions)
void
forward(@NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
@NotNull org.apache.sling.api.SlingHttpServletRequest
getRequest()
@NotNull org.apache.sling.api.SlingHttpServletResponse
getResponse()
@NotNull org.apache.sling.api.scripting.SlingScript
getScript()
<ServiceType>
ServiceTypegetService(@NotNull Class<ServiceType> serviceType)
<ServiceType>
ServiceType[]getServices(@NotNull Class<ServiceType> serviceType, String filter)
void
include(@NotNull String path)
void
include(@NotNull String path, String requestDispatcherOptions)
void
include(@NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
void
include(@NotNull org.apache.sling.api.resource.Resource resource)
void
include(@NotNull org.apache.sling.api.resource.Resource resource, String requestDispatcherOptions)
void
include(@NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
void
setScript(@NotNull org.apache.sling.api.scripting.SlingScript script)
-
-
-
Method Detail
-
getRequest
@NotNull public @NotNull org.apache.sling.api.SlingHttpServletRequest getRequest()
- Specified by:
getRequest
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
getResponse
@NotNull public @NotNull org.apache.sling.api.SlingHttpServletResponse getResponse()
- Specified by:
getResponse
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
getService
public <ServiceType> ServiceType getService(@NotNull @NotNull Class<ServiceType> serviceType)
- Specified by:
getService
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
getServices
public <ServiceType> ServiceType[] getServices(@NotNull @NotNull Class<ServiceType> serviceType, String filter)
- Specified by:
getServices
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
getScript
@NotNull public @NotNull org.apache.sling.api.scripting.SlingScript getScript()
- Specified by:
getScript
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
setScript
public void setScript(@NotNull @NotNull org.apache.sling.api.scripting.SlingScript script)
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
forward
public void forward(@NotNull @NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
- Specified by:
forward
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
forward
public void forward(@NotNull @NotNull String path, String requestDispatcherOptions)
- Specified by:
forward
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
forward
public void forward(@NotNull @NotNull String path)
- Specified by:
forward
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
forward
public void forward(@NotNull @NotNull org.apache.sling.api.resource.Resource resource)
- Specified by:
forward
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
forward
public void forward(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, String requestDispatcherOptions)
- Specified by:
forward
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
forward
public void forward(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
- Specified by:
forward
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
include
public void include(@NotNull @NotNull String path, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
- Specified by:
include
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
include
public void include(@NotNull @NotNull String path, String requestDispatcherOptions)
- Specified by:
include
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
include
public void include(@NotNull @NotNull String path)
- Specified by:
include
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
include
public void include(@NotNull @NotNull org.apache.sling.api.resource.Resource resource)
- Specified by:
include
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
include
public void include(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, String requestDispatcherOptions)
- Specified by:
include
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
include
public void include(@NotNull @NotNull org.apache.sling.api.resource.Resource resource, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)
- Specified by:
include
in interfaceorg.apache.sling.api.scripting.SlingScriptHelper
-
-