Class ProjectValidator

java.lang.Object
com.pragma.archetype.domain.service.ProjectValidator

public class ProjectValidator extends Object
Domain service responsible for validating project state before initialization. Ensures the project is in a valid state to be initialized with clean architecture.
  • Constructor Details

  • Method Details

    • validateForInitialization

      public ValidationResult validateForInitialization(Path projectPath, ProjectConfig config)
      Validates that the project can be initialized with clean architecture. Validation rules: 1. Project directory must exist 2. Project must not already be initialized (no .cleanarch.yml) 3. Project should be mostly empty (only build files allowed) 4. Configuration parameters must be valid
      Parameters:
      projectPath - the root directory of the project
      config - the configuration to validate
      Returns:
      ValidationResult with success status and any error messages
    • validateForComponentGeneration

      public ValidationResult validateForComponentGeneration(Path projectPath)
      Validates that a component can be generated in the project.
      Parameters:
      projectPath - the root directory of the project
      Returns:
      ValidationResult with success status and any error messages