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 boolean
allowTransitionPersistenceMessage
(Trackable domainInstance) Whether a persistence message will be dropped for sandbox transitions.default boolean
Reports whether the currently active data route supports commonCatalog
functionality.default boolean
Reports whether the currently active data route supports common marketplace (ex:MarketplaceApplicationCatalog
) functionality.getInheritedBehavior
(TrackableBehaviorInheritable domainInstance) Retrieve a pojo that describes the inheritedTrackableBehavior
attributes of a domain objectgetTrackableBehavior
(Class<?> domainClass) Retrieve a pojo that describes theTrackableBehavior
attributes of a domain classgetTrackableBehavior
(Object domainObject) Retrieve a pojo that describes theTrackableBehavior
attributes of a domain objectdefault boolean
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 Details
-
getTrackableBehavior
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
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
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
-
allowTransitionPersistenceMessage
Whether a persistence message will be dropped for sandbox transitions. This does not include deployments, which are always allowed. Default is false. -
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:
-
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:
-