Loading microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/dto/CreateMovieDto.java +2 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ import java.util.List; public record CreateMovieDto(@NotBlank(message = "Name cannot be empty") String name, @NotBlank(message = "Director cannot be empty") String director, @NotBlank(message = "Description cannot be empty") String description, @NotEmpty(message = "Genres cannot be empty") Collection<MovieGenre> genres, String imageUrl, @NotEmpty(message = "At least one actor must be provided") List<String> actors) { Loading microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/dto/MovieDto.java +20 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ public class MovieDto { private String name; @NotBlank(message = "Director cannot be empty") private String director; @NotBlank(message = "Description cannot be empty") private String description; @NotEmpty(message = "At least one actor must be provided") private List<String> actors; @NotEmpty(message = "Genres cannot be empty") Loading Loading @@ -79,6 +81,24 @@ public class MovieDto { this.director = director; } /** * Gets the description of the movie. * * @return the description of the movie */ public String getDescription() { return description; } /** * Sets the description of the movie. * * @param description the description of the movie */ public void setDescription(final String description) { this.description = description; } /** * Gets the actors of the movie. * Loading microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/mapper/MovieMapper.java +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ public class MovieMapper { movieDto.setId(movie.getId()); movieDto.setName(movie.getName()); movieDto.setDirector(movie.getDirector()); movieDto.setDescription(movie.getDescription()); movieDto.setActors(movie.getActors()); movieDto.setGenres(movie.getGenres()); movieDto.setImageUrl(movie.getImageUrl()); Loading @@ -35,6 +36,7 @@ public class MovieMapper { Movie movie = new Movie(); movie.setName(movieDto.name()); movie.setDirector(movieDto.director()); movie.setDescription(movieDto.description()); movie.setActors(movieDto.actors()); movie.setGenres(movieDto.genres()); movie.setImageUrl(movieDto.imageUrl()); Loading @@ -52,6 +54,7 @@ public class MovieMapper { movie.setId(movieDto.getId()); movie.setName(movieDto.getName()); movie.setDirector(movieDto.getDirector()); movie.setDescription(movieDto.getDescription()); movie.setActors(movieDto.getActors()); movie.setGenres(movieDto.getGenres()); movie.setImageUrl(movieDto.getImageUrl()); Loading microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/model/Movie.java +29 −8 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ public class Movie { private Long id; private String name; private String director; private String description; private List<String> actors; private Collection<MovieGenre> genres; private String imageUrl; Loading @@ -22,15 +23,17 @@ public class Movie { * @param id The identifier of the movie. * @param name The name of the movie. * @param director The director of the movie. * @param description The description of the movie. * @param genres The genres of the movie. * @param actors The actors of the movie. * @param imageUrl The URL of the image of the movie. */ public Movie(final Long id, final String name, final String director, final Collection<MovieGenre> genres, final List<String> actors, final String imageUrl) { public Movie(final Long id, final String name, final String director, final String description, final Collection<MovieGenre> genres, final List<String> actors, final String imageUrl) { this.id = id; this.name = name; this.director = director; this.description = description; this.genres = genres; this.actors = actors; this.imageUrl = imageUrl; Loading Loading @@ -97,6 +100,24 @@ public class Movie { this.director = director; } /** * Gets the description of the movie. * * @return the description of the movie */ public String getDescription() { return description; } /** * Sets the description of the movie. * * @param description the description of the movie */ public void setDescription(final String description) { this.description = description; } /** * Gets the actors of the movie. * Loading Loading
microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/dto/CreateMovieDto.java +2 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ import java.util.List; public record CreateMovieDto(@NotBlank(message = "Name cannot be empty") String name, @NotBlank(message = "Director cannot be empty") String director, @NotBlank(message = "Description cannot be empty") String description, @NotEmpty(message = "Genres cannot be empty") Collection<MovieGenre> genres, String imageUrl, @NotEmpty(message = "At least one actor must be provided") List<String> actors) { Loading
microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/dto/MovieDto.java +20 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ public class MovieDto { private String name; @NotBlank(message = "Director cannot be empty") private String director; @NotBlank(message = "Description cannot be empty") private String description; @NotEmpty(message = "At least one actor must be provided") private List<String> actors; @NotEmpty(message = "Genres cannot be empty") Loading Loading @@ -79,6 +81,24 @@ public class MovieDto { this.director = director; } /** * Gets the description of the movie. * * @return the description of the movie */ public String getDescription() { return description; } /** * Sets the description of the movie. * * @param description the description of the movie */ public void setDescription(final String description) { this.description = description; } /** * Gets the actors of the movie. * Loading
microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/mapper/MovieMapper.java +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ public class MovieMapper { movieDto.setId(movie.getId()); movieDto.setName(movie.getName()); movieDto.setDirector(movie.getDirector()); movieDto.setDescription(movie.getDescription()); movieDto.setActors(movie.getActors()); movieDto.setGenres(movie.getGenres()); movieDto.setImageUrl(movie.getImageUrl()); Loading @@ -35,6 +36,7 @@ public class MovieMapper { Movie movie = new Movie(); movie.setName(movieDto.name()); movie.setDirector(movieDto.director()); movie.setDescription(movieDto.description()); movie.setActors(movieDto.actors()); movie.setGenres(movieDto.genres()); movie.setImageUrl(movieDto.imageUrl()); Loading @@ -52,6 +54,7 @@ public class MovieMapper { movie.setId(movieDto.getId()); movie.setName(movieDto.getName()); movie.setDirector(movieDto.getDirector()); movie.setDescription(movieDto.getDescription()); movie.setActors(movieDto.getActors()); movie.setGenres(movieDto.getGenres()); movie.setImageUrl(movieDto.getImageUrl()); Loading
microservices-monorepo/movies-management/src/main/java/cz/muni/fi/pa165/moviesmanagement/model/Movie.java +29 −8 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ public class Movie { private Long id; private String name; private String director; private String description; private List<String> actors; private Collection<MovieGenre> genres; private String imageUrl; Loading @@ -22,15 +23,17 @@ public class Movie { * @param id The identifier of the movie. * @param name The name of the movie. * @param director The director of the movie. * @param description The description of the movie. * @param genres The genres of the movie. * @param actors The actors of the movie. * @param imageUrl The URL of the image of the movie. */ public Movie(final Long id, final String name, final String director, final Collection<MovieGenre> genres, final List<String> actors, final String imageUrl) { public Movie(final Long id, final String name, final String director, final String description, final Collection<MovieGenre> genres, final List<String> actors, final String imageUrl) { this.id = id; this.name = name; this.director = director; this.description = description; this.genres = genres; this.actors = actors; this.imageUrl = imageUrl; Loading Loading @@ -97,6 +100,24 @@ public class Movie { this.director = director; } /** * Gets the description of the movie. * * @return the description of the movie */ public String getDescription() { return description; } /** * Sets the description of the movie. * * @param description the description of the movie */ public void setDescription(final String description) { this.description = description; } /** * Gets the actors of the movie. * Loading