public interface TrackableBehaviorUtil
TrackableBehavior
settings for a domain class. The decision
is initially based on the presence of any TrackableBehaviorOverride
beans that match the
class (or are a superclass of the requested domain class). Otherwise, any
TrackableExtension
annotations on the domain class are used. If neither are found, and
the domain class implements Trackable
, then the domain class is considered trackable, but
not sandboxable, application discriminatable or catalog discriminatable.
Configuring an override is as simple as declaring a TrackableBehaviorOverride
bean in a
Spring configuration file. For example, something like the following can be used to change the
out-of-the-box annotated behaviors (in this case removing any sandbox or multitenancy behavior).
@Bean
TrackableBehaviorOverride itemOverride() {
return new TrackableBehaviorOverride(JpaItem.class, null);
}
Modifier and Type | Method and Description |
---|---|
default boolean |
currentRouteSupportsCatalog()
Reports whether the currently active data route supports common
Catalog
functionality. |
default boolean |
currentRouteSupportsMarketplace()
Reports whether the currently active data route supports common marketplace (ex:
MarketplaceApplicationCatalog ) functionality. |
TrackableBehaviorPackage |
getInheritedBehavior(TrackableBehaviorInheritable domainInstance)
Retrieve a pojo that describes the inherited
TrackableBehavior attributes of a domain
object |
TrackableBehaviorPackage |
getTrackableBehavior(Class<?> domainClass)
Retrieve a pojo that describes the
TrackableBehavior attributes of a domain class |
TrackableBehaviorPackage |
getTrackableBehavior(Object domainObject)
Retrieve a pojo that describes the
TrackableBehavior attributes of a domain object |
default boolean |
isSandboxPropagationEnabled()
Whether or not sandbox propagation is enabled in the system.
|
boolean |
isSandboxRecord(Trackable domainInstance)
Determines whether the given
Trackable is a record in a sandbox. |
@NonNull TrackableBehaviorPackage getTrackableBehavior(@NonNull Class<?> domainClass)
TrackableBehavior
attributes of a domain classdomainClass
- The domain class to review for TrackableBehavior
TrackableBehavior
attributes of a domain
class@NonNull TrackableBehaviorPackage getTrackableBehavior(@NonNull Object domainObject)
TrackableBehavior
attributes of a domain objectdomainObject
- The domain object to review for TrackableBehavior
TrackableBehavior
attributes of a domain
object@NonNull TrackableBehaviorPackage getInheritedBehavior(@NonNull TrackableBehaviorInheritable domainInstance)
TrackableBehavior
attributes of a domain
objectdomainInstance
- The domain object to review for inherited TrackableBehavior
TrackableBehavior
attributes of
a domain objectboolean isSandboxRecord(@NonNull Trackable domainInstance)
Trackable
is a record in a sandbox. This takes into
account whether domainInstance
is even sandboxable before checking the tracking level
to determine if it's in a sandbox.default boolean isSandboxPropagationEnabled()
SandboxPropagationProperties
. Default is false.default boolean currentRouteSupportsCatalog()
Catalog
functionality.
In the event that data routing is disabled or the current data route is not
CatalogDataRouteSupporting
, the value of
NarrowingSupportFallbackProperties.isSupportsCatalog()
should be used as a fallback.
This can be useful to ensure certain behavior (ex: narrowing) will only apply if the current configuration has the requisite support for it.
Default returns true.
Catalog
functionality, or false
otherwiseCatalogDataRouteSupporting
,
NarrowingSupportFallbackProperties.isSupportsCatalog()
default boolean currentRouteSupportsMarketplace()
MarketplaceApplicationCatalog
) functionality.
In the event that data routing is disabled or the current data route is not
MarketplaceDataRouteSupporting
, the value of
NarrowingSupportFallbackProperties.isSupportsMarketplace()
will be used as a
fallback.
This can be useful to ensure certain behavior (ex: narrowing) will only apply if the current configuration has the requisite support for it.
Default returns true.
MarketplaceDataRouteSupporting
,
NarrowingSupportFallbackProperties.isSupportsMarketplace()
Copyright © 2021. All rights reserved.