Class PathResolverImpl
java.lang.Object
com.pragma.archetype.domain.service.PathResolverImpl
- All Implemented Interfaces:
PathResolver
Implementation of PathResolver that handles path resolution and validation
across different architecture types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveAdapterPath(ArchitectureType architecture, String adapterType, String name, Map<String, String> context) Resolves the path for an adapter based on architecture configuration.substitutePlaceholders(String template, Map<String, String> context) Substitutes placeholders in a path template with actual values.validatePath(Path path, ArchitectureType architecture) Validates that a path respects layer dependency rules.
-
Constructor Details
-
PathResolverImpl
-
-
Method Details
-
resolveAdapterPath
public Path resolveAdapterPath(ArchitectureType architecture, String adapterType, String name, Map<String, String> context) Description copied from interface:PathResolverResolves the path for an adapter based on architecture configuration.- Specified by:
resolveAdapterPathin interfacePathResolver- Parameters:
architecture- The architecture typeadapterType- The adapter type (driven or driving)name- The adapter namecontext- Additional context for placeholder substitution (basePackage, module, etc.)- Returns:
- The resolved path
-
validatePath
Description copied from interface:PathResolverValidates that a path respects layer dependency rules.- Specified by:
validatePathin interfacePathResolver- Parameters:
path- The path to validatearchitecture- The architecture type- Returns:
- ValidationResult indicating if path is valid
-
substitutePlaceholders
Description copied from interface:PathResolverSubstitutes placeholders in a path template with actual values.- Specified by:
substitutePlaceholdersin interfacePathResolver- Parameters:
template- The path template with placeholderscontext- Map of placeholder names to values- Returns:
- The path with placeholders substituted
-