Interface StructureRow
- All Known Implementing Classes:
DummyRow,ShallowRow,SimpleRow,StructureRow.ZeroRow,SuperRootRow,TransientRow
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:
rowIDis the unique ID of the row.itemIDis the ID of the item that is displayed in this row.semanticsis the semantic code of the relationship between the row and its parent. Currently, semantics are not supported and are zero most of the times.originalIdandcreatorIdare additional properties, specified only for transient rows — seeRowManager.
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<I> ITries to resolve the item based on its ID, that is, get an object that represents this item.Returns item ID for the item shown in this row.longgetRowId()Returns row ID, a positive number.longReturns row's semantics.
-
Field Details
-
ROW_ZERO
-
-
Method Details
-
getRowId
long getRowId()Returns row ID, a positive number. -
getItemId
Returns item ID for the item shown in this row. -
getSemantics
long getSemantics()Returns row's semantics. -
getItem
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
nullin many different cases:- The item does not exist.
- The item is not accessible by the current user.
- The instance of
StructureRowwas created with theItemAccessMode.ITEM_NOT_NEEDEDflag. - The plugin module that is responsible for this type of items is disabled or missing.
- Item's object type is not reducible to
itemClass.
- Type Parameters:
I- type of item's objects- Parameters:
itemClass- expected class of the item's object- Returns:
- the item's object, or
null
-