@PublicApi public interface ExportRequestContext extends AttributeContext
A context that is passed to ExportRenderer
and ExportRendererProvider
during preparation
phase of the export.
The main capability of this interface is to allow the renderer to request calculation of specific attributes
via requireAttribute(com.almworks.jira.structure.api.attribute.AttributeSpec<?>)
methods. These attributes will be available later during the main phase of the
export.
Additionally, a renderer may prepare some data and store it in the context.
AttributeContext
,
ExportRenderContext
Modifier and Type | Method and Description |
---|---|
ForestSpec |
getForestSpec()
Returns the forest spec being exported.
|
void |
requireAttribute(AttributeSpec<?> attribute)
Require an attribute to be calculated for this request.
|
void |
requireAttribute(AttributeSpec<?> attribute,
boolean afterFiltering)
Deprecated.
Since Structure 5.3 you don't need to track the
afterFiltering flag,
please use requireAttribute(AttributeSpec) instead. |
getBaseForestSpec, getBaseStructureId, getBaseUrl, getI18nHelper, getLocale, getObject, getUser, putObject
void requireAttribute(@Nullable AttributeSpec<?> attribute)
Require an attribute to be calculated for this request. The values can later be
retrieved from ExportRow.get(AttributeSpec)
or ExportRenderContext.getValues()
.
attribute
- The attribute specification. Passing null
allowed and has no effect.ExportRow.get(AttributeSpec)
,
ExportRenderContext.getValues()
,
AttributeSpec
@Deprecated void requireAttribute(@Nullable AttributeSpec<?> attribute, boolean afterFiltering)
afterFiltering
flag,
please use requireAttribute(AttributeSpec)
instead.Require an attribute to be calculated for this request. Additionally, lets you specify whether the attribute value should be calculated on the forest that is being exported, or on the forest before the filtering, that is, with filter transformations skipped. (That doesn't have effect on the Filter generators that are part of the structure - only additional transformations are affected.)
The values can later be retrieved from ExportRow.get(AttributeSpec, boolean)
with the same value
of afterFiltering
.
attribute
- The attribute specification. Passing null
allowed and has no effect.afterFiltering
- If true, then values will be calculated on the forest being exported; if false, the values will
be calculated on the same forest, but without filtering transformations.ExportRow.get(AttributeSpec, boolean)
,
AttributeSpec
@NotNull ForestSpec getForestSpec()
Copyright © 2019 ALM Works. All Rights Reserved.