Interface TrackableBehaviorUtil
-
- All Known Implementing Classes:
DefaultTrackableBehaviorUtil
public interface TrackableBehaviorUtilUtility used to determine theTrackableBehaviorsettings for a domain class. The decision is initially based on the presence of anyTrackableBehaviorOverridebeans that match the class (or are a superclass of the requested domain class). Otherwise, anyTrackableExtensionannotations 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
TrackableBehaviorOverridebean 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).@BeanTrackableBehaviorOverride 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 booleancurrentRouteSupportsCatalog()Reports whether the currently active data route supports commonCatalogfunctionality.default booleancurrentRouteSupportsMarketplace()Reports whether the currently active data route supports common marketplace (ex:MarketplaceApplicationCatalog) functionality.TrackableBehaviorPackagegetInheritedBehavior(TrackableBehaviorInheritable domainInstance)Retrieve a pojo that describes the inheritedTrackableBehaviorattributes of a domain objectTrackableBehaviorPackagegetTrackableBehavior(Class<?> domainClass)Retrieve a pojo that describes theTrackableBehaviorattributes of a domain classTrackableBehaviorPackagegetTrackableBehavior(Object domainObject)Retrieve a pojo that describes theTrackableBehaviorattributes of a domain objectdefault booleanisSandboxPropagationEnabled()Whether or not sandbox propagation is enabled in the system.booleanisSandboxRecord(Trackable domainInstance)Determines whether the givenTrackableis a record in a sandbox.
-
-
-
Method Detail
-
getTrackableBehavior
@NonNull TrackableBehaviorPackage getTrackableBehavior(@NonNull Class<?> domainClass)
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
@NonNull TrackableBehaviorPackage getTrackableBehavior(@NonNull Object domainObject)
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
boolean isSandboxRecord(@NonNull Trackable domainInstance)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:
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()
-
-