Interface TrackableBehaviorUtil
- All Known Implementing Classes:
DefaultTrackableBehaviorUtil
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);
}
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReports whether the currently active data route supports commonCatalogfunctionality.default booleanReports whether the currently active data route supports common marketplace (ex:MarketplaceApplicationCatalog) functionality.getInheritedBehavior(TrackableBehaviorInheritable domainInstance) Retrieve a pojo that describes the inheritedTrackableBehaviorattributes of a domain objectgetTrackableBehavior(Class<?> domainClass) Retrieve a pojo that describes theTrackableBehaviorattributes of a domain classgetTrackableBehavior(Object domainObject) Retrieve a pojo that describes theTrackableBehaviorattributes of a domain objectdefault booleanWhether or not sandbox propagation is enabled in the system.booleanisSandboxRecord(Trackable domainInstance) Determines whether the givenTrackableis a record in a sandbox.
-
Method Details
-
getTrackableBehavior
Retrieve a pojo that describes theTrackableBehaviorattributes of a domain class- Parameters:
domainClass- The domain class to review forTrackableBehavior- Returns:
- Retrieve a pojo that describes the
TrackableBehaviorattributes of a domain class
-
getTrackableBehavior
Retrieve a pojo that describes theTrackableBehaviorattributes of a domain object- Parameters:
domainObject- The domain object to review forTrackableBehavior- Returns:
- Retrieve a pojo that describes the
TrackableBehaviorattributes of a domain object
-
getInheritedBehavior
@NonNull TrackableBehaviorPackage getInheritedBehavior(@NonNull TrackableBehaviorInheritable domainInstance) Retrieve a pojo that describes the inheritedTrackableBehaviorattributes of a domain object- Parameters:
domainInstance- The domain object to review for inheritedTrackableBehavior- Returns:
- Retrieve a pojo that describes the inherited
TrackableBehaviorattributes of a domain object
-
isSandboxRecord
Determines whether the givenTrackableis a record in a sandbox. This takes into account whetherdomainInstanceis even sandboxable before checking the tracking level to determine if it's in a sandbox. -
isSandboxPropagationEnabled
default boolean isSandboxPropagationEnabled()Whether or not sandbox propagation is enabled in the system. SeeSandboxPropagationProperties. Default is false.- Returns:
- Whether or not sandbox propagation is enabled in the system
-
currentRouteSupportsCatalog
default boolean currentRouteSupportsCatalog()Reports whether the currently active data route supports commonCatalogfunctionality.In the event that data routing is disabled or the current data route is not
CatalogDataRouteSupporting, the value ofNarrowingSupportFallbackProperties.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.
- Returns:
- true if the current route supports common
Catalogfunctionality, or false otherwise - See Also:
-
currentRouteSupportsMarketplace
default boolean currentRouteSupportsMarketplace()Reports whether the currently active data route supports common marketplace (ex:MarketplaceApplicationCatalog) functionality.In the event that data routing is disabled or the current data route is not
MarketplaceDataRouteSupporting, the value ofNarrowingSupportFallbackProperties.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.
- Returns:
- true if the currently route supports common marketplace functionality, or false otherwise
- See Also:
-