From 66c7339101279c43ec1118705c79a2c4c7c133fd Mon Sep 17 00:00:00 2001 From: dziadeusz Date: Tue, 12 May 2020 20:48:49 +0200 Subject: [PATCH] refactor and extend the example --- .gitignore | 1 + .../adapters/api/ArticleController.java | 41 ------ .../adapters/api/ArticleEndpoint.java | 30 +++++ .../articles/adapters/api/ArticleFacade.java | 26 ++++ .../adapters/api/ArticleIdResponse.java | 15 ++- .../articles/adapters/api/ArticleRequest.java | 8 +- .../adapters/api/ArticleResponse.java | 10 +- .../articles/adapters/api/ArticleService.java | 24 ---- .../articledb/ArticleDatabaseModel.java | 124 +++++++++++++++++- .../articledb/DbArticleRepository.java | 44 +++---- .../authorservice/AuthorExternalModel.java | 64 ++++++++- ...ExternalServiceClientAuthorRepository.java | 19 ++- .../adapters/config/ArticleConfig.java | 26 ---- .../eventbus/ArticleCreatedEvent.java | 7 - .../eventbus/ArticleRetrievedEvent.java | 7 - .../MessageBrokerArticleEventPublisher.java | 29 ---- .../messagebroker/ArticleCreatedMessage.java | 25 ++++ .../ArticleRetrievedMessage.java | 26 ++++ .../MessageBrokerArticleMessageSender.java | 25 ++++ .../ArticleAuthorMailNotifier.java | 21 --- .../ArticleAuthorSmsNotifier.java | 21 --- .../notifications/ArticleMailModel.java | 31 ++++- .../notifications/ArticleSmsModel.java | 26 +++- .../notifications/AuthorMailNotifier.java | 17 +++ .../notifications/AuthorSmsNotifier.java | 17 +++ .../socialmedia/ArticleTwitterModel.java | 27 +++- .../socialmedia/TwitterArticlePublisher.java | 15 +-- .../adapters/socialmedia/TwitterClient.java | 12 ++ .../articles/config/ArticleConfig.java | 38 ++++++ .../articles/domain/ArticleFacade.java | 47 ------- .../articles/domain/ArticlePublisher.java | 32 +++++ .../articles/domain/model/Article.java | 30 ++++- .../hexagon/articles/domain/model/Author.java | 6 +- .../domain/ports/ArticleEventPublisher.java | 11 -- .../domain/ports/ArticleMessageSender.java | 11 ++ .../articles/domain/ports/ArticleService.java | 41 ++++++ ...uthorNotifier.java => AuthorNotifier.java} | 4 +- ...xagonal-architecture-example.kotlin_module | Bin 16 -> 0 bytes ...agonalArchitectureExampleApplication.class | Bin 813 -> 0 bytes .../adapters/api/ArticleController.class | Bin 2822 -> 0 bytes .../adapters/api/ArticleIdResponse.class | Bin 1022 -> 0 bytes .../adapters/api/ArticleRequest.class | Bin 1539 -> 0 bytes .../adapters/api/ArticleResponse.class | Bin 2142 -> 0 bytes .../adapters/api/ArticleService.class | Bin 2470 -> 0 bytes .../authorservice/AuthorExternalModel.class | Bin 388 -> 0 bytes ...xternalServiceClientAuthorRepository.class | Bin 2096 -> 0 bytes .../adapters/config/ArticleConfig.class | Bin 2248 -> 0 bytes .../adapters/events/ArticleCreatedEvent.class | Bin 374 -> 0 bytes .../events/ArticleRetrievedEvent.class | Bin 380 -> 0 bytes .../MessageBrokerArticleEventPublisher.class | Bin 1548 -> 0 bytes .../ArticleAuthorMailNotifier.class | Bin 1358 -> 0 bytes .../ArticleAuthorSmsNotifier.class | Bin 1354 -> 0 bytes .../notifications/ArticleMailModel.class | Bin 379 -> 0 bytes .../notifications/ArticleSmsModel.class | Bin 376 -> 0 bytes .../persistence/ArticleDatabaseModel.class | Bin 387 -> 0 bytes .../persistence/DbArticleRepository.class | Bin 4276 -> 0 bytes .../twitter/ArticleTwitterModel.class | Bin 376 -> 0 bytes .../twitter/TwitterArticlePublisher.class | Bin 1290 -> 0 bytes .../articles/domain/ArticleFacade.class | Bin 5274 -> 0 bytes .../domain/model/Article$ArticleBuilder.class | Bin 2094 -> 0 bytes .../articles/domain/model/Article.class | Bin 1738 -> 0 bytes .../articles/domain/model/ArticleId.class | Bin 726 -> 0 bytes .../domain/model/Author$AuthorBuilder.class | Bin 1367 -> 0 bytes .../articles/domain/model/Author.class | Bin 1072 -> 0 bytes .../articles/domain/model/AuthorId.class | Bin 721 -> 0 bytes .../articles/domain/model/Content.class | Bin 716 -> 0 bytes .../articles/domain/model/PersonName.class | Bin 728 -> 0 bytes .../hexagon/articles/domain/model/Title.class | Bin 706 -> 0 bytes .../domain/ports/ArticleAuthorNotifier.class | Bin 301 -> 0 bytes .../domain/ports/ArticleEventPublisher.class | Bin 352 -> 0 bytes .../domain/ports/ArticleRepository.class | Bin 589 -> 0 bytes .../domain/ports/AuthorRepository.class | Bin 320 -> 0 bytes .../domain/ports/SocialMediaPublisher.class | Bin 280 -> 0 bytes 73 files changed, 642 insertions(+), 316 deletions(-) delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleController.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleEndpoint.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleFacade.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleService.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleCreatedEvent.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleRetrievedEvent.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/MessageBrokerArticleEventPublisher.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleCreatedMessage.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleRetrievedMessage.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/MessageBrokerArticleMessageSender.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorSmsNotifier.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorMailNotifier.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorSmsNotifier.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterClient.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/config/ArticleConfig.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/domain/ArticleFacade.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/domain/ArticlePublisher.java delete mode 100644 src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleMessageSender.java create mode 100644 src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleService.java rename src/main/java/tech/allegro/hexagon/articles/domain/ports/{ArticleAuthorNotifier.java => AuthorNotifier.java} (55%) delete mode 100644 target/classes/META-INF/hexagonal-architecture-example.kotlin_module delete mode 100644 target/classes/tech/allegro/hexagon/HexagonalArchitectureExampleApplication.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleController.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleIdResponse.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleRequest.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleService.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/events/ArticleCreatedEvent.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/events/ArticleRetrievedEvent.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/events/MessageBrokerArticleEventPublisher.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorSmsNotifier.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/persistence/ArticleDatabaseModel.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/persistence/DbArticleRepository.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/twitter/ArticleTwitterModel.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/adapters/twitter/TwitterArticlePublisher.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/ArticleFacade.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/Article$ArticleBuilder.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/Article.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/ArticleId.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/Author$AuthorBuilder.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/Author.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/AuthorId.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/Content.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/PersonName.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/model/Title.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleAuthorNotifier.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleRepository.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/ports/AuthorRepository.class delete mode 100644 target/classes/tech/allegro/hexagon/articles/domain/ports/SocialMediaPublisher.class diff --git a/.gitignore b/.gitignore index 15bdab2..ac73e3f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.iws *.iml *.ipr +target/ \ No newline at end of file diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleController.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleController.java deleted file mode 100644 index ba21be2..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleController.java +++ /dev/null @@ -1,41 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.api; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("articles") -class ArticleController { - - private final Logger log = LoggerFactory.getLogger(ArticleController.class); - - private final ArticleService service; - - ArticleController(final ArticleService service) { - this.service = service; - } - - @GetMapping("{articleId}") - ArticleResponse get(@PathVariable("articleId") final String articleId) { - log.info(">>> HTTP GET Request: retrieve an article with id: \"{}\"", articleId); - final ArticleResponse articleResponse = service.get(articleId); - log.info("<<< HTTP GET Response: article: \"{}\", successfully retrieved", articleResponse.title()); - return articleResponse; - } - - @PostMapping - ArticleIdResponse create(@RequestBody final ArticleRequest articleRequest) { - log.info(">>> HTTP POST Request: create an article: \"{}\"", articleRequest.title().value()); - final ArticleIdResponse articleIdResponse = service.create(articleRequest); - log.info("<<< HTTP POST Response: article with id: \"{}\", successfully created", articleIdResponse.id()); - return articleIdResponse; - } - - -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleEndpoint.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleEndpoint.java new file mode 100644 index 0000000..d0e1085 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleEndpoint.java @@ -0,0 +1,30 @@ +package tech.allegro.hexagon.articles.adapters.api; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("articles") +class ArticleEndpoint { + + private final ArticleFacade articles; + + ArticleEndpoint(ArticleFacade articles) { + this.articles = articles; + } + + @GetMapping("{articleId}") + ArticleResponse get(@PathVariable("articleId") final String articleId) { + return articles.get(articleId); + } + + @PostMapping + ArticleIdResponse create(@RequestBody final ArticleRequest articleRequest) { + return articles.create(articleRequest); + } + +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleFacade.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleFacade.java new file mode 100644 index 0000000..b81f066 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleFacade.java @@ -0,0 +1,26 @@ +package tech.allegro.hexagon.articles.adapters.api; + +import org.springframework.stereotype.Component; +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.model.ArticleId; +import tech.allegro.hexagon.articles.domain.ports.ArticleService; + +@Component +class ArticleFacade { + + private final ArticleService articleService; + + ArticleFacade(final ArticleService articleService) { + this.articleService = articleService; + } + + ArticleResponse get(final String articleId) { + final Article article = articleService.get(ArticleId.of(articleId)); + return ArticleResponse.of(article); + } + + ArticleIdResponse create(final ArticleRequest articleRequest) { + final ArticleId articleId = articleService.create(articleRequest.authorId(), articleRequest.title(), articleRequest.content()); + return ArticleIdResponse.of(articleId); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleIdResponse.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleIdResponse.java index 379569f..8623366 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleIdResponse.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleIdResponse.java @@ -1,22 +1,23 @@ package tech.allegro.hexagon.articles.adapters.api; -import tech.allegro.hexagon.articles.domain.model.ArticleId; import com.fasterxml.jackson.annotation.JsonProperty; +import tech.allegro.hexagon.articles.domain.model.ArticleId; class ArticleIdResponse { + private final String id; private ArticleIdResponse(final String id) { this.id = id; } - @JsonProperty("id") - public String id() { - return id; - } - - public static ArticleIdResponse of(final ArticleId articleId) { + static ArticleIdResponse of(final ArticleId articleId) { return new ArticleIdResponse(articleId.value()); } + @JsonProperty("id") + String id() { + return id; + } + } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleRequest.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleRequest.java index 5d21aa3..46a5885 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleRequest.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleRequest.java @@ -1,9 +1,9 @@ package tech.allegro.hexagon.articles.adapters.api; +import com.fasterxml.jackson.annotation.JsonProperty; import tech.allegro.hexagon.articles.domain.model.AuthorId; import tech.allegro.hexagon.articles.domain.model.Content; import tech.allegro.hexagon.articles.domain.model.Title; -import com.fasterxml.jackson.annotation.JsonProperty; class ArticleRequest { private final String title; @@ -17,15 +17,15 @@ class ArticleRequest { } - public Title title() { + Title title() { return Title.of(title); } - public Content content() { + Content content() { return Content.of(content); } - public AuthorId authorId() { + AuthorId authorId() { return AuthorId.of(authorId); } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.java index a464c7d..1ccf683 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.java @@ -1,7 +1,7 @@ package tech.allegro.hexagon.articles.adapters.api; -import tech.allegro.hexagon.articles.domain.model.Article; import com.fasterxml.jackson.annotation.JsonProperty; +import tech.allegro.hexagon.articles.domain.model.Article; class ArticleResponse { private final String id; @@ -24,22 +24,22 @@ class ArticleResponse { } @JsonProperty("id") - public String id() { + String id() { return id; } @JsonProperty("title") - public String title() { + String title() { return title; } @JsonProperty("content") - public String content() { + String content() { return content; } @JsonProperty("authorName") - public String authorName() { + String authorName() { return authorName; } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleService.java b/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleService.java deleted file mode 100644 index 46f83b9..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/api/ArticleService.java +++ /dev/null @@ -1,24 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.api; - -import tech.allegro.hexagon.articles.domain.ArticleFacade; -import tech.allegro.hexagon.articles.domain.model.ArticleId; -import org.springframework.stereotype.Component; - -@Component -class ArticleService { - - private final ArticleFacade articleFacade; - - ArticleService(final ArticleFacade articleFacade) { - this.articleFacade = articleFacade; - } - - ArticleResponse get(final String articleId) { - return ArticleResponse.of(articleFacade.get(ArticleId.of(articleId))); - } - - ArticleIdResponse create(final ArticleRequest articleRequest) { - final ArticleId articleId = articleFacade.create(articleRequest.authorId(), articleRequest.title(), articleRequest.content()); - return ArticleIdResponse.of(articleId); - } -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/ArticleDatabaseModel.java b/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/ArticleDatabaseModel.java index d8559a2..2cd2fba 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/ArticleDatabaseModel.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/ArticleDatabaseModel.java @@ -1,7 +1,125 @@ package tech.allegro.hexagon.articles.adapters.articledb; +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.model.ArticleId; +import tech.allegro.hexagon.articles.domain.model.Author; +import tech.allegro.hexagon.articles.domain.model.AuthorId; +import tech.allegro.hexagon.articles.domain.model.Content; +import tech.allegro.hexagon.articles.domain.model.PersonName; +import tech.allegro.hexagon.articles.domain.model.Title; + +import java.time.ZonedDateTime; +import java.util.UUID; + class ArticleDatabaseModel { - /** - * Database model implementation comes here - */ + + private final UUID id; + private final String title; + private final String content; + private final long version; + private final ZonedDateTime createdAt; + private final String authorId; + private final String authorName; + + private ArticleDatabaseModel(final UUID id, + final String title, + final String content, + final String authorId, + final long version, + final ZonedDateTime createdAt, + final String authorName) { + this.id = id; + this.title = title; + this.content = content; + this.authorId = authorId; + this.version = version; + this.createdAt = createdAt; + this.authorName = authorName; + } + + @Override + public String toString() { + return title; + } + + Article toDomain() { + return Article.article() + .withId(ArticleId.of(id.toString())) + .withAuthor(Author + .author() + .withId(AuthorId.of(authorId)) + .withName(PersonName.of(authorName)) + .build()) + .withTitle(Title.of(title)) + .withContent(Content.of(content)) + .build(); + } + + static ArticleDatabaseModel of(final Author author, final Title title, final Content content) { + return articleDatabaseModel() + .withId(UUID.randomUUID()) + .withVersion(0) + .withCreatedAt(ZonedDateTime.now()) + .withAuthorId(author.id().value()) + .withAuthorName(author.name().value()) + .withTitle(title.value()) + .withContent(content.value()) + .build(); + } + + static ArticleDatabaseModelBuilder articleDatabaseModel() { + return new ArticleDatabaseModelBuilder(); + } + + static final class ArticleDatabaseModelBuilder { + private UUID id; + private String title; + private String content; + private long version; + private ZonedDateTime createdAt; + private String authorId; + private String authorName; + + private ArticleDatabaseModelBuilder() { + } + + ArticleDatabaseModelBuilder withId(UUID id) { + this.id = id; + return this; + } + + ArticleDatabaseModelBuilder withTitle(String title) { + this.title = title; + return this; + } + + ArticleDatabaseModelBuilder withContent(String content) { + this.content = content; + return this; + } + + ArticleDatabaseModelBuilder withVersion(long version) { + this.version = version; + return this; + } + + ArticleDatabaseModelBuilder withCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + ArticleDatabaseModelBuilder withAuthorId(String authorId) { + this.authorId = authorId; + return this; + } + + ArticleDatabaseModelBuilder withAuthorName(String authorName) { + this.authorName = authorName; + return this; + } + + ArticleDatabaseModel build() { + return new ArticleDatabaseModel(id, title, content, authorId, version, createdAt, authorName); + } + } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/DbArticleRepository.java b/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/DbArticleRepository.java index 9f3f6d0..7eeb124 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/DbArticleRepository.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/articledb/DbArticleRepository.java @@ -1,56 +1,42 @@ package tech.allegro.hexagon.articles.adapters.articledb; +import org.springframework.stereotype.Component; import tech.allegro.hexagon.articles.domain.model.Article; import tech.allegro.hexagon.articles.domain.model.ArticleId; import tech.allegro.hexagon.articles.domain.model.Author; -import tech.allegro.hexagon.articles.domain.model.AuthorId; import tech.allegro.hexagon.articles.domain.model.Content; -import tech.allegro.hexagon.articles.domain.model.PersonName; import tech.allegro.hexagon.articles.domain.model.Title; import tech.allegro.hexagon.articles.domain.ports.ArticleRepository; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; import java.util.UUID; +import static tech.allegro.hexagon.articles.adapters.articledb.ArticleDatabaseModel.articleDatabaseModel; +import static tech.allegro.hexagon.articles.adapters.articledb.ArticleDatabaseModel.of; + @Component class DbArticleRepository implements ArticleRepository { - private final Logger log = LoggerFactory.getLogger(DbArticleRepository.class); - - @Override public Article save(final Author author, final Title title, final Content content) { /** - * Database integration implementation using {@link ArticleDatabaseModel} comes here + * Database integration implementation comes here */ - final String articleId = UUID.randomUUID().toString(); - log.info("Article: \"{}\" persisted", title.value()); - return Article.article() - .withId(ArticleId.of(articleId)) - .withAuthor(author) - .withTitle(title) - .withContent(content) - .build(); + final ArticleDatabaseModel entity = of(author, title, content); + return entity.toDomain(); } @Override public Article get(final ArticleId id) { /** - * Database integration implementation using {@link ArticleDatabaseModel} comes here + * Database integration implementation comes here */ - final Title title = Title.of("Hexagonal Architecture"); - log.info("Article \"{}\" fetched", title.value()); - return Article.article() - .withId(id) - .withAuthor(Author - .author() - .withId(AuthorId.of(UUID.randomUUID().toString())) - .withName(PersonName.of("William Shakespeare")) - .build()) - .withTitle(title) - .withContent(Content.of("Lorem ipsum")) + final ArticleDatabaseModel entity = articleDatabaseModel() + .withId(UUID.fromString(id.value())) + .withAuthorName("William Shakespeare") + .withAuthorId("928467") + .withTitle("Hexagonal Architecture") + .withContent("Lorem ipsum") .build(); + return entity.toDomain(); } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.java b/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.java index 8d5782b..29dbdd7 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.java @@ -1,7 +1,65 @@ package tech.allegro.hexagon.articles.adapters.authorservice; +import tech.allegro.hexagon.articles.domain.model.Author; +import tech.allegro.hexagon.articles.domain.model.AuthorId; +import tech.allegro.hexagon.articles.domain.model.PersonName; + class AuthorExternalModel { - /** - * External author service model implementation comes here - */ + private final long id; + private final String firstName; + private final String lastName; + + private AuthorExternalModel(final long id, final String firstName, final String lastName) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + } + + Author toDomain() { + return Author.author() + .withId(AuthorId.of(String.valueOf(id))) + .withName(PersonName.of(fullName())) + .build(); + } + + private String fullName() { + return String.format("%s %s", firstName, lastName); + } + + @Override + public String toString() { + return fullName(); + } + + static AuthorExternalModelBuilder authorExternalModel() { + return new AuthorExternalModelBuilder(); + } + + static final class AuthorExternalModelBuilder { + private long id; + private String firstName; + private String lastName; + + private AuthorExternalModelBuilder() { + } + + AuthorExternalModelBuilder withId(long id) { + this.id = id; + return this; + } + + AuthorExternalModelBuilder withFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + AuthorExternalModelBuilder withLastName(String lastName) { + this.lastName = lastName; + return this; + } + + AuthorExternalModel build() { + return new AuthorExternalModel(id, firstName, lastName); + } + } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.java b/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.java index 3a3912c..3d42462 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.java @@ -1,27 +1,26 @@ package tech.allegro.hexagon.articles.adapters.authorservice; +import org.springframework.stereotype.Component; import tech.allegro.hexagon.articles.domain.model.Author; import tech.allegro.hexagon.articles.domain.model.AuthorId; -import tech.allegro.hexagon.articles.domain.model.PersonName; import tech.allegro.hexagon.articles.domain.ports.AuthorRepository; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; + +import static tech.allegro.hexagon.articles.adapters.authorservice.AuthorExternalModel.authorExternalModel; @Component class ExternalServiceClientAuthorRepository implements AuthorRepository { - private final Logger log = LoggerFactory.getLogger(ExternalServiceClientAuthorRepository.class); + @Override public Author get(final AuthorId authorId) { /** * external author service integration implementation comes here */ - log.info("Author: \"William Shakespeare\" fetched", authorId.value()); - return Author - .author() - .withId(authorId) - .withName(PersonName.of("William Shakespeare")) + final AuthorExternalModel author = authorExternalModel() + .withId(928467) + .withFirstName("William") + .withLastName("Shakespeare") .build(); + return author.toDomain(); } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.java b/src/main/java/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.java deleted file mode 100644 index 91e58a1..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.java +++ /dev/null @@ -1,26 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.config; - -import tech.allegro.hexagon.articles.domain.ArticleFacade; -import tech.allegro.hexagon.articles.domain.ports.ArticleAuthorNotifier; -import tech.allegro.hexagon.articles.domain.ports.ArticleEventPublisher; -import tech.allegro.hexagon.articles.domain.ports.ArticleRepository; -import tech.allegro.hexagon.articles.domain.ports.AuthorRepository; -import tech.allegro.hexagon.articles.domain.ports.SocialMediaPublisher; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.util.List; - -@Configuration -class ArticleConfig { - - @Bean - ArticleFacade articleFacade(final ArticleRepository articleRepository, - final AuthorRepository authorRepository, - final ArticleEventPublisher eventPublisher, - final List socialMediaPublishers, - final List articleAuthorNotifiers) { - return new ArticleFacade(eventPublisher, articleRepository, authorRepository, socialMediaPublishers, articleAuthorNotifiers); - } - -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleCreatedEvent.java b/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleCreatedEvent.java deleted file mode 100644 index f901d26..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleCreatedEvent.java +++ /dev/null @@ -1,7 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.eventbus; - -class ArticleCreatedEvent { - /** - * Message broker model implementation comes here - */ -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleRetrievedEvent.java b/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleRetrievedEvent.java deleted file mode 100644 index 68b33a2..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/ArticleRetrievedEvent.java +++ /dev/null @@ -1,7 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.eventbus; - -class ArticleRetrievedEvent { - /** - * Message broker model implementation comes here - */ -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/MessageBrokerArticleEventPublisher.java b/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/MessageBrokerArticleEventPublisher.java deleted file mode 100644 index 21adb64..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/eventbus/MessageBrokerArticleEventPublisher.java +++ /dev/null @@ -1,29 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.eventbus; - -import tech.allegro.hexagon.articles.domain.model.Article; -import tech.allegro.hexagon.articles.domain.ports.ArticleEventPublisher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component -class MessageBrokerArticleEventPublisher implements ArticleEventPublisher { - - private final Logger log = LoggerFactory.getLogger(MessageBrokerArticleEventPublisher.class); - - @Override - public void publishArticleCreationEvent(final Article article) { - /** - * message broker integration implementation using {@link ArticleCreatedEvent} comes here - */ - log.info("Article: \"{}\" creation event published on event bus", article.title().value()); - } - - @Override - public void publishArticleRetrievalEvent(final Article article) { - /** - * message broker integration implementation using {@link ArticleRetrievedEvent} comes here - */ - log.info("Article: \"{}\" retrieval event published on event bus", article.title().value()); - } -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleCreatedMessage.java b/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleCreatedMessage.java new file mode 100644 index 0000000..938d037 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleCreatedMessage.java @@ -0,0 +1,25 @@ +package tech.allegro.hexagon.articles.adapters.messagebroker; + +import tech.allegro.hexagon.articles.domain.model.Article; + +import java.time.ZonedDateTime; + +class ArticleCreatedMessage { + + private final Article article; + private final ZonedDateTime sentAt; + + private ArticleCreatedMessage(final Article article, final ZonedDateTime sentAt) { + this.article = article; + this.sentAt = sentAt; + } + + static ArticleCreatedMessage of(Article article) { + return new ArticleCreatedMessage(article, ZonedDateTime.now()); + } + + @Override + public String toString() { + return String.format("\"Article >>%s<< created\"", article.title().value()); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleRetrievedMessage.java b/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleRetrievedMessage.java new file mode 100644 index 0000000..4536304 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/ArticleRetrievedMessage.java @@ -0,0 +1,26 @@ +package tech.allegro.hexagon.articles.adapters.messagebroker; + +import tech.allegro.hexagon.articles.domain.model.Article; + +import java.time.ZonedDateTime; + +class ArticleRetrievedMessage { + + private final Article article; + + private final ZonedDateTime sentAt; + + private ArticleRetrievedMessage(final Article article, final ZonedDateTime sentAt) { + this.article = article; + this.sentAt = sentAt; + } + + static ArticleRetrievedMessage of(Article article) { + return new ArticleRetrievedMessage(article, ZonedDateTime.now()); + } + + @Override + public String toString() { + return String.format("\"Article >>%s<< retrieved\"", article.title().value()); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/MessageBrokerArticleMessageSender.java b/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/MessageBrokerArticleMessageSender.java new file mode 100644 index 0000000..213b669 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/messagebroker/MessageBrokerArticleMessageSender.java @@ -0,0 +1,25 @@ +package tech.allegro.hexagon.articles.adapters.messagebroker; + +import org.springframework.stereotype.Component; +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.ports.ArticleMessageSender; + +@Component +class MessageBrokerArticleMessageSender implements ArticleMessageSender { + + @Override + public void sendMessageForCreated(final Article article) { + /** + * message broker integration implementation comes here + */ + ArticleCreatedMessage.of(article); + } + + @Override + public void sendMessageForRetrieved(final Article article) { + /** + * message broker integration implementation comes here + */ + ArticleRetrievedMessage.of(article); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.java b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.java deleted file mode 100644 index 19c5892..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.java +++ /dev/null @@ -1,21 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.notifications; - -import tech.allegro.hexagon.articles.domain.model.Article; -import tech.allegro.hexagon.articles.domain.ports.ArticleAuthorNotifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component -class ArticleAuthorMailNotifier implements ArticleAuthorNotifier { - - private final Logger log = LoggerFactory.getLogger(ArticleAuthorMailNotifier.class); - - @Override - public void notifyAboutArticleCreation(final Article article) { - /** - * mail system integration implementation using {@link ArticleMailModel} comes here - */ - log.info("Mail sent to author: \"{}\"", article.author().name()); - } -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorSmsNotifier.java b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorSmsNotifier.java deleted file mode 100644 index 8589430..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorSmsNotifier.java +++ /dev/null @@ -1,21 +0,0 @@ -package tech.allegro.hexagon.articles.adapters.notifications; - -import tech.allegro.hexagon.articles.domain.model.Article; -import tech.allegro.hexagon.articles.domain.ports.ArticleAuthorNotifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component -class ArticleAuthorSmsNotifier implements ArticleAuthorNotifier { - - private final Logger log = LoggerFactory.getLogger(ArticleAuthorSmsNotifier.class); - - @Override - public void notifyAboutArticleCreation(final Article article) { - /** - * sms system integration implementation using {@link ArticleSmsModel}comes here - */ - log.info("SMS sent to author: \"{}\"", article.author().name()); - } -} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.java b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.java index 7bdbd90..cdf10d7 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.java @@ -1,7 +1,32 @@ package tech.allegro.hexagon.articles.adapters.notifications; +import tech.allegro.hexagon.articles.domain.model.Article; + class ArticleMailModel { - /** - * Mail model implementation comes here - */ + + private static final String SUBJECT = "You have successfully published: >>%s<<"; + private static final String CONTENT = "Check if everything is correct: >>%s<<"; + + private final String recipientId; + private final String subject; + private final String content; + + private ArticleMailModel(final String recipientId, + final String subject, + final String content) { + this.recipientId = recipientId; + this.subject = subject; + this.content = content; + } + + static ArticleMailModel of(final Article article) { + return new ArticleMailModel(article.author().name().value(), + String.format(SUBJECT, article.title().value()), + String.format(CONTENT, article.content().value())); + } + + @Override + public String toString() { + return subject; + } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.java b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.java index de35fd6..694a861 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.java @@ -1,7 +1,27 @@ package tech.allegro.hexagon.articles.adapters.notifications; +import tech.allegro.hexagon.articles.domain.model.Article; + class ArticleSmsModel { - /** - * Sms model implementation comes here - */ + + public static final String CONTENT = "Please check your email. We have sent you publication details of the article: >>%s<<"; + private final String recipientId; + private final String text; + + private ArticleSmsModel(final String recipientId, final String text) { + this.recipientId = recipientId; + this.text = text; + } + + public static ArticleSmsModel of(Article article) { + return new ArticleSmsModel( + article.author().name().value(), + String.format(CONTENT, article.title().value())); + + } + + @Override + public String toString() { + return text; + } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorMailNotifier.java b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorMailNotifier.java new file mode 100644 index 0000000..51a15c4 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorMailNotifier.java @@ -0,0 +1,17 @@ +package tech.allegro.hexagon.articles.adapters.notifications; + +import org.springframework.stereotype.Component; +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.ports.AuthorNotifier; + +@Component +class AuthorMailNotifier implements AuthorNotifier { + + @Override + public void notifyAboutCreationOf(final Article article) { + /** + * Mail system integration implementation comes here + */ + ArticleMailModel.of(article); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorSmsNotifier.java b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorSmsNotifier.java new file mode 100644 index 0000000..3836758 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/notifications/AuthorSmsNotifier.java @@ -0,0 +1,17 @@ +package tech.allegro.hexagon.articles.adapters.notifications; + +import org.springframework.stereotype.Component; +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.ports.AuthorNotifier; + +@Component +class AuthorSmsNotifier implements AuthorNotifier { + + @Override + public void notifyAboutCreationOf(final Article article) { + /** + * SMS system integration implementation comes here + */ + ArticleSmsModel.of(article); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/ArticleTwitterModel.java b/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/ArticleTwitterModel.java index 3d4a174..66665fd 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/ArticleTwitterModel.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/ArticleTwitterModel.java @@ -1,7 +1,28 @@ package tech.allegro.hexagon.articles.adapters.socialmedia; +import tech.allegro.hexagon.articles.domain.model.Article; + class ArticleTwitterModel { - /** - * twitter implementation comes here - */ + + public static final String TWEET = "Check out the new article >>%s<< by %s"; + private final String twitterAccountId; + private final String tweet; + + private ArticleTwitterModel(final String twitterAccountId, final String tweet) { + this.twitterAccountId = twitterAccountId; + this.tweet = tweet; + } + + static ArticleTwitterModel of(Article article) { + final String title = article + .title() + .value(); + final String twitterId = article.author().name().value(); + return new ArticleTwitterModel(twitterId, String.format(TWEET, title, twitterId)); + } + + @Override + public String toString() { + return tweet; + } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterArticlePublisher.java b/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterArticlePublisher.java index c678fb7..6168f8c 100644 --- a/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterArticlePublisher.java +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterArticlePublisher.java @@ -1,22 +1,21 @@ package tech.allegro.hexagon.articles.adapters.socialmedia; +import org.springframework.stereotype.Component; import tech.allegro.hexagon.articles.domain.model.Article; import tech.allegro.hexagon.articles.domain.ports.SocialMediaPublisher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; @Component class TwitterArticlePublisher implements SocialMediaPublisher { - private final Logger log = LoggerFactory.getLogger(TwitterArticlePublisher.class); + private final TwitterClient twitterClient; + TwitterArticlePublisher(final TwitterClient twitterClient) { + this.twitterClient = twitterClient; + } @Override public void publish(final Article article) { - /** - * social media integration implementation using {@link TwitterModel} comes here - */ - log.info("Article: \"{}\" published on twitter", article.title().value()); + final ArticleTwitterModel articleTweet = ArticleTwitterModel.of(article); + twitterClient.tweet(articleTweet); } } diff --git a/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterClient.java b/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterClient.java new file mode 100644 index 0000000..48c3379 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/adapters/socialmedia/TwitterClient.java @@ -0,0 +1,12 @@ +package tech.allegro.hexagon.articles.adapters.socialmedia; + +import org.springframework.stereotype.Component; + +@Component +class TwitterClient { + void tweet(final ArticleTwitterModel articleTweet) { + /** + * social media integration implementation comes here + */ + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/config/ArticleConfig.java b/src/main/java/tech/allegro/hexagon/articles/config/ArticleConfig.java new file mode 100644 index 0000000..493dadc --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/config/ArticleConfig.java @@ -0,0 +1,38 @@ +package tech.allegro.hexagon.articles.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import tech.allegro.hexagon.articles.domain.ArticlePublisher; +import tech.allegro.hexagon.articles.domain.ports.ArticleMessageSender; +import tech.allegro.hexagon.articles.domain.ports.ArticleRepository; +import tech.allegro.hexagon.articles.domain.ports.ArticleService; +import tech.allegro.hexagon.articles.domain.ports.AuthorNotifier; +import tech.allegro.hexagon.articles.domain.ports.AuthorRepository; +import tech.allegro.hexagon.articles.domain.ports.SocialMediaPublisher; + +import java.util.List; + +@Configuration +class ArticleConfig { + + @Bean + ArticlePublisher articleEventPublisher(final ArticleMessageSender eventPublisher, + final List socialMediaPublishers, + final List articleAuthorNotifiers) { + return new ArticlePublisher(eventPublisher, + socialMediaPublishers, + articleAuthorNotifiers); + } + + @Bean + ArticleService articleService(final ArticleRepository articleRepository, + final AuthorRepository authorRepository, + final ArticlePublisher articleEventPublisher + ) { + return new ArticleService( + articleRepository, + authorRepository, + articleEventPublisher); + } + +} diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/ArticleFacade.java b/src/main/java/tech/allegro/hexagon/articles/domain/ArticleFacade.java deleted file mode 100644 index c366b57..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/domain/ArticleFacade.java +++ /dev/null @@ -1,47 +0,0 @@ -package tech.allegro.hexagon.articles.domain; - -import tech.allegro.hexagon.articles.domain.model.Article; -import tech.allegro.hexagon.articles.domain.model.ArticleId; -import tech.allegro.hexagon.articles.domain.model.Author; -import tech.allegro.hexagon.articles.domain.model.AuthorId; -import tech.allegro.hexagon.articles.domain.model.Content; -import tech.allegro.hexagon.articles.domain.model.Title; -import tech.allegro.hexagon.articles.domain.ports.ArticleAuthorNotifier; -import tech.allegro.hexagon.articles.domain.ports.ArticleEventPublisher; -import tech.allegro.hexagon.articles.domain.ports.ArticleRepository; -import tech.allegro.hexagon.articles.domain.ports.AuthorRepository; -import tech.allegro.hexagon.articles.domain.ports.SocialMediaPublisher; - -import java.util.List; - -public class ArticleFacade { - - private final ArticleEventPublisher eventPublisher; - private final ArticleRepository articleRepository; - private final AuthorRepository authorRepository; - private final List socialMediaPublishers; - private final List articleAuthorNotifiers; - - public ArticleFacade(final ArticleEventPublisher eventPublisher, final ArticleRepository articleRepository, final AuthorRepository authorRepository, final List socialMediaPublishers, final List articleAuthorNotifiers) { - this.eventPublisher = eventPublisher; - this.articleRepository = articleRepository; - this.authorRepository = authorRepository; - this.socialMediaPublishers = socialMediaPublishers; - this.articleAuthorNotifiers = articleAuthorNotifiers; - } - - public ArticleId create(final AuthorId authorId, final Title title, final Content content) { - final Author author = authorRepository.get(authorId); - final Article article = articleRepository.save(author, title, content); - eventPublisher.publishArticleCreationEvent(article); - socialMediaPublishers.forEach(socialMediaPublisher -> socialMediaPublisher.publish(article)); - articleAuthorNotifiers.forEach(articleAuthorNotifier -> articleAuthorNotifier.notifyAboutArticleCreation(article)); - return article.id(); - } - - public Article get(final ArticleId id) { - final Article article = articleRepository.get(id); - eventPublisher.publishArticleRetrievalEvent(article); - return article; - } -} diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/ArticlePublisher.java b/src/main/java/tech/allegro/hexagon/articles/domain/ArticlePublisher.java new file mode 100644 index 0000000..1b47c4c --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/domain/ArticlePublisher.java @@ -0,0 +1,32 @@ +package tech.allegro.hexagon.articles.domain; + +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.ports.ArticleMessageSender; +import tech.allegro.hexagon.articles.domain.ports.AuthorNotifier; +import tech.allegro.hexagon.articles.domain.ports.SocialMediaPublisher; + +import java.util.List; + +public class ArticlePublisher { + private final ArticleMessageSender messageSender; + private final List socialMediaPublishers; + private final List articleAuthorNotifiers; + + public ArticlePublisher(final ArticleMessageSender messageSender, + final List socialMediaPublishers, + final List articleAuthorNotifiers) { + this.messageSender = messageSender; + this.socialMediaPublishers = socialMediaPublishers; + this.articleAuthorNotifiers = articleAuthorNotifiers; + } + + public void publishCreationOf(final Article article) { + messageSender.sendMessageForCreated(article); + socialMediaPublishers.forEach(socialMediaPublisher -> socialMediaPublisher.publish(article)); + articleAuthorNotifiers.forEach(articleAuthorNotifier -> articleAuthorNotifier.notifyAboutCreationOf(article)); + } + + public void publishRetrievalOf(final Article article) { + messageSender.sendMessageForRetrieved(article); + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/model/Article.java b/src/main/java/tech/allegro/hexagon/articles/domain/model/Article.java index 13f322b..e51dfcb 100644 --- a/src/main/java/tech/allegro/hexagon/articles/domain/model/Article.java +++ b/src/main/java/tech/allegro/hexagon/articles/domain/model/Article.java @@ -1,12 +1,12 @@ package tech.allegro.hexagon.articles.domain.model; public class Article { + private final ArticleId id; private final Title title; private final Content content; private final Author author; - private Article(final ArticleId id, final Title title, final Content content, final Author author) { this.id = id; this.title = title; @@ -14,6 +14,16 @@ public class Article { this.author = author; } + public void validateEligibilityForPublication() { + verifyForPlagiarism(); + validateTitleLength(); + validateContentLength(); + checkPunctuation(); + checkGrammar(); + checkStyle(); + //TODO: these methods are just placeholders with empty implementation + } + public ArticleId id() { return id; } @@ -30,6 +40,24 @@ public class Article { return author; } + private void checkGrammar() { + } + + private void checkStyle() { + } + + private void checkPunctuation() { + } + + private void verifyForPlagiarism() { + } + + private void validateContentLength() { + } + + private void validateTitleLength() { + } + public static ArticleBuilder article() { return new ArticleBuilder(); } diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/model/Author.java b/src/main/java/tech/allegro/hexagon/articles/domain/model/Author.java index 8af731b..7a322ae 100644 --- a/src/main/java/tech/allegro/hexagon/articles/domain/model/Author.java +++ b/src/main/java/tech/allegro/hexagon/articles/domain/model/Author.java @@ -5,7 +5,7 @@ public class Author { private final PersonName name; - public Author(final AuthorId id, final PersonName name) { + private Author(final AuthorId id, final PersonName name) { this.id = id; this.name = name; } @@ -18,6 +18,10 @@ public class Author { return name; } + public AuthorId id() { + return id; + } + public static final class AuthorBuilder { private AuthorId id; private PersonName name; diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.java b/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.java deleted file mode 100644 index dd7d546..0000000 --- a/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.java +++ /dev/null @@ -1,11 +0,0 @@ -package tech.allegro.hexagon.articles.domain.ports; - -import tech.allegro.hexagon.articles.domain.model.Article; - -public interface ArticleEventPublisher { - - void publishArticleCreationEvent(Article article); - - void publishArticleRetrievalEvent(Article article); - -} diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleMessageSender.java b/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleMessageSender.java new file mode 100644 index 0000000..315e597 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleMessageSender.java @@ -0,0 +1,11 @@ +package tech.allegro.hexagon.articles.domain.ports; + +import tech.allegro.hexagon.articles.domain.model.Article; + +public interface ArticleMessageSender { + + void sendMessageForCreated(Article article); + + void sendMessageForRetrieved(Article article); + +} diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleService.java b/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleService.java new file mode 100644 index 0000000..8647954 --- /dev/null +++ b/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleService.java @@ -0,0 +1,41 @@ +package tech.allegro.hexagon.articles.domain.ports; + +import tech.allegro.hexagon.articles.domain.ArticlePublisher; +import tech.allegro.hexagon.articles.domain.model.Article; +import tech.allegro.hexagon.articles.domain.model.ArticleId; +import tech.allegro.hexagon.articles.domain.model.Author; +import tech.allegro.hexagon.articles.domain.model.AuthorId; +import tech.allegro.hexagon.articles.domain.model.Content; +import tech.allegro.hexagon.articles.domain.model.Title; + +public final class ArticleService { + + private final ArticleRepository articleRepository; + private final AuthorRepository authorRepository; + private final ArticlePublisher eventPublisher; + + + public ArticleService(final ArticleRepository articleRepository, + final AuthorRepository authorRepository, + final ArticlePublisher eventPublisher) { + this.articleRepository = articleRepository; + this.authorRepository = authorRepository; + this.eventPublisher = eventPublisher; + } + + public ArticleId create(final AuthorId authorId, final Title title, final Content content) { + final Author author = authorRepository.get(authorId); + final Article article = articleRepository.save(author, title, content); + + article.validateEligibilityForPublication(); + + eventPublisher.publishCreationOf(article); + return article.id(); + } + + public Article get(final ArticleId id) { + final Article article = articleRepository.get(id); + eventPublisher.publishRetrievalOf(article); + return article; + } +} diff --git a/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleAuthorNotifier.java b/src/main/java/tech/allegro/hexagon/articles/domain/ports/AuthorNotifier.java similarity index 55% rename from src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleAuthorNotifier.java rename to src/main/java/tech/allegro/hexagon/articles/domain/ports/AuthorNotifier.java index e5e0102..646ecf8 100644 --- a/src/main/java/tech/allegro/hexagon/articles/domain/ports/ArticleAuthorNotifier.java +++ b/src/main/java/tech/allegro/hexagon/articles/domain/ports/AuthorNotifier.java @@ -2,8 +2,8 @@ package tech.allegro.hexagon.articles.domain.ports; import tech.allegro.hexagon.articles.domain.model.Article; -public interface ArticleAuthorNotifier { +public interface AuthorNotifier { - void notifyAboutArticleCreation(Article article); + void notifyAboutCreationOf(Article article); } diff --git a/target/classes/META-INF/hexagonal-architecture-example.kotlin_module b/target/classes/META-INF/hexagonal-architecture-example.kotlin_module deleted file mode 100644 index a49347afef10a9b5f95305e1058ba36adec7d6dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16 RcmZQzU|?ooU|@t|0RRA102TlM diff --git a/target/classes/tech/allegro/hexagon/HexagonalArchitectureExampleApplication.class b/target/classes/tech/allegro/hexagon/HexagonalArchitectureExampleApplication.class deleted file mode 100644 index b345df0597648a8b56b6edcd750fbec0aa3c84d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmbtS%Wl&^6g`tBb!q}_Qz(?jf?XORW>*%eDuoEd!aPJ!Sg;zqQ+wL+Of()tev1`| z1s}jiA?`Spl0}e^u;hDn-{&0r*Y6)c0X)N_7;W5%a2Vq*?nO9a*gjQ8`7?&C!SRft zJ+bGKVK-4mzNyPpx(_1Nl<6ln6M80`3h{Na?F&^goF!gn1s7V&+*w}8g~+Ypua;iu zvC9fYExva0#X^*GEywe@R+;e1nh{+sg)$6>gHOq&_$;^DUvCSr z1F(y5?u&I-Jhj$yQG1(NbD?q~$)`=rb1JM8?V*EhhSUF1E5iLA9^fJIUP<*fy(D!R zhJS^(1hfW*KDet%^K`H#`9zDV8f{SdIN7wB__cpJVuNDyYRHY zf(B$Gia2>jzBBv=_O&T@$%ZnhVTWvQ*?<@~DB7X;CM^lWC(SaT+iwlOW9#E;KBfw2 fBBGhqjxKItm-2h`b{GW#&3;5XPS~FE&OY;1JRzeNhPzUR;#6BqTuH5*i4t2`+YN)AVHy>#&as$(7Df zhRJtoXByh(k9>fBs807R*%q|Z0mn0zrImJ{-|pS6{MX+vUjdlM4`~cxK8gEjJitO9 z5?IuSr4&BuM-CsS@d=hwc$mftK270K8mm}K<1yCtozGJEJdHdyl6b<<<#-i_Oy2V= zR^aT;?OA!RQW5?lLoyKlfh-G##k>;bs>K~gRD92>il2GKb1m*GS$0HVahuna@ad!` zt>w^K44o-X?~-(-$}!|7Un9=cHbeJ{XA{olymZBr`u>jaOMJ&63-On^v(0^}uOnl( zs>*;=I}ly*T;+R|uCBx2hEP?{E^wdk3!Nrats)ddVKTqR54h!Uw_+8QFWt)GR0nEX zBB*(8AV{k(s_D9|lloV5$~}6Z>BF$}dWzS#>aLReVp|51YPamVp5jUp55ruzEowTm zU7h`*=l^IOiXCf5y0*nz&su9jZSY!6SAe1CfID?smHy*aHqRMGPYbomc}nr#xfKgs zRhtX0H(A*iT#@K;C!1_b{8Sf#>S*=W?dDn##z1R%8UZ_NohA*#P^*AVjn4M-DaO0! zudx@zmi7F8Q34M=`-p0iE_!vpELNrN)RE7#P7OHPgihT^l8df`KovWgvqq28MB!VLq43nU71Qg1PpnWJZNqFnvMeLL3N_ zyJm!79!ga;rM+N|9zP#VqG+ImFO%3d@HXBdH2TCNg)?KJ=^nae&7fW`iy+voJI+x{ z#!liZ17G7Q!)yzvuvv@|h5ZxbX>xp{9iJuft$_(VH871ChLsjf6y*%f>157Og;K=y zoq_K)(_nkhZSL%eGR@YmNj>ndoqa8>^0M;$BN~)6fx|Zy!+3lSuQ)sisFBZl(mokH zYoj-cbay?5+wlm|B#%ws5Nc5qJ-GM=iQa?^3m5low|$S2N;lB(j zDdhj7+1@^vuC-6EU&ktG5Gv=Li~4lbUhUDvkdQV^`lmBQe}fX#WYlJKmeHL?zg_el z!8N+`2Avh@H$lHwrhf;U&LsXo*9&w{&%8j-uVhZ(Ivq3UrsFUj2XTplWGKK5vW$eT zxQRFEih?vG7~Z1u9$Eu>9J(vXQESymTdPk@|Ay{N@64Y_c7e`&W=@dWXc+slCrCH! z*nAHa`7T&ER76zBsFaqhW3KKESve*6CUD}bkX=%b389!j|7;b;?C%R2a*gi%5)&%qSQszCX<#M#nNA z=`@#QYx#vV105ZSOeE4W85+&jyhDb~<8f+KBD*SA<4g>FmI^ky`Cx!DQ z=0g#_$*qr{B>tT6QKm;SGjFMGWg_A+HRtFvhDmcl8<9?gN_j#z6koQn(^_zBVfWtb zq7LcRwik%~#RG$XqQ_Y%50rhZ^|?!aY=B+x~{J9xy(I8i8%4z7VSBgq-Y$aNk2p!Php}*h00Bb+`29qX`U8gt*l6dpKuh(`_{ zgrOKW-5Zo7GgKz6tg^gtf+lxXiL(R}HTDlp<>ve{{S1MHcHN(sD zMa=(1rmGCu)u>La!xa_Ecdei%;~i0J>xewzS4FJMz7x#qrb-x=D_VL@E_`1$;)plp zp=d-Q7qM2JFB2~6VqeRcoPEVt+R-ifu_Y5tmnpuLbcOn+h(#bx8pG69E7U5GRh1}W zJ3U$n!$=FQqL7k!#ft*ID-yyS20q^t-iO4{o+j}P+Hc0uzKr!JV#*x|zeTruUY`Dk z;(8Pa74m={!{<7XDuJ;!`qYqFsiy zE@OJBzAW}2pwkqFH&-*$|#cOBa=o(-EUy-%n>r~>=7(??g-g0be_RAve%I#TcFG#sy6G%#gR{tfzWCUkb{=Fi*$xemt38qtfi z8iIcJD>BE(eI~yxv@ea1rNRuHayr5oG2WucdAxOuzVrC;uJ{6Ocfn_mVV}oObj9CE HRZjc{b>xG? diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.class b/target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleResponse.class deleted file mode 100644 index 779221a9785ea189829831bc2157c8fd5d1d9c37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2142 zcmbVMYflqF6g^YguB@w+TB`U~6iZRp2lxUXh%dA%QA6U#pqF(E^;H! zQ84O(A31)cVCr_X8idbulgs&8*LR~^3QsEAqj$D4v80fl4;n-ts=2=NtleC8!dH4( zWE5*bU3*J9bYj4t_MCyc0zYryo`w5(VBn#JM_4fMSX3O~O>e&Q=gVtOosW8; zBG2y9|E2UwwZb)KI(^(igZZ1!vjUP9%>***L*&hO5dLU`1Q_yY(;yByyFk5<-Pnd;4uPC(< zTb4&`Ss}D}WaQ;?9OdjIZI1R}^($0$as!#_*$oU-&ut)E9nEea_nBWaI4FA<3s~gX zgF)=&Z-|Hm;tb;uzf2`aIE*8l$$n9yVo$VWVo%fz#GdHM;wb%LkzJtR0*kG{QZ8T@ zj`2{5NKImaIrAO)*VPV;4tCKDc3{%%?!cni)4|>jhQ6ZkiCYuJo*BC&_{ rL>t(OcA`I8iD)A|(Xw07#`~j<5Ut!3Ew>eIvOijxXlHo%3@X0?$%qCH diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleService.class b/target/classes/tech/allegro/hexagon/articles/adapters/api/ArticleService.class deleted file mode 100644 index 50b31df7dd623b65f101cd4cf46e47ad7111b8a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2470 zcmbVOTT|0O6#lja0x?jOi&jMOUJ4RL1fhsxwGK{E1{hv^TGFKi+oUF2)bUU0j3VQM zKfqW2kK@@kr8rh<@{nwH_nhy1dv4huzrKA3Fo$P43|#BMDO}fa12=V~Fs>tw2_2KT zrCw9&WvY$aI__Xv!(9zC487cwwp9{2Zt;R(n8{0F?V7w)5=GB7cf~tibR9F0^38%< z=C)%lAJ@t-bS>JBEteSPQc(cLw-`FIt|E}g+m3iqEpH2NlW&)3zD_!Zajm93t@g)0ShqQB6|g_b9{r1O4g=fYNpS{HAs!k3X)t`v^( z>KRikX)}i(k_cF z+qWq*mL12HT-xMthIHQbil$#tq1#d6ed~I!O`n1+T=~8t%&c3c&XbB9Zc3J!nbM4Bkl^SteIGJOs z2sDzO!HdE*QmHj;65|Ltb5xVvyh@GBQ@vy^70zRUA`$46wp7J66AochX_2~SxsIgz zp&Abdkge+x#LsYkZ%_}@QtE8OXf)`Bb8G#7SnFJi;Zw2Mff@G0IpxT3JHD+-plLUQ zF}gk&be*8zlj?=^6{jbGe#CH^zH&6iXw=hR!O|075c@>47)gVqm8^jd((Iwx0L_N$ z(ip@L%}B3?%4i+vq>BdugPQC)5>xP58WnsZ{TZ=|L&Oizafr^3v{bjzMa)2=P3*)G zb^=M9r~LpsS;HQ|g#h~%5mN+{HS7a)O&ma@r~3dstCNS&n^yE1i6KHBu2~wZD;`-& gViXt2(jYp?<|UF2Y>w6(HCCg08CPgjgs%d>0jRj{9smFU diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.class b/target/classes/tech/allegro/hexagon/articles/adapters/authorservice/AuthorExternalModel.class deleted file mode 100644 index e160b4dce40bb04d13547411796b282632b021df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 388 zcmb_YJxjzu5Pf^eB^sl5SXo-Cg|*&C8Q)QX-xOEv-f7|Bod nqvS}RU?NNl_Rjd|4eC|M2&wF3Fe7XT&wm2gL?%jMYe?nat@UQc diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.class b/target/classes/tech/allegro/hexagon/articles/adapters/authorservice/ExternalServiceClientAuthorRepository.class deleted file mode 100644 index 3240ac3d2fa68bd9e320eb701605d8eac7acb756..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2096 zcmcgt?Q#=06g{$?tg~#=)P(TW(%?dI3}pEVv^XUML)sJ*7{Y`ZhChleuVvPfM=OWG zQ_&en)BflK^r1Sv@_HsAFcibIKXzAFdv)&DxmSPv{l}jGuHn9q2^2ki>*Ewok0FEa z@;Kw8gxLcqpK(3B%Kx74=rg z<5)yShb^(iBdtPitgOc(33-EetuVCc*_JkmFq^V2!aG~Esd&7W%GFp3WtaLY4@Fle z(rWX9T+BwoGPFzoVx^%wT&l1`0mNYnv(l){4u6VF=2K5s8VvKp1CUvU$$Nr=Z9L$H zcZ7?c!C%uoQy0t9CA9oe;m@`CCTBSMu&1o-h;^ArO8=5l+HxzkBGhtP)~=B%YC2=j zwRsjMWKwARqAS9x?sT=H+*SeEF1JV}3@wdoXbU=1kZIKCpQU(>%4M#3Z+JwZYS-%zk1 TI7WwoDm^}}=ji^wg`@uft^swf diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.class b/target/classes/tech/allegro/hexagon/articles/adapters/config/ArticleConfig.class deleted file mode 100644 index 99ead3cbb2f60d8224fe7f3e612a296726e350e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2248 zcmds2+invv5FMwv(9kwXOB%wp+*6=f;sG8~BDEELN=wyLk$7}A?#5+fM_zAfzkq+> zE8wXTNPGZa!IvOrz1vg?&`Sz0UCHaq%p8x;jK|-9e)$FfFJV3lDY%z``&mf9gA6>( zz#{_bMInW$5g4n?Hwh$HRGSmX)rI8iLAS;A7HfI9GF?{=^O{VHa2_uvO-J|yUeyhE zI+S@HceSD&zQnChsX<7^U~CXR;1VN9j?Gql3KO<CzuB-JOw##T>gh%VbH^0s2 zPv>9EQbY=}RESwR@|8gCbWndIia?$Xo&V%$4w64)j($$@0XhgQkKp7Gr38w;as>0% zcw4YO)tGzvVYUg(#zZYy-`158+XAx>1%o-f-#g6X#t_KjSv+q1!Le!$iP$<1Y8?H+ zGg#RC8po7vZ!pceJiJx}#v8(w%mf-Q&&LaOdHzKt{zn)_yu;oG(#LeHKB8hG-L=oKfb8PWgy-+s#2k4g+TRq%VVDdywSFNdQ7_XO>2ichQNi9!W4pq#vc$SjeYJbB;GDOd0I}EQwK2i375v;2&QCVYLRLmCWr8O3!Q@k zOk2NlFauZ6Hr%=hv$#z-D&Z&vS8+TWYZal~mt8~Ib(9rT7O;SzGuVpQO4x3oC;>O& T7WQe}?zWxJ+5esX>Ro_e!Jg9? diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/events/ArticleCreatedEvent.class b/target/classes/tech/allegro/hexagon/articles/adapters/events/ArticleCreatedEvent.class deleted file mode 100644 index 2188e6571f14b34e76f4470667b35db44363001c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 374 zcmbu5F;BxV5QU$cG=WfP#l*-640vP!AyrYCA{ap3FUcu!WfJ7L6@QBfiGd%$k3yVV zMm8*+@7?DoKk2@{KRy9mVU{7nVTz*^Q-$QlbjIH*L}%wqg*fkPR+tv1R!);0M7uEk(q diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/events/ArticleRetrievedEvent.class b/target/classes/tech/allegro/hexagon/articles/adapters/events/ArticleRetrievedEvent.class deleted file mode 100644 index 8af0758bd965b82cb0446e3ee4ff52d36acde426..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 380 zcmb`DF;BxV5QX10X#ye8ijj#C81TpdLPAxUB9H)ecal@$$|T5fEB+P}5(7VgAB8x# zjEq=1-@DIGe$st?e|!SCz%)aI{S*f&CWPe5bjDv3qLb4FA)fU$6DEb}_-^%FvU}2{ z6>?bgm9`7*OqhRR>{~Ms=7r~~RoYr^T(4Sw)lJ_i?YyZh4@%ei#j_g}uetMsy4gNF zuy;mKJrDSjkUjP*SMjY0fk%J3&X;X5vnL9Mr`E8q67%<({|VnY^a|eF5k?LpWnU%n8$(*8#gUvY}~?lFA})jgF7}RaM#8p zvVF)Q--9U&_bl9JNczfSNSBrN+|b`DY`bOUc|sQ%x))_2%~SHp<~A8pB~=p){bd=5 zSFJ`x=nY=+$wI+Z?r(A}qkU{lnYs)a*2+dy>n`_w;c4a8#ar&Fz~$P=sxLy9*Lc$i z9lByy1SWJ>L>O{UJlASR=%tR=i|E&CtK!SB-cD?^+1bSZOImOvRnYchn9rWVSyK%z z1Ghot_->3*j4HI^v=|Ei0>Ln_B1~P?R=MU45tYR-b~M*DVYC#x+>evB*Hueb#j=bV zIeB{Z)7yNPGmNaY0wWt@Q-+dyz7zz?w0l5|`OYkxS_a-$l*k*UcifQD5z6c}g`T$BE}(NJg94(lpT14IB>itba%*LOOe12_aXK_gwUA_9Ytj5-m<~a zM^8Eu5#4P`dPuHh8KBi7d9cWm{|uH-C%z#038@ccN#GK_ZTd#<6h)_L<#fC;h#}fB zT*ejhh>%_qa^yRh|A?*ECyC>5g9J6yhKqtJB!-Jt!?;SYBV_F&Sr9VA ewZCxmp2RUq_+w|~NMMu*6BKZrzTL!m1Na5?)22=U diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.class b/target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleAuthorMailNotifier.class deleted file mode 100644 index 2903420c76cdfd5ba9190d65a7c8430a43cb95b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1358 zcmb_cTTc@~7(LS#mX;N2K@e1|DAE>X1wo=E#-@ocmP*9%K5eJl!R<`5J5`DCN0}&I z9{d6RDC4)gC1T?Z)Seb))R_Qruz)2=K0GQ;S$RMOlhOrf~XkgDpIV3@2)CF=cd zL-g{e}_x29&JZy%}3C~N<;U}09W-z^dCvMcsw zAgPfRMTN%wU?{}{>iJT+?J&R#?LTt@3L~^R>0Zx|d&k^?K35stpIXEUejB$88H6Ha2mG8Wfi4cwD*8-O z=%B>)Gi(-$r_xT;Hacl*r->Rl(Q#Cy0*1S%3%N_W)T&Od6gE5DI%1Wotr?b2wrkIX zsw$YPkrIYNX?kC2S8Q>C{^*BgT>#rkf)7>42C#vR4APjha3zDQ$fuFOwGqr`a2+=? zSisFuETUkcXraWA^t8*6t7_kM0lRizTU zy-r>DPkG&=6-sV!?|}O>UQmeqJ#QT+=X=}gM33j91sH@osc~q(Ep6SE3d=cd_Y!v=buc%F8<8#tAEwd z57wbe63@@DUMQZ)IFW30%T~@(HA>xpG>LME~Qf0?4WeSDpgA}ES{FD zWC2J^*_@tS=nVS$BrGwO@u>?f-C`MC`e!ym*_oAo0oxa^tXQd diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.class b/target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleMailModel.class deleted file mode 100644 index 38355b1f7f002419e1a28d917c47a44907174afa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 379 zcmb_Yu};G<5Pfda1VW%yC3Z$&z#{_)2_axf%K++raZTdN*vN4azr}>azz6VAh)c`F z%t?3m?%mTp>At={J^`F!Tp+=2j=dZsf$ZEk6E6gk!=t%CdgT{dU{o2WXRD`LhX<-H zGn2|IvU3WipMS|Twx$!ft)f<~Bx`jOylnL=HQq@I(I~4sNeg<8I&{+cXdaECXuRv> z#ui#`!FH|DMP~iGsECt5>O=-zB@~&QL6>)$8Kd2AE m$!6R$Mv{Ba43FO--WUv!bIsOdf-T17Mu2S;JPGWqRpk#%x?)@a diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.class b/target/classes/tech/allegro/hexagon/articles/adapters/notifications/ArticleSmsModel.class deleted file mode 100644 index 00355202e683ea5863fb009296a4d5ccfba3f6d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmb_Yu};G<5Pfda1VW${;sY3g0gntIBt+FIz);lv;+n*jYa_=+{1y`u10TRgAucTw zGbi2MyZ27_r2G2*_yll)ae)N;ISz7+1hOmROuQCIPEO|n>8)RAfl+0gzF)6u9UiH+ z%p6u;k)2a8{rpR&u{E8*w2E4_lC0HD@Uqpf)OaT;M5Cd;B&qj@rlqVcYi zH(PzS>h9RoUJ4X5zYa=IP49U0M?YWE3zbMQ6qx*np}@F5DJ{81KGaLCB91ZO@AM%! m*^7I|NOJF);n_RH8-oFIuGxl6u*10AE?^f0PXc?Jt?~!vQekNT diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/persistence/ArticleDatabaseModel.class b/target/classes/tech/allegro/hexagon/articles/adapters/persistence/ArticleDatabaseModel.class deleted file mode 100644 index 6192af7a64fd931e3bae5cafc35562d027dfb247..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 387 zcmb_Yu};H441L$634}naZfuOez>N$bBm@E>r7(cHJ69{Y>PV`~74ch4NDO=cABAvQ zMn){zetv%Pll=Al@d@A*;|vjYQ|zS}DJ18%vEf1?Iy{;w#8>T{6-I?^_5f)bUh&-I+r6*si?c8{3=i|0OzE&nM?{hYgPUOcot=F diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/persistence/DbArticleRepository.class b/target/classes/tech/allegro/hexagon/articles/adapters/persistence/DbArticleRepository.class deleted file mode 100644 index c5994e4ac93fb9fa8b8ab1f880969230081ec0a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4276 zcmcgwX;<4u6ukom86y(vthA(Yv$7;n0)(_clM)h&6K82iNYh=|gDoOUt}L@8P4|7@ zenNjhdrs@P{m>uKFa1Y7y<-UiG+hKaJsgcR%X{zMH}Aa}^V=W4{0iU%zD-~khBb^N z@FY&QpaG{6cnYJcIUUDX0%vfx72|k1feEA&IEV8IWN<+>7gcjfHJ4TMOdMC#`pG!1 zCU6Z?30%js3EaSQaXg>E3wTj=UQ*4=alDd%iD?a44LN~E+sz9kGp?66%J$5_tdVi^ zdFc%cG>=%0<)7r5uI?#;*qED>0-H0IBQI8p)6%Cs^RiY&Qh%Xhs+ z!ikm5Ia>R@>t9sn+@fhYMv-W3W3=KITyHpv$W_a?Wh99)*CB9!xI2oOkfQRlSqCZ5 zA4xu7CeY+7zyf_yqyv%yS~kEgFc3w2iLpRSxRq(fQZh4Z&Y6a7I(cK#_bew*cI_7= zw;*@f^vt4ETg`aNOJBf_wvjwHYWEgcE*EfC3bx6A>NV1Z0%#8BJyzAXG81tTV{l$_r#@u4bbyOtj zcno_4#ve@bXplN)kk_#rDGdc37G`zage|ZmWI2@DbNkMo)KVJeG!%6>ur;_kN_bU+ zr=yHH4f8q{u&Cjdj@x)m#~r+`;|;v2<1M_c;~l&!uzey(bkk0adf9?S9)86miUqtU zur;(9n4FP*wjgQneH}gcP{T)R*~c0_Q3gI0*mB*nZObgCCJW|GSuRP_lNvr#t3KE9 z1-?{9zY=Jre`PUcmCBW(hOgE9H;lh~F?nfvmN*1P{@JZz0V%njUp7Lh_bL%xwzgJ| zn^{$(m<$Z;pnMAK?^=-!W42i?Gji8TGO{++@l|}wHm+SupJAwZrb7rpC)w2 zk+|;$=|xvA&96?nqyLFvP$KK4fMsOPv?~nm_O%#Uc`awg6*#z(QJCK=I0oJwR!2o& z1oNSTS&Gac#p#l8>~zJlbJ7#g(~cv(x)UW6=`2Y{x3F)uR{C)ux)N398r&IybN6w^ zdQjD?%V=~UYuNA(gVJWZ}3CGeI`(ThXO{-+$3AnD@;l_?{G~ffj3LJ|P?BUI*Er_V)f-n}5 zMP1FlRZ2*yKQa=PU+IlHB7jj({8Nz;tR}I(6pMU`y1)C5M*x4B7eCjz$V-pF`Hed8 zo-%G?T%}l`_*SI+TA?Lciv5i@))SJ%ALXoEt|Sv1b>UKRL5e>;cR}D$K1p>yPa zKD>W&WG}x)xI*x~spl?4PqLwg#-9-Tfg=sr$2P$?C>z68?B|yrti}NxWKWlG>pv;y&utJqvc`}dRztQ|lL zzdI2p>K#PgNz8kR`XCYa67v!Ej&WQe83?R}NNAV$%icP=J{-c~I_^G77{nFl+)+x# zxC&@%WVfA*+Bw}$k$x%*NZjRO<)C!(p&F7G>J+xDq(JC;4O;__HEgS5dvZq&JFDoZ z;^B~2@{t-k*K!*~8x{AWnTEF!Uk8nM64h?vI!s*s{2L_NA%Z!D<2cLS1ZNc2Q~+w3 yYntIDrn0(Myx=FVU9bF$@j}$aa5Ed^ ztyJ1mLiW(DT%~VJ=-c}vbG+nd&Jklwxcq-5VHzG(mfKq0mrGrF>|-Rq6NcnSlVBoD g2?l3;^bUFxGD0dlS(_0ygy%y5o5(~Fw$`cq2Q=+r+W-In diff --git a/target/classes/tech/allegro/hexagon/articles/adapters/twitter/TwitterArticlePublisher.class b/target/classes/tech/allegro/hexagon/articles/adapters/twitter/TwitterArticlePublisher.class deleted file mode 100644 index 8be07176322b0f82af4bb3abb319458c58398ede..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1290 zcmb_cYflqF6g|@xmM$yQ@)AX@RirJ-AXZ5%(GU`1Vo@T5@6&eJ4sLgv-6=?nKgvY$ z@xdS9k22ovZUl)hj2~ua?(Dhe-nsY8eEIt6Gk|3*+sNXwg)26$qL4)j*M?BEaUC~o z%;M%S=1{UwwoqY6d)j5l*LC3X(A%x<@w#?h8PpgCSCp^JL&B8GI}DjM-I5HWb>+*a zy-q_0+oIvo4mmf4w<7`-*~wK`Zfr0tm;S)o(jB3E-l2p&o>0}IGgwJrhU&jiFyuC* zY3tUe2t-Fli8I(+x)(I%x{7Ks^Nai!_Qbwmn10^#jq1o96)LLLs_$zfjM6^wRN@|V z1LeEB5&eM*4UFx!|>?$Sth;e>cE72 zOE;D9He^eQ@2zK;IxWt1(KI?ZWXQVG#Cm0zE!B^MuX!R2YvrHGdg-t7`9V7j14fys zztvLtEW+82yyz+|o*`!6ha&C^uSXHbDdO?DwoD`sV$7Yc30+X-?`np*lXXb&Cm7@*N^aSZXcC7Linf$=~5eAQ7eZ){2r|HJYeWFh{8M`EOAks-p5$y#c W9AISR2rx}X3KwyS=0W;71AGIF6=o>_ diff --git a/target/classes/tech/allegro/hexagon/articles/domain/ArticleFacade.class b/target/classes/tech/allegro/hexagon/articles/domain/ArticleFacade.class deleted file mode 100644 index a8e076a1e50640dbbf6984a174b878cd87706549..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5274 zcmds5Yf}?f7=BJJ1jvdjiZ)=CDp(9?ylai3h)`*RT7&j#+a+1T;<8IO8!Elu??1-Q zly-1B{Q;fM^h5tZe@Um$*U(Pqn6?3ByQpPZV24$#7lTtuD&8yZzu68UQ6P2 zXbH?FP!Qg7z)UepXL zvt&DNIWy*eov6Xc3Tz9u-_V!rvf&OY&Q??6+ zW=`uxL))-HnXGaP+On3ZxQ3a@8D*DSJMu=!(%g!p3*_sT&xH{q-+*OylpJ;jMjP|w zylT6~oS{3EX6Em(3tUtS>hWtkXIO?iD)9SI82KCfyaj}+BeS8X>)lvqooxO5;4OjJ zxLu^kQ!HbS$y|0nXG&U>LC9~SE}0@@0WuDSI1Z%vwfkr88N{Jfbe zHW{Km(Tw4mdMJu<+j4mhXAd?Pa)E6A=}X}R+Wo_Eswi+W6o!{g9z@)gVhbD#L+`69 zkSO>XG@UiR3hR2)KfVG2$HTDq-9!Bons1Dd{DX)gK(wU00%o}2*l<8Aek0R}L4TbJ zrSJwzo@S=DI9t>P{Ky_SDzMUu_)P|CO~v=^zFwoUGQoNR57aKT)=<=9&`@=%9uc_v zudCXyP)kjBH0l}z#+vh^Z^wq<0-brg;uQ2r!>dg}bo!O$uxv>b^rNU?2YM9j#4ZJo zA*G-feG2xVF9BV_Da<8MQZNrAfdvJ3V6vgPWZQ1pb+jeF29>wAVNr#}m#tz+!5eTA zC@XML;kRWKZzgb8!5OSb#M27if| zZW8+u8SHf$TA`pXF{<-T;?-1hwgA<;$6UoKNaZuEljX{y?$E?t)n$1#VdebDgzyW4@P^Of}*}v5!0MaZelH z{plYd(!;BWq(@c}O&?lCES-w2BA!mgSJCz@_e8Ou&pk-+nL><(yMxGGN*nP;Qr@UHk`l+fk(4!#Cpq33?CK@<`kIt}h-*D@0;=4i zvV~A7h)U*apz=W~n8q;4rGh__SSpxHe}~xc8WItljd2`J#YPUTp*@DPaZV$t_!>GQ z;4q$w-$y5~hNL%dlXE4Qr{dpZ%RS;nJY)2F*!#G=pMnoi-9a`S2QWz$s)opI7$S!e z9HM-b2ZxdIRLtQBj?xecF5(!DQ{Fz#PvB&r?3O5rRBl(fQ6(`unn1bRd`k=Nk_u6| zt_Y^3G9zo)8o@|a&Mt4;Fp`Aop#)O4exGzhwq5L(o+5mbl1T0m&(v|Ac~I3(ndV%S zCOyX`>B08l^cvI%WNi56XyXo0eF^XTuib;<6z!xt4?!fJ8jX;)J%}{;5TuJ3BSI9H jh#SE;KIglWUp~c`_>56?opZ_mIqtcEJZ6H?3wZHQV0==5 diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/Article$ArticleBuilder.class b/target/classes/tech/allegro/hexagon/articles/domain/model/Article$ArticleBuilder.class deleted file mode 100644 index 5f618001d5bf0aa23c79093398c2a1912fda166e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2094 zcmb`HYflqF6o%hvyDeQ-sHh0u@Pb;(Ww|IOVnnDhHbFFzkoa-hPUw>DZnB*U#y_PA zhC~y8fFJ!q#&dR;5-off!iUb;%Q;WqIq%u|_2>If08g-Fqll>@22kN;nwJ?~W(%0J zk%wErd;tpr8Lug@yrEU2%$J{ahehp4t}3 zRcU(y!y8_pHoNV*ine5(H#f2oHl)8TBaiRXhdJHyIs!v!H`cqJ-&7>UsReXZBcnc-&%h(6rp{2-FQfEEQNNq-WF*^4tBCejWM#3T0((Z{ zk|{VJVS}t9oeP0aMmmnh>3o#ftR$H*fqf$(>0F+V4y(=sNndvPEIb-H`+eAr8tRqD zUx1TNiRO+ao^T=RfEo$-)3g?4mp!ACz)xJilgZ>sW}>yZ7k44Q$|7H7A7dIkDKk|J|^z+DO}!nkL$$T z+qiQQH`m8~O5BxGxZKAccPQrG#l4fbRv&kjxGzrOvM)VuDdtY%K0V?-tdn7E(AW>; yKU5B=#RtgJFGoM?5QXE0CwVX9KS}%=OPig=10rPb5al@LF;3AY?f}upF#Z=+HzRid diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/Article.class b/target/classes/tech/allegro/hexagon/articles/domain/model/Article.class deleted file mode 100644 index 46a60b2d4a9fe0790ca61744ef81b622fa6d8122..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1738 zcmb7^U279T6o%hPHlN+LY1C?~wzamJY(EyXRzVSJQ7EKUumrrEBtx=gvkRMzcE9^?YEhA5lv!7Nx@OT=G3XvTIX0mpwScu*S8OfoFRYXrO8cieN*GZ)aGxX{> z9hzZR=@ocp240_^Qg%NC-WqyHgWbv!m|acgvHCF_M_u*K({-}5>HQ1&SqjXZsZo5Y zbRkDJZeq`djd>djShP{Yl8riU2ppN;m-Uh90L*~SCD zN)UFPU3ZGm>xxrA_bCdfIv6Xcz}2`p#DnxOEV zvpL+>Ysdms?lH%`bWY~!aRDpb=MHBMQcoPOa-`R5B_io*ExDwp)#Q_&)??u=`%4y= z*66C1e08?04DPYjB3)YTrr`WQ?i)L)o?`N|p6qR>3$nfWAmcv&OvCwUczGsV!`ckk znub?r!gZ|AfD6;`+6=gY4Hhz$y^*8~DE~t7(dy_l0(79-6FIozvAXw}lFbKUIcPBcs?!vlC9xH)_ zLIZt(K2+&9tF$5J%DtE~XXc#W`OcpC{paT|0B`Wzhl{p{0uIY~;?q7Y<4C|=t7xSK zn!~wTD;cSHDo0sr;^|v~(mNBI?7cv%vwPhg3lu*lA(QJv6YDRl#YCs4Y7*tRBv8>< zrN;W(!(uiwOM%zJOb0WmqDW8EM9%cNnkKPSX=Z{*FJ+i4l!@hn=tzFpoDM?DX?)h% zED67h>+-ZFLMnfybThZr=j_C|RX}?i<@_?VrMz_77I^0MDu@ zp)7E+PoEaxvDg3O_&S;EAQLEbx?>!3axN#ziP<9D72wzuu0Fj!twZbgen9kIT*JAf z=b*y1##k_`$UKiZReJ4BG#>KSetu5nNV#|U0?=S+1CJPH@vn#wwB8L0-&vw~L1#lR rPFqN0& diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/Author$AuthorBuilder.class b/target/classes/tech/allegro/hexagon/articles/domain/model/Author$AuthorBuilder.class deleted file mode 100644 index 0276613b2d8c0eac2c459a452a2f5fb6fcbe837a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1367 zcmb_be{0iF6g{s^nk~y*oj*67Kep+*3WgyvP;tzGSg74VDfs7W@@U^k6G&1Wekz5@ zK*0~-hZ4_gitCvE5s|>V_ubrk-nr+#_v7c+?*O*3;ljb~S=4aHEO#BOy0Eb3VBNtz zfr<_V9=CH9415_ys-GtQKpn|`68kdEbr7k{50jzPu|G^g75TfPe2}EA@Tq_m%b^n3 zE>nJ>(kzKPEF?hfnT~b-T%g+6>=JK}CkQOGb*wt0VNa!RWiMi6v7H1m>dI7`{Um7R z1Dy%X7ldAnbQG#oz-z^^O7|j}Ws1Ld%aALe*3TdsnjdsNXi=!6MtL+UwOPLE9EbXA zMcu;#nNqr(A_~kHT1H8MkEMuB&ES7fvwKE+UZci8piy4;O)^RY^-`Nr&lTc7Je2Px zTkNPTf0bmp2M_ZeW-#l)#hk!a=__j>?hEXcE<8I6fx6-5M>6jF`@KUI7jM8#mDUMg;)4dl(9!$Xe~yl6$CDD_lQ=|+RYP)&*QWOt}c^+B_=PUPR}cn za1oce6S#t_%rF2uv?kYSKKO!4^Ap_)P9aucHqrZryUjqYOKmY&$ diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/Author.class b/target/classes/tech/allegro/hexagon/articles/domain/model/Author.class deleted file mode 100644 index 2f4e8a8f4ef22995fb1e56a2f8dcc333c29445fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1072 zcmb7DU5nE|6g`t7~z|Pxs zxy<#ub&|$P3;2gwrt~**_bX)u{-K z2gBx=4{PYnnUdi}Gn5NkA>e(?*E&+~6VrUBMt*WCKTFQ0swj_?*_^`1CEWMnq2t5H zj=-D7cjkZD0#6$wa4(IrFqPRN{4hUNQ7K>#hBNH*?z?;t76PM@USMR>+7Oi95P_D?t`=h*s6UsQB0T9AYf6E``U?2y((w?^M#o77raof=eX b{5oNy#>Q@ybqlv?9j+PmpcLb^*v;-=R*4SW diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/AuthorId.class b/target/classes/tech/allegro/hexagon/articles/domain/model/AuthorId.class deleted file mode 100644 index 7801cb1ce10c1b73c0ad4945e474983b04f50f53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 721 zcmbV}O-sW-5Qg7Po7Tpv_51VUt*zi5L_8>h2!c>QKq+|Krfa*BCa|XB&r(nX1%H4) zN_;o1DC)@^c4l^Go|(z}_Wt||U<)e&e9V=Q!+a470qtTDO9K9liuzh$s&S=ml#Eo| zk!Ptjac5hguw!DA?h4FSe?Qln0{Q)<&EkoMiS=>6*V6V}wW17{geqz(Yg|0M%%@#* zEwI^0b=Z|Eigd>&va4@ZCyAx9sR<)}E!#;?nOOFSj^tiH?I!lH&1ot}ntuCKS=H02 zwnTZ!rNH4|!~L_zh#K}2n5ou&FD($9C4C#}1LM{l`y6lG{k<|quv|s~MS+cf?C9!C z-1AF`lh&0EQ-NHy*2F4B^C>39ay{tf;JFf>0iy$2k2a`3LDbhC;oURxFv@eBxnNbE zbtTr68O;r{F~(Q-1sRoU()TGoDom|ll4%aVL4=?!y&!kN7Wq2{19~BQ7|p2VK@w+l i6AoEZQ`0sJv~4C1+a(p2q9K#DB(*LUnBZ&Rjdkxmnt1;fra+D zx>Pb%Szn&H++_Xl0+oG}8FwJC+<5=o>F-0@X}lkT}roIt73>|ld>h18Kc`4&8t5cm?>h|v*!Kp(a4AzGVv2yPe!n5La& zE?8A&U5zy{qm^+sX87vAsGw3vosgZCv%=Obg14Nxe>mY}I*L(rTYdqpJCy7I diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/PersonName.class b/target/classes/tech/allegro/hexagon/articles/domain/model/PersonName.class deleted file mode 100644 index f0809a6e6e1624ac841f95606ca255ea291fdbac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 728 zcmbV~O;6iE5Qg7%;)Iyc1SsEJdP`ENdq5S3R=rf>LimtCkvMLgC0XR`O3nuHv#8Vx z38emj{wUOUok$?ygbzDAo|$Lf@%Z24{a*n4*i8^)y@nDts@P0ux2o6{h_6*P)dDNs zD|M}8rtDCj`P|syH-XA`V~zhIu-1AVZubPrKiz=Ejjpl!cslOu{9N_30_Red^;B+x zKYv;FBQp`$?|Pk%q{=cq%$*$R8#Q!Rs@$72(-S#xV`Z!y6P?LZoll%SR%1;)%_Hqc zZg8q{`koPi$XyB?z9sM7U8Hsb!zb=8=1#e@(1o`WqENy!p?5$V(I%Zch|cFfhuRj2(_5cqV~Nr5Bn6d&@gDOZK$EFWEHf?O_lOX*wFi_g*rI$(XGX6S qfyIJapCwUaP&j9;kQ0cjJOfM823Fkpjp!w(@r)DC)o~?7x3&La(3xxi diff --git a/target/classes/tech/allegro/hexagon/articles/domain/model/Title.class b/target/classes/tech/allegro/hexagon/articles/domain/model/Title.class deleted file mode 100644 index 7fe0550af51a9235e84910ca72c9eff13810af30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmbV}&yEs75XQeA7?6QokQLl@_u>uM#5U`}gT{*qC;XE@NIW(}FEr_yNrr~_Seoo+ z6HR;oA8O;*1Bu4<;?AL}Yx=8SRdxNm{q_UEOPoar(XF9`$5k9h^e0t35eT=+ZnQvq zv{G9otx6Yi>~fPXUI|oQo7A{B0-fI7>;6=r{5G32xj8bae!od(I-jVSEpS<^>{R8( z$NQgUw=`>ki;>guQYvfpBG2Sfe^!eul`3~8wt6k+S)xoT6QZr07-uzGX}!~Knaw|{ zTqWA+oSY!L6d3-iv-=bXov$SDsMo(ct3Wi)HhHXv#%rRYt7rbj8hC)y1}dluJpbRh zd~%Jm{eJonvz3mWK&jWC;wiTja(mp4FThg?flr~07!BzI`e<+iF*v_Q@Rd=3I_)8~ zU{;xVHRd!Jb$4nU@Ya7(LFM{*4!Lc#C~e^(Wgh>62ti-_j?yQVD1TwFqgRTHdO>aM lMC{RbxM#J=@x&uq&yw_>6%MWt{LN|p!3p=>aS=te&M!onkfi_s diff --git a/target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleAuthorNotifier.class b/target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleAuthorNotifier.class deleted file mode 100644 index a5c6ae9a952332f5cc903374e8a0a79910b6b378..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 301 zcma)&y-veG5QJw#5<_UHc>-v-G6fA55*2?^B>IiL*cY8|(Rq#F)hKuX9tv?*OhHGp z(yaEI8SU5i$0vX_jtd+WSP@R6nty&Tw>nsv%vV9KldyS>g!S32N!2{QZYqIWAG;Im6)( D0G3)t diff --git a/target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.class b/target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleEventPublisher.class deleted file mode 100644 index 7ee9def965ea8cf39ac980f9f048f753f916bf16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcma)2Jx>Bb5PgHd30hbyKL8uIq@d9ltuzuz=!d(>-IBdsGPhj(Z5I9jf0S{Nv%t#o zeaw3=^ZE7u0bqvn4C4%Egsbgt?QB!sX|%bMdlim0_=i?}B+RByQS!>Lb5d$BmAr8o zyy1hpF-54^dQ*o&oar*=*DJ!sv&1SC3s$ZriZ+C-yCO`EOJ60bm6l!CI$nmI=JIHr z5H7paA8m0MD|)lxmI=52TDJ`vo8NWEIcexV$vF0x?I diff --git a/target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleRepository.class b/target/classes/tech/allegro/hexagon/articles/domain/ports/ArticleRepository.class deleted file mode 100644 index 9e057953127f3a0c4fa42f85786d3c993f1b2ff3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 589 zcmbV~&rZWI48}iq{R4x+PCNr#$dN<2Oh`ybpdsJ|LTj~|(q>A%30{o@55R>tLZoyz zE|fzY*_QqN?BwI??H#}c<{6GM924SBZ<+9UdMjMiN?Xg7cdF(WUAb0iFQ%~EsnRvt zw5o9>Tea9o?R-9_cRz8zZwAcyq%1jss+Quf1+q*ms0f|8Nr$>1haA zF=!Ab6$`7xl5QJw5*u*q6yhCWXlEPJ*NJv3M@B|xs0HMd&x?})=J^jl=8)ewuYUrGAo_Qwc)BYjpky_ zYwt^Sn>=0q-<1;PTM7RBgB>^G#dU-!50QlApuNlFt+GN`+^hC-)UNXCzE?G$n2`R7 v_NdNx1MMRs0Ng^1<+d=p&ss7c5eTC&3_#7xl5QJy>Ga*e{-T)f5q@X})s6atNqF>G{`>eAMoe#vbQSbnHs3?b^q@WpT zM%r&?fB&vG0CRk1_{cCKWXIFN*|sFiC+n!DWN}W5;JMU`6uw~z(Hf^M=e`!(aP4z- z{QXE5(>>v9qp|e)R)W+THM9x)ydsQt{uGR^tW&~x=ZzJ&(cH@RQLJHB$yo@?x7v?B r#Fk%S(vCZboiqji94a+&Kp=F|!vOUNUG$RgC)Xzo?jf?I9Sr{gpiEJJ