Package com.guinetik.hexafun.hexa
Class UseCaseInputStep<I,O>
java.lang.Object
com.guinetik.hexafun.hexa.UseCaseInputStep<I,O>
- Type Parameters:
I- The input type of the use caseO- The output type of the use case
Builder step for defining the input handling of a use case.
From here you can:
validate(ValidationPort)- Add validation before handlinghandle(UseCase)- Go directly to handler (no validation)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> UseCaseBuilderDefine the core logic of the use case without validation.validate(ValidationPort<I> validator) Add a validation step before the handler.
-
Constructor Details
-
UseCaseInputStep
-
-
Method Details
-
handle
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
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
-