Class UseCaseInputStep<I,O>

java.lang.Object
com.guinetik.hexafun.hexa.UseCaseInputStep<I,O>
Type Parameters:
I - The input type of the use case
O - The output type of the use case

public class UseCaseInputStep<I,O> extends Object
Builder step for defining the input handling of a use case.

From here you can:

  • Constructor Details

  • Method Details

    • handle

      public <R> UseCaseBuilder handle(UseCase<I,R> handler)
      Define the core logic of the use case without validation.
      Type Parameters:
      R - The output type of the use case
      Parameters:
      handler - The use case logic that processes the input and produces output
      Returns:
      The builder for chaining more use cases
    • validate

      public UseCaseValidationStep<I> validate(ValidationPort<I> validator)
      Add a validation step before the handler.
      Parameters:
      validator - The validation port that checks the input
      Returns:
      The validation step for chaining more validators or the handler