Interface TrackableBehaviorUtil
-
- All Known Implementing Classes:
DefaultTrackableBehaviorUtil
public interface TrackableBehaviorUtil
Utility used to determine theTrackableBehavior
settings for a domain class. The decision is initially based on the presence of anyTrackableBehaviorOverride
beans that match the class (or are a superclass of the requested domain class). Otherwise, anyTrackableExtension
annotations on the domain class are used. If neither are found, and the domain class implementsTrackable
, 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
currentRouteSupportsCatalog()
Reports whether the currently active data route supports commonCatalog
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 inheritedTrackableBehavior
attributes of a domain objectTrackableBehaviorPackage
getTrackableBehavior(Class<?> domainClass)
Retrieve a pojo that describes theTrackableBehavior
attributes of a domain classTrackableBehaviorPackage
getTrackableBehavior(Object domainObject)
Retrieve a pojo that describes theTrackableBehavior
attributes of a domain objectdefault boolean
isSandboxPropagationEnabled()
Whether or not sandbox propagation is enabled in the system.boolean
isSandboxRecord(Trackable domainInstance)
Determines whether the givenTrackable
is a record in a sandbox.
-
-
-
Method Detail
-
getTrackableBehavior
@NonNull TrackableBehaviorPackage getTrackableBehavior(@NonNull Class<?> domainClass)
Retrieve a pojo that describes theTrackableBehavior
attributes of a domain class- Parameters:
domainClass
- The domain class to review forTrackableBehavior
- Returns:
- Retrieve a pojo that describes the
TrackableBehavior
attributes of a domain class
-
getTrackableBehavior
@NonNull TrackableBehaviorPackage getTrackableBehavior(@NonNull Object domainObject)
Retrieve a pojo that describes theTrackableBehavior
attributes of a domain object- Parameters:
domainObject
- The domain object to review forTrackableBehavior
- Returns:
- Retrieve a pojo that describes the
TrackableBehavior
attributes of a domain object
-
getInheritedBehavior
@NonNull TrackableBehaviorPackage getInheritedBehavior(@NonNull TrackableBehaviorInheritable domainInstance)
Retrieve a pojo that describes the inheritedTrackableBehavior
attributes of a domain object- Parameters:
domainInstance
- The domain object to review for inheritedTrackableBehavior
- Returns:
- Retrieve a pojo that describes the inherited
TrackableBehavior
attributes of a domain object
-
isSandboxRecord
boolean isSandboxRecord(@NonNull Trackable domainInstance)
Determines whether the givenTrackable
is a record in a sandbox. This takes into account whetherdomainInstance
is 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 commonCatalog
functionality.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
Catalog
functionality, or false otherwise - See Also:
CatalogDataRouteSupporting
,NarrowingSupportFallbackProperties.isSupportsCatalog()
-
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:
MarketplaceDataRouteSupporting
,NarrowingSupportFallbackProperties.isSupportsMarketplace()
-
-