Interface ExportRendererProvider<C extends ExportCell,M extends ExportColumn<C>>

Type Parameters:
C - The expected cell type.
M - The expected column type.

@PublicSpi public interface ExportRendererProvider<C extends ExportCell,M extends ExportColumn<C>>

ExportRendererProvider processes the export requests for the Structure widget columns. The required export format is represented by an ExportFormat instance, and a particular widget column is represented by its ViewSpecification.Column instance. If a renderer provider recognizes the format and the column, it must return a non-null ExportRenderer instance that will render the column. The renderer provider may throw a StructureProviderException when it is supposed to serve the export request, but unable to do so for whatever reason, e.g. missing or invalid column configuration, insufficient permissions, or an unexpected error downstream.

In general, all column specifications are given to all interested renderer providers for examination. In atlassian-plugin.xml the renderer providers can be assigned to specific column keys and/or export formats. The providers with no column key (format) associations are considered generic and used for all column keys (formats). More specific providers have precedence over more generic ones. The providers assigned to the current column key and export format are consulted first, then the providers for the current column key, then the providers for the current export format, then the completely generic providers. This allows the plug-in developers to mix generic and customized export renderers in a flexible way. The order within a specificity class is arbitrary, so if several providers have the same specificity and return ExportRenderer instances for the same column, it is not defined which one of them will be used.

Single-format renderer providers and their renderers can be parameterized with the expected ExportCell and ExportColumn subtypes. Generic or multiple-format providers and renderers can use the basic cell and column types or implement the raw interfaces.

Each renderer provider is also given a ExportRequestContext instance that corresponds to the current data request. To render aggregate columns, the provider must call prepareAggregate() on the given context. The result of the aggregate calculation will be available to the returned ExportRenderer instances via ExportRenderContext#getPreparedAggregates().

The provider can also associate arbitrary data with the current request by calling putObject() on the given context. The data will be available to ExportRenderer instances via ColumnContext.getObject(). Please note that contexts are shared between ExportRendererProvider and ExportRenderer instances from all plug-ins, so we advise that you use unique keys (e.g. private singleton objects or your own enums) to avoid conflicts.

todo update docs
See Also: