You are viewing documentation for Structure Server and Data Center version 5.6 and patch releases. For other versions, see Version Index or [Structure Cloud].
With Structure 6, we are introducing a number of breaking changes to Java API. (REST API remains backwards compatible.) The changes are called for because of a large remake of the attributes subsystem in the product.
If you have an integration or an extension of Structure, your code might break. More specifically:
StructureAttributeService
, your code may well break, but fixing it will most likely be trivial.There are new global per-instance settings in Structure, called attribute sensitivity configuration. The administrator has access to them via Administration | Structure | Attributes.
These settings govern the situation where a total or some other type of aggregation is performed over a forest that the user does not have a full access to – there are items that they don't see.
StructureConfiguration interface now can be used to read or update these settings with getAttributeSensitivitySettings()
/ setAttributeSensitivitySettings()
.
While the concept of trails remains, the API clients no longer have to deal with the trails. The clients are not supposed to implement their own cache – instead, they can request loading as frequently as needed, or use the Attribute Subscription Service.
AttributeSubscriptionService
is now a preferred way to continuously receive updates on the attribute values for a particular set of rows and attributes. It is being used by the Structure grid and through REST APIs.
We have introduced a concept of a "super-root", which is a virtual row above all the roots in the forest. It can be used to calculate a total across the whole forest, for example.
In order to support the super-root we had to reserve -1
as a special row ID number that identifies the super-root and only the super-root. It's now impossible to use -1
in Forest structures.
For more details, see SuperRootRow
class.
We list only some of the most important changes in this list. For a detailed description of the current API, see the javadocs.
Class Name | Backwards-Incompatible Changes | Other Changes |
---|---|---|
AttributeValue |
|
|
StructureAttributeService |
|
|
ValueFormat |
| |
AttributeSpec |
|
|
RowValues |
|
|
RestAttributeSpec |
| |
ItemForestBuffer |
| |
MigrationAwareSynchronizer |
| |
SyncUtil |
|
You only need to bother with SPI if you extend Structure functionality by adding new attributes.
With the new Attributes subsystem we've revamped and extended the types of attribute loaders / attributes that are supported. The new Structure now has support for the following attributes:
For a more in-depth description, see the AttributeLoader javadoc page. Note that there's a parallel hierarchy of AttributeLoaderContext
classes that has changed.
The new attribute subsystem is capable of caching attribute values in much more cases than the previous one. It is suggested that the implementations of attribute loaders avoid using AttributeCachingStrategy.MUST_NOT
and review the AttributeLoader
interface to see how the caching may be supported, for example, through context dependencies.
Also, we have introduced a new caching strategy – AttributeCachingStrategy.SHOULD_NOT
, which is handy when the calculated object is heavy and should not be stored, but it allows caching of the dependent attributes.
The loaders may now declare their dependencies on some contextual values, for example, on user locale. This governs the caching and invalidation.
On the other hand, in order to call methods like AttributeLoaderContext.getLocale()
, the loader must declare the context dependency.
Item and single row loaders can now be built more conveniently with a number of builders. Start with AttributeLoaders
class.
We list only some of the most important changes in this list. For a detailed description of the current API, see the javadocs.
Class Name | Backwards-Incompatible Changes | Other Changes |
---|---|---|
AttributeContext |
|
|
AttributeLoader |
| |
AttributeLoaderProvider |
| |
BulkAttributeLoader |
| |
AbstractDistinctAggregateLoader |
| |
AttributeLoaderSecurity |
| |
AbstractDistinctSumLoader |
| |
SimpleAttributeProvider |
| |
TrailItemSet |
|