public abstract class AbstractInstance extends Object implements Instance
Constructor and Description |
---|
AbstractInstance() |
Modifier and Type | Method and Description |
---|---|
<T extends org.apache.sling.testing.clients.SlingClient.InternalBuilder> |
customize(T builder)
Customizes the builder and returns it.
|
org.apache.sling.testing.clients.SlingClient |
getAdminClient()
Return a new client pointing to the instance corresponding to this {{AbstractInstance}},
with the admin user and password, if it was not previously created, or the existing client if it has been created before
See
InstanceSetup.INSTANCE_CONFIG_ADMINUSER and InstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD |
<T extends org.apache.sling.testing.clients.SlingClient> |
getAdminClient(Class<T> clientClass)
Return a new client pointing to the instance corresponding to this {{AbstractInstance}},
with the admin user and password, if it was not previously created, or the existing client if it has been created before
See
InstanceSetup.INSTANCE_CONFIG_ADMINUSER and InstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD |
protected <B extends org.apache.sling.testing.clients.SlingClient.InternalBuilder,T extends org.apache.sling.testing.clients.SlingClient> |
getBuilder(Class<T> clientClass,
URI url,
String user,
String password) |
<T extends org.apache.sling.testing.clients.SlingClient> |
getClient(Class<T> clientClass,
String user,
String pass)
Return a new client pointing to the instance corresponding to this {{AbstractInstance}}
if it was never created with this username and password, or the existing client if it has been created before
|
org.apache.sling.testing.clients.SlingClient |
newAdminClient(BuilderCustomizer... customizers)
Return a new client pointing to the instance corresponding to this {{AbstractInstance}},
replacing the internally-cached client with this username and password
See
InstanceSetup.INSTANCE_CONFIG_ADMINUSER and InstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD |
<T extends org.apache.sling.testing.clients.SlingClient> |
newClient(Class<T> clientClass,
String user,
String pass,
BuilderCustomizer... customizers)
Return a new client pointing to the instance corresponding to this {{AbstractInstance}},
replacing the internally-cached client with this username and password
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration, orDefault, withRunMode
public <T extends org.apache.sling.testing.clients.SlingClient.InternalBuilder> T customize(T builder)
customize
in interface BuilderCustomizer
builder
- the builder to customizepublic <T extends org.apache.sling.testing.clients.SlingClient> T newClient(Class<T> clientClass, String user, String pass, BuilderCustomizer... customizers)
newClient
in interface Instance
T
- the type of the returned clientclientClass
- the class of the returned clientuser
- the username used in the clientpass
- the password used in the clientcustomizers
- array of customizers for this clientprotected <B extends org.apache.sling.testing.clients.SlingClient.InternalBuilder,T extends org.apache.sling.testing.clients.SlingClient> B getBuilder(Class<T> clientClass, URI url, String user, String password)
public org.apache.sling.testing.clients.SlingClient newAdminClient(BuilderCustomizer... customizers)
InstanceSetup.INSTANCE_CONFIG_ADMINUSER
and InstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
newAdminClient
in interface Instance
customizers
- array of customizers for this clientpublic <T extends org.apache.sling.testing.clients.SlingClient> T getClient(Class<T> clientClass, String user, String pass)
public org.apache.sling.testing.clients.SlingClient getAdminClient()
InstanceSetup.INSTANCE_CONFIG_ADMINUSER
and InstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
getAdminClient
in interface Instance
public <T extends org.apache.sling.testing.clients.SlingClient> T getAdminClient(Class<T> clientClass)
InstanceSetup.INSTANCE_CONFIG_ADMINUSER
and InstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
getAdminClient
in interface Instance
T
- the class of the returned clientclientClass
- the class of the returned clientCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.