@ProviderType public final class SlingContextBuilder extends Object
SlingContext instances with different sets of parameters.| Constructor and Description |
|---|
SlingContextBuilder()
Create builder with default resource resolver type.
|
SlingContextBuilder(ResourceResolverType resourceResolverType)
Create builder with given resource resolver type.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> |
afterSetUp(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... afterSetUpCallback) |
<T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> |
afterTearDown(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... afterTearDownCallback) |
<T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> |
beforeSetUp(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... beforeSetUpCallback) |
<T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> |
beforeTearDown(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... beforeTearDownCallback) |
SlingContext |
build() |
<T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> |
plugin(org.apache.sling.testing.mock.osgi.context.ContextPlugin<T>... plugin) |
SlingContextBuilder |
resourceResolverFactoryActivatorProps(Map<String,Object> props)
Allows to override OSGi configuration parameters for the Resource Resolver Factory Activator service.
|
SlingContextBuilder |
resourceResolverType(ResourceResolverType resourceResolverType) |
public SlingContextBuilder()
public SlingContextBuilder(ResourceResolverType resourceResolverType)
resourceResolverType - Resource resolver type.public SlingContextBuilder resourceResolverType(ResourceResolverType resourceResolverType)
resourceResolverType - Resource resolver type.@SafeVarargs public final <T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> SlingContextBuilder plugin(org.apache.sling.testing.mock.osgi.context.ContextPlugin<T>... plugin)
T - context typeplugin - Context plugin which listens to context lifecycle events.@SafeVarargs public final <T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> SlingContextBuilder beforeSetUp(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... beforeSetUpCallback)
T - context typebeforeSetUpCallback - Allows the application to register an own callback function that is called before the built-in setup rules are executed.@SafeVarargs public final <T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> SlingContextBuilder afterSetUp(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... afterSetUpCallback)
T - context typeafterSetUpCallback - Allows the application to register an own callback function that is called after the built-in setup rules are executed.@SafeVarargs public final <T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> SlingContextBuilder beforeTearDown(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... beforeTearDownCallback)
T - context typebeforeTearDownCallback - Allows the application to register an own callback function that is called before the built-in teardown rules are executed.@SafeVarargs public final <T extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl> SlingContextBuilder afterTearDown(org.apache.sling.testing.mock.osgi.context.ContextCallback<T>... afterTearDownCallback)
T - context typeafterTearDownCallback - Allows the application to register an own callback function that is after before the built-in teardown rules are executed.public SlingContextBuilder resourceResolverFactoryActivatorProps(Map<String,Object> props)
props - Configuration propertiespublic SlingContext build()
SlingContext instance.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.