Class PathResolverImpl

java.lang.Object
com.pragma.archetype.domain.service.PathResolverImpl
All Implemented Interfaces:
PathResolver

public class PathResolverImpl extends Object implements PathResolver
Implementation of PathResolver that handles path resolution and validation across different architecture types.
  • Constructor Details

  • Method Details

    • resolveAdapterPath

      public Path resolveAdapterPath(ArchitectureType architecture, String adapterType, String name, Map<String,String> context)
      Description copied from interface: PathResolver
      Resolves the path for an adapter based on architecture configuration.
      Specified by:
      resolveAdapterPath in interface PathResolver
      Parameters:
      architecture - The architecture type
      adapterType - The adapter type (driven or driving)
      name - The adapter name
      context - Additional context for placeholder substitution (basePackage, module, etc.)
      Returns:
      The resolved path
    • validatePath

      public ValidationResult validatePath(Path path, ArchitectureType architecture)
      Description copied from interface: PathResolver
      Validates that a path respects layer dependency rules.
      Specified by:
      validatePath in interface PathResolver
      Parameters:
      path - The path to validate
      architecture - The architecture type
      Returns:
      ValidationResult indicating if path is valid
    • substitutePlaceholders

      public String substitutePlaceholders(String template, Map<String,String> context)
      Description copied from interface: PathResolver
      Substitutes placeholders in a path template with actual values.
      Specified by:
      substitutePlaceholders in interface PathResolver
      Parameters:
      template - The path template with placeholders
      context - Map of placeholder names to values
      Returns:
      The path with placeholders substituted