Package-level declarations

Types

Link copied to clipboard
data class Aggregate(val scopes: Set<String> = linkedSetOf(), val type: String? = null, val tenantId: String? = null, val id: String? = null, val commands: Set<String> = linkedSetOf(), val events: Set<String> = linkedSetOf()) : NamingScopes, Merge<Aggregate>

Configuration for an aggregate within a bounded context. Defines the aggregate's type, scopes, commands, events, and other metadata.

Link copied to clipboard

Interface for searching aggregates by different criteria. Provides a common contract for various aggregate search implementations.

Link copied to clipboard
data class BoundedContext(val alias: String? = null, val description: String = "", val scopes: Set<String> = linkedSetOf(), val aggregates: Map<String, Aggregate> = emptyMap()) : NamingScopes, Merge<BoundedContext> , DescriptionCapable

Configuration for a bounded context, containing aggregates and their metadata. A bounded context represents a logical boundary within the domain model.

Link copied to clipboard
interface Merge<T>

Interface for objects that can be merged with others of the same type. Used for combining metadata from multiple sources.

Link copied to clipboard

Central searcher for Wow metadata and aggregate configurations. Loads and caches metadata from classpath resources, providing various search capabilities for bounded contexts, aggregates, and their mappings.

Link copied to clipboard

Searcher that maps named aggregates to their corresponding aggregate types (classes). Allows lookup of aggregate classes by their named aggregate identifiers.

Link copied to clipboard
interface NamingScopes

Interface for entities that have package scopes. Scopes define the packages that belong to this entity.

Link copied to clipboard

Comparator for sorting package scopes by depth (number of dots) and length. Used to prioritize more specific scopes over general ones.

Link copied to clipboard

Scope searcher for finding named bounded contexts by package scopes. Maps package name prefixes to their corresponding bounded contexts.

Link copied to clipboard

Scope searcher for finding named aggregates by package scopes. Maps package name prefixes to their corresponding named aggregates.

Link copied to clipboard
interface ScopeSearcher<V : Any> : SortedMap<String, V>

Interface for searching values by package scope strings. Supports hierarchical scope matching where more specific scopes take precedence.

Link copied to clipboard

Searcher that maps aggregate types (classes) to their corresponding named aggregates. Allows lookup of named aggregates by their runtime class type.

Link copied to clipboard
data class WowMetadata(val contexts: Map<String, BoundedContext> = emptyMap()) : Merge<WowMetadata>

Root metadata class containing all bounded context configurations. WowMetadata represents the complete configuration for all bounded contexts and their aggregates.

Properties

Link copied to clipboard

The resource name for Wow metadata JSON files. Metadata files are loaded from this classpath resource location.

Functions

Link copied to clipboard

Finds the aggregate type class associated with this named aggregate.

Link copied to clipboard

Finds the named aggregate for the reified type T.

Link copied to clipboard

Finds the named aggregate associated with this class based on its package scope.

Link copied to clipboard

Finds the named bounded context associated with this class based on its package scope.

Link copied to clipboard

Finds the aggregate type class associated with this named aggregate, throwing an exception if not found.

Link copied to clipboard

Finds the named aggregate for the reified type T, throwing an exception if not found.

Link copied to clipboard

Finds the named aggregate associated with this class, throwing an exception if not found.

Link copied to clipboard

Finds the named bounded context associated with this class, throwing an exception if not found.

Link copied to clipboard

Converts WowMetadata to a NamedAggregateTypeSearcher. Creates the reverse mapping from named aggregates to their types using the type searcher.

Link copied to clipboard

Converts WowMetadata to a ScopeContextSearcher. Builds a mapping from package scopes to named bounded contexts.

Link copied to clipboard

Converts WowMetadata to a ScopeNamedAggregateSearcher. Builds a mapping from package scopes to named aggregates based on aggregate scopes, commands, and events.

Link copied to clipboard

Converts WowMetadata to a TypeNamedAggregateSearcher. Scans all contexts and aggregates in the metadata to build a mapping from aggregate classes to named aggregates. Skips aggregates whose types cannot be found at runtime.