public final class SlingContext extends SlingContextImpl implements org.junit.rules.TestRule
componentContext, contentBuilder, contentLoader, modelAdapterFactory, request, resourceResolver, resourceResolverFactory, response, slingScriptHelper| Constructor and Description |
|---|
SlingContext()
Initialize Sling context.
|
SlingContext(ResourceResolverType resourceResolverType)
Initialize Sling context.
|
SlingContext(SlingContextCallback setUpCallback)
Initialize Sling context.
|
SlingContext(SlingContextCallback setUpCallback,
ResourceResolverType resourceResolverType)
Initialize Sling context.
|
SlingContext(SlingContextCallback setUpCallback,
SlingContextCallback tearDownCallback)
Initialize Sling context.
|
SlingContext(SlingContextCallback setUpCallback,
SlingContextCallback tearDownCallback,
ResourceResolverType resourceResolverType)
Initialize Sling context.
|
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
addModelsForPackage, bundleContext, componentContext, create, currentResource, currentResource, currentResource, getService, getServices, load, newResourceResolverFactory, registerDefaultServices, registerInjectActivateService, registerInjectActivateService, registerService, registerService, registerService, request, requestPathInfo, resourceResolver, resourceResolverType, response, runMode, setResourceResolverType, setUp, slingScriptHelper, tearDownpublic SlingContext()
If context is initialized with:
MockSling#DEFAULT_RESOURCERESOLVER_TYPE.ListGenerator.public SlingContext(ResourceResolverType resourceResolverType)
If context is initialized with:
MockSling#DEFAULT_RESOURCERESOLVER_TYPE.ListGenerator.resourceResolverType - Resource resolver type.public SlingContext(SlingContextCallback setUpCallback)
If context is initialized with:
MockSling#DEFAULT_RESOURCERESOLVER_TYPE.ListGenerator.setUpCallback - Allows the application to register an own callback
function that is called after the built-in setup rules are
executed.public SlingContext(SlingContextCallback setUpCallback, ResourceResolverType resourceResolverType)
If context is initialized with:
MockSling#DEFAULT_RESOURCERESOLVER_TYPE.ListGenerator.setUpCallback - Allows the application to register an own callback
function that is called after the built-in setup rules are
executed.resourceResolverType - Resource resolver type.public SlingContext(SlingContextCallback setUpCallback, SlingContextCallback tearDownCallback)
If context is initialized with:
MockSling#DEFAULT_RESOURCERESOLVER_TYPE.ListGenerator.setUpCallback - Allows the application to register an own callback
function that is called after the built-in setup rules are
executed.tearDownCallback - Allows the application to register an own
callback function that is called before the built-in teardown
rules are executed.public SlingContext(SlingContextCallback setUpCallback, SlingContextCallback tearDownCallback, ResourceResolverType resourceResolverType)
If context is initialized with:
MockSling#DEFAULT_RESOURCERESOLVER_TYPE.ListGenerator.setUpCallback - Allows the application to register an own callback
function that is called after the built-in setup rules are
executed.tearDownCallback - Allows the application to register an own
callback function that is called before the built-in teardown
rules are executed.resourceResolverType - Resource resolver type.Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.