Module input.port

Interface CreateMovieHandler

All Known Implementing Classes:
DefaultCreateMovieHandler

public interface CreateMovieHandler
Use-case boundary for creating a new movie.

Implementations validate and process a CreateMovieCommand, persist the resulting aggregate, and return the public identifier assigned to the new movie.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    io.smallrye.mutiny.Uni<uk.co.jasonmarston.movies.domain.valueobject.PublicId>
    handle(CreateMovieCommand createMovieCommand)
    Creates a new movie from the supplied command.
  • Method Details

    • handle

      io.smallrye.mutiny.Uni<uk.co.jasonmarston.movies.domain.valueobject.PublicId> handle(CreateMovieCommand createMovieCommand)
      Creates a new movie from the supplied command.
      Parameters:
      createMovieCommand - the validated command describing the movie to create
      Returns:
      a Uni that emits the public identifier of the created movie
      Throws:
      uk.co.jasonmarston.kiunzi.utility.validator.DomainInvariantViolationException - if the command cannot be converted into a valid movie aggregate