doc / ch.tutteli.atrium.reporting / ReporterFactory

ReporterFactory

interface ReporterFactory (source)
Deprecated: A Reporter should now be be retrieved via ComponentFactoryContainer where the different components of a reporter should also be defined via ComponentFactoryContainer. This class will be removed with 0.17.0

Responsible to create a Reporter.

It identify itself via its id. This id can be used by a user to specify that this ReporterFactory shall be used. In order to do that, the user has to define the system property ch.tutteli.atrium.reporting.reporterFactory

Properties

id

abstract val id: String

Identification of the supplier

Functions

create

abstract fun create(): Reporter

Creates a new Reporter.

Companion Object Properties

ATRIUM_PROPERTY_KEY

const val ATRIUM_PROPERTY_KEY: String

The key of Atrium's property which is used to define which ReporterFactory shall be used. You can use ReporterFactory.specifyFactory or ReporterFactory.specifyFactoryIfNotYetSet

Companion Object Functions

specifyFactory

fun specifyFactory(reporterFactoryId: String): Unit

Sets Atrium's property with key ATRIUM_PROPERTY_KEY (which is ch.tutteli.atrium.reporting.reporterFactory) to the given reporterFactoryId regardless if another id was specified before.

specifyFactoryIfNotYetSet

fun specifyFactoryIfNotYetSet(reporterFactoryId: String): Unit

Sets Atrium's property with key ATRIUM_PROPERTY_KEY (which is ch.tutteli.atrium.reporting.reporterFactory) to the given reporterFactoryId if another id was not yet specified before.