The use case output port is called by the Interactor returning the response model, and the output port could be called many times with different responses.
Question: Could the output port has multiple methods and the response model divided into multiple response models one for each method?
I mean to do this
interface UpdateProfileOutputPort {
void userUpdated(UserResponse user);
void updatingUserError(String requestError);
void validationErrors(UpdateProfileValidationErrors errors);
}
instead of
interface UpdateProfileOutputPort {
void execute(UpdateProfileResponseModel response);
}
class UpdateProfileResponseModel{
UserResponse user;
String requestError;
UpdateProfileValidationErrors errors;
}