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(org.osgi.framework.BundleContext bundleContext)
Creates new sling resource resolver instance using
DEFAULT_RESOURCERESOLVER_TYPE. |
static org.apache.sling.api.resource.ResourceResolver |
newResourceResolver(ResourceResolverType type,
org.osgi.framework.BundleContext bundleContext)
Creates new sling resource resolver instance.
|
static org.apache.sling.api.resource.ResourceResolverFactory |
newResourceResolverFactory(org.osgi.framework.BundleContext bundleContext)
Creates new sling resource resolver factory instance.
|
static org.apache.sling.api.resource.ResourceResolverFactory |
newResourceResolverFactory(ResourceResolverType type,
org.osgi.framework.BundleContext bundleContext)
Creates new sling resource resolver factory instance.
|
static org.apache.sling.api.scripting.SlingScriptHelper |
newSlingScriptHelper(org.osgi.framework.BundleContext bundleContext)
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(org.osgi.framework.BundleContext bundleContext)
bundleContext - Bundle contextpublic static org.apache.sling.api.resource.ResourceResolverFactory newResourceResolverFactory(ResourceResolverType type, org.osgi.framework.BundleContext bundleContext)
type - Type of underlying repository.bundleContext - Bundle contextpublic static org.apache.sling.api.resource.ResourceResolver newResourceResolver(ResourceResolverType type, org.osgi.framework.BundleContext bundleContext)
type - Type of underlying repository.bundleContext - Bundle contextpublic static org.apache.sling.api.resource.ResourceResolver newResourceResolver(org.osgi.framework.BundleContext bundleContext)
DEFAULT_RESOURCERESOLVER_TYPE.bundleContext - Bundle contextpublic 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(org.osgi.framework.BundleContext bundleContext)
DEFAULT_RESOURCERESOLVER_TYPE for the resource resolver.bundleContext - Bundle contextpublic static void setAdapterManagerBundleContext(org.osgi.framework.BundleContext bundleContext)
bundleContext - OSGi bundle contextpublic static void clearAdapterManagerBundleContext()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.