@PublicApi
public interface StructureRow
StructureRow
instances represent rows, main building blocks of a forest.
Structures and query results emit forests. Forest
content is expressed as a sequence of row IDs.
To get more information about the row, you need to get StructureRow
instance from RowManager
.
A row has the following properties:
rowID
is the unique ID of the row.itemID
is the ID of the item that is displayed in this row.semantics
is the semantic code of the relationship between the row and its parent. Currently, semantics are
not supported and are zero most of the times.originalId
and creatorId
are additional properties, specified only for transient rows
— see RowManager
.Note that a single forest may contain the same item in multiple places, but all rows will be unique.
Rows are immutable. Persistent rows get stored in the database and are never updated nor deleted. Temporary rows get cleared when JIRA instance restarts. Garbage collection for rows is planned for the future.
Important: StructureRow
is a temporary object and must not be cached or leaked outside the current request, because it
stores the result of access check to the item for the current user.
Modifier and Type | Interface and Description |
---|---|
static class |
StructureRow.ZeroRow |
Modifier and Type | Field and Description |
---|---|
static StructureRow |
ROW_ZERO |
Modifier and Type | Method and Description |
---|---|
<I> I |
getItem(Class<I> itemClass)
Tries to resolve the item based on its ID, that is, get an object that represents this item.
|
ItemIdentity |
getItemId()
Returns item ID for the item shown in this row.
|
long |
getRowId()
Returns row ID, a positive number.
|
long |
getSemantics()
Returns row's semantics.
|
static final StructureRow ROW_ZERO
long getRowId()
@NotNull ItemIdentity getItemId()
long getSemantics()
@Nullable <I> I getItem(@NotNull Class<I> itemClass)
Tries to resolve the item based on its ID, that is, get an object that represents this item. Resolution includes checking the current user's access to that item, unless the row is created with an additional flag indicating that the access check should be skipped.
This method may return null
in many different cases:
StructureRow
was created with the ItemAccessMode.ITEM_NOT_NEEDED
flag.itemClass
.I
- type of item's objectsitemClass
- expected class of the item's objectnull
Copyright © 2024 Tempo Software. All Rights Reserved.