Package org.apache.sling.testing.teleporter.client

# Class DefaultPropertyBasedCustomizer

java.lang.Object
org.apache.sling.testing.teleporter.client.DefaultPropertyBasedCustomizer

All Implemented Interfaces:
  `org.apache.sling.junit.rules.TeleporterRule.Customizer`

public class DefaultPropertyBasedCustomizer extends Object implements org.apache.sling.junit.rules.TeleporterRule.Customizer
This is the default `TeleporterRule.Customizer` which is used in case `TeleporterRule.forClass(Class)` was called. It relies on system properties to configure the important aspects of teleporting.
It assumes that there is already a running Sling server at the given baseUrl. To provision such a server the slingstart-maven-plugin could be used for example.
The following system properties must be set for this Customizer to work

- `ClientSideTeleporter.baseUrl`, the server url on which Sling is already running

The following system properties may be set to further tweak the behavior:

- `ClientSideTeleporter.includeDependencyPrefixes`, comma-separated list of package prefixes for classes referenced from the IT. Only the classes having one of the given package prefix are included in the bundle being deployed to the given Sling instance together with the IT class itself. They are only included though in case they are referenced! If this is not set, no referenced classes will be included.
- `ClientSideTeleporter.excludeDependencyPrefixes`, comma-separated list of package prefixes for classes referenced from the IT. Classes having one of the given package prefix will not be included in the bundle being deployed to the given Sling instance together with the IT class itself. This takes precedence over the `ClientSideTeleporter.includeDependencyPrefixes`.
- `ClientSideTeleporter.embedClasses`, comma-separated list of fully qualified class names which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundle
- `ClientSideTeleporter.embedClassesDirectories`, comma-separated list directories containing class files which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundle
- `ClientSideTeleporter.additionalBundleHeaders`, comma-separated list of entries in the format `<name>:<value>` which should be added to the test bundle as additional headers
- `ClientSideTeleporter.testReadyTimeoutSeconds`, how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle. By default `12`.
- `ClientSideTeleporter.serverUsername`, the username with which to send requests to the Sling server. By default `admin`.
- `ClientSideTeleporter.serverPassword`, the password with which to send requests to the Sling server. By default `admin`.
- `ClientSideTeleporter.enableLogging`, set to true to log the tasks being performed by the teleporter. Useful for debugging.
- `ClientSideTeleporter.preventToUninstallBundle`, set to true to not automatically uninstall the test bundle after test execution. Useful for debugging.
- `ClientSideTeleporter.testBundleDirectory`, if set the test bundles are being persisted (before being installed) within the given directory name. If the directory does not exist, it will be automatically created. Useful for debugging.

## Constructor Summary

Constructors
Constructor
Description
`DefaultPropertyBasedCustomizer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`customize(org.apache.sling.junit.rules.TeleporterRule rule, String options)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultPropertyBasedCustomizer

public DefaultPropertyBasedCustomizer()

## Method Details

### customize

public void customize(org.apache.sling.junit.rules.TeleporterRule rule, String options)

Specified by:
  `customize` in interface `org.apache.sling.junit.rules.TeleporterRule.Customizer`