1. Minor Java API Release

There are a few moderate changes coming with this release. The changes are backwards-compatible, so any code using API 16.x should work fine.

JIRA Version

New API Version

7.1+

16.5.0

See Structure API Versions for full version information and downloads.

2. Compatible Changes in the Java API

2.1. Bulk attribute loading

BulkAttributeLoader is a new optional interface for attribute loaders. If your loader implements it, Structure will call its preload() method once for each attribute calculation, allowing you to perform efficient bulk calculations, e.g. run a single JQL query for all issues in the forest.

Three new methods have been added to CompositeAttributeLoader to support bulk attribute loaders: hasBulkLoaders(), isBulkLoader() and preload().

2.2. Progress and cancellation for long-running processes

ProgressGauge is a new interface allowing you to track the progress of a long-running operation and gracefully cancel it from a different thread. Currently the only long-running operation with progress and cancellation support is RestoreOperation, which has a new method, getProgressGauge(). We plan to add progress and cancellation to BackupOperation in the future.

ProcessHandleManager implementation has been updated to support progress reporting and cancellation, both within a single JIRA instance and between different nodes in a Data Center environment. The following API methods have been added for this purpose:

  • ProcessInfo.getActivity()
  • ProcessInfo.getPercentComplete()
  • ProcessInfo.cancel()
  • ProcessFeedback.isCancelled()
  • ProcessUIController.setProgress()

2.3. SQuerySkeletonFactory interface (experimental)

SQuerySkeletonFactory is an experimental extension point which lets developers add new query types to Structure. It is a work in progress, and it does not have client-side support yet.

2.4. Miscellaneous

  • Added two new constants referring to the icon attribute, CoreAttributeSpecs.ICON and CoreAttributeSpecs.Id.ICON.
  • Added a new attribute value format, ValueFormat.ANY.
  • Added getProjectsForCurrentUser() method to StructurePluginHelper.
  • Added CoreSemantics.GROUP, a new semantics for group rows created by groupers.
  • Added I18nText.setArguments(Object[]), deprecated setArguments(String[]).
  • Added StructureUtil.isSubMap() method.

2.5. @Internal components and classes

ForestAccessCache is the component used by Structure and Structure-based add-ons to check users' access to JIRA issues and Structure rows. It has been moved to the API and marked @Internal.

SimpleAttributeProvider is an abstract base class for several AttributeLoaderProvider implementations in Structure. Its implementation has been changed to better support optional spec parameters, and the class has been marked @Internal.

3. Item Type API Example

We have added a new sample plugin, custom-itemtype, which contains the following:

  • a StructureItemType implementation for JIRA projects, complete with change tracking and access checks;
  • an AttributeLoaderProvider implementation, which loads project names and icons;
  • a StructureGenerator.Inserter implementation, which adds projects from one or more project categories.

You can download the plugin and its source code from API Usage Samples.