Package com.almworks.jira.structure.api.attribute
This package provides Attribute API. Attributes is a concept added by Structure platform for universal access to item data.
An attribute is something that can be calculated or retrieved for a structure row or an item. In Structure-based apps, most item data is retrieved not by going to a corresponding underlying service (like IssueService), but through attributes. Attributes also provide a way to show aggregate or derived values.
An attribute is identified by AttributeSpec
. To calculate
the values, client code passes ForestSpec
, row IDs and
attribute specifications to StructureAttributeService
and
receives a matrix with values as a result.
Attributes are extensible. The specific implementation of an attribute is provided by Structure itself or by other add-ons. It is therefore important to notice that if an add-on is installed or uninstalled, the implementation of some attributes may change.
For the SPI, see com.almworks.jira.structure.api.attribute.loader
package.
Note: It is important to differentiate attributes from columns. A column in Structure widget displays some HTML to the user. It usually requires one or more attributes to be loaded, it then takes attribute values and displays them somehow (sometimes as-is, sometimes not — for example, Icons column can display concatenated icons, loaded through several attributes.
-
ClassDescriptionContains information about problems experienced when loading a particular attribute.
AttributeSpec
is the "attribute specification", a composite identifier of an attribute.A builder for AttributeSpec.Provides normalization for attribute spec parameters.Used to check if the previously loaded values may have changed.Represents a value, or lack thereof.ImplementingAttributeValuesReceiver
and usingStructureAttributeService.loadAttributeValues(com.almworks.jira.structure.api.forest.ForestSpec, boolean, com.almworks.integers.LongList, java.util.Collection<? extends com.almworks.jira.structure.api.attribute.AttributeSpec<?>>, com.almworks.jira.structure.api.attribute.AttributeValuesReceiver)
methods allows for the calling code to get some values while other values are still being loaded, get metadata and cancel the loading process.ConsistentRowValues
carries the values loaded in a consistent way, that is, when all the requested data retained their values during the loading process.An object that implementsItemValues
interface is supplied as a result of attributes calculation byStructureAttributeService.getItemValues(java.util.Collection<com.almworks.jira.structure.api.item.ItemIdentity>, java.util.Collection<? extends com.almworks.jira.structure.api.attribute.AttributeSpec<?>>)
.LoadedValue<T>Represents a value loaded from the attribute system.LoadedValues<K>An interface that allows access to attribute values, loaded via the attribute system.An object that implementsRowValues
interface is supplied as a result of attributes calculation byStructureAttributeService
.This class contains row values and the update checker that can be used to see if these row values may have been outdated.CoreAttributeSpec
contains the attribute specifications and related constants for the well-known attributes.StructureAttributeService
provides a unified way to retrieve data for items.ValueColumn<K,T> Represents a map of values, with one value per key.ValueFormat<T>ValueFormat
is used as a part ofAttributeSpec
to define in what format the value should be returned.ValuesMeta
contains additional information about an attribute loading process, executed by callingStructureAttributeService.loadAttributeValues(com.almworks.jira.structure.api.forest.ForestSpec, boolean, com.almworks.integers.LongList, java.util.Collection<? extends com.almworks.jira.structure.api.attribute.AttributeSpec<?>>, com.almworks.jira.structure.api.attribute.AttributeValuesReceiver)
.