Interface Instance
-
- All Superinterfaces:
BuilderCustomizer
,org.junit.rules.TestRule
- All Known Implementing Classes:
AbstractInstance
,ExistingInstance
public interface Instance extends org.junit.rules.TestRule, BuilderCustomizer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 SeeInstanceSetup.INSTANCE_CONFIG_ADMINUSER
andInstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
<T extends org.apache.sling.testing.clients.SlingClient>
TgetAdminClient(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 SeeInstanceSetup.INSTANCE_CONFIG_ADMINUSER
andInstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
<T extends org.apache.sling.testing.clients.SlingClient>
TgetClient(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 beforeorg.apache.sling.testing.clients.instance.InstanceConfiguration
getConfiguration()
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 SeeInstanceSetup.INSTANCE_CONFIG_ADMINUSER
andInstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
<T extends org.apache.sling.testing.clients.SlingClient>
TnewClient(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 passwordInstance
orDefault(org.apache.sling.testing.clients.instance.InstanceConfiguration instanceConfiguration)
Instance
withRunMode(String runMode)
-
Methods inherited from interface org.apache.sling.testing.junit.rules.instance.BuilderCustomizer
customize
-
-
-
-
Method Detail
-
orDefault
Instance orDefault(org.apache.sling.testing.clients.instance.InstanceConfiguration instanceConfiguration)
-
getConfiguration
org.apache.sling.testing.clients.instance.InstanceConfiguration getConfiguration()
-
getClient
<T extends org.apache.sling.testing.clients.SlingClient> T 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- Type Parameters:
T
- the type of the returned client- Parameters:
clientClass
- the class of the returned clientuser
- the username used in the clientpass
- the password used in the client- Returns:
- a new client extending {{SlingClient}}
-
getAdminClient
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 SeeInstanceSetup.INSTANCE_CONFIG_ADMINUSER
andInstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
- Returns:
- a new {{SlingClient}}
-
getAdminClient
<T extends org.apache.sling.testing.clients.SlingClient> T 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 SeeInstanceSetup.INSTANCE_CONFIG_ADMINUSER
andInstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
- Type Parameters:
T
- the class of the returned client- Parameters:
clientClass
- the class of the returned client- Returns:
- a new client extending on {{SlingClient}}
-
newClient
<T extends org.apache.sling.testing.clients.SlingClient> T 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- Type Parameters:
T
- the type of the returned client- Parameters:
clientClass
- the class of the returned clientuser
- the username used in the clientpass
- the password used in the clientcustomizers
- array of customizers for this client- Returns:
- a new client extending {{SlingClient}}
-
newAdminClient
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 SeeInstanceSetup.INSTANCE_CONFIG_ADMINUSER
andInstanceSetup.INSTANCE_CONFIG_ADMINPASSWORD
- Parameters:
customizers
- array of customizers for this client- Returns:
- a new {{SlingClient}}
-
-