public final class MockSling extends Object
| Modifier and Type | Field and Description |
|---|---|
static ResourceResolverType |
DEFAULT_RESOURCERESOLVER_TYPE
Default resource resolver type is
ResourceResolverType.RESOURCERESOLVER_MOCK. |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearAdapterManagerBundleContext()
Clear adapter registrations..
|
static org.apache.sling.api.resource.ResourceResolver |
newResourceResolver()
Creates new sling resource resolver instance using
DEFAULT_RESOURCERESOLVER_TYPE. |
static org.apache.sling.api.resource.ResourceResolver |
newResourceResolver(ResourceResolverType type)
Creates new sling resource resolver instance.
|
static org.apache.sling.api.resource.ResourceResolverFactory |
newResourceResolverFactory()
Creates new sling resource resolver factory instance using
DEFAULT_RESOURCERESOLVER_TYPE. |
static org.apache.sling.api.resource.ResourceResolverFactory |
newResourceResolverFactory(ResourceResolverType type)
Creates new sling resource resolver factory instance.
|
static org.apache.sling.api.scripting.SlingScriptHelper |
newSlingScriptHelper()
Creates a new sling script helper instance using
DEFAULT_RESOURCERESOLVER_TYPE for the resource resolver. |
static org.apache.sling.api.scripting.SlingScriptHelper |
newSlingScriptHelper(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
org.osgi.framework.BundleContext bundleContext)
Creates a new sling script helper instance.
|
static void |
setAdapterManagerBundleContext(org.osgi.framework.BundleContext bundleContext)
Set bundle context for adapter manager.
|
public static final ResourceResolverType DEFAULT_RESOURCERESOLVER_TYPE
ResourceResolverType.RESOURCERESOLVER_MOCK.public static org.apache.sling.api.resource.ResourceResolverFactory newResourceResolverFactory(ResourceResolverType type)
type - Type of underlying repository.public static org.apache.sling.api.resource.ResourceResolverFactory newResourceResolverFactory()
DEFAULT_RESOURCERESOLVER_TYPE.public static org.apache.sling.api.resource.ResourceResolver newResourceResolver(ResourceResolverType type)
type - Type of underlying repository.public static org.apache.sling.api.resource.ResourceResolver newResourceResolver()
DEFAULT_RESOURCERESOLVER_TYPE.public static org.apache.sling.api.scripting.SlingScriptHelper newSlingScriptHelper(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
org.osgi.framework.BundleContext bundleContext)
request - Requestresponse - ResponsebundleContext - Bundle contextpublic static org.apache.sling.api.scripting.SlingScriptHelper newSlingScriptHelper()
DEFAULT_RESOURCERESOLVER_TYPE for the resource resolver.public static void setAdapterManagerBundleContext(org.osgi.framework.BundleContext bundleContext)
bundleContext - OSGi bundle contextpublic static void clearAdapterManagerBundleContext()
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.