diff --git a/src/main/asciidoc/developer_documentation.adoc b/src/main/asciidoc/developer_documentation.adoc index 3e2dd9d..0004f6a 100644 --- a/src/main/asciidoc/developer_documentation.adoc +++ b/src/main/asciidoc/developer_documentation.adoc @@ -347,3 +347,6 @@ image:models/design/seq_inventory.svg[sequence diagram - inventory] === Order image:models/design/seq_order.svg[sequence diagram - order] +=== OrderCatalog +image:models/design/seq_orderCatalog.svg[sequence diagram - orderCatalog] + diff --git a/src/main/asciidoc/models/design/seq_orderCatalog.puml b/src/main/asciidoc/models/design/seq_orderCatalog.puml new file mode 100644 index 0000000..7ac65dc --- /dev/null +++ b/src/main/asciidoc/models/design/seq_orderCatalog.puml @@ -0,0 +1,62 @@ +' SPDX-License-Identifier: AGPL-3.0-or-later +' SPDX-FileCopyrightText: 2023-2024 swt23w23 +@startuml +participant Customer +participant Administrator +participant CatalogController +participant CustomCatalogEntryRepository +participant CartService +participant Spring + +== Add catalog entry to cart == + +activate Customer +Customer -> CatalogController : catalog(model : Model) +activate CatalogController +CatalogController -> CustomCatalogEntryRepository : findAll() +activate CustomCatalogEntryRepository +CustomCatalogEntryRepository --> CatalogController : Streamable +deactivate CustomCatalogEntryRepository +CatalogController -> Spring : model.addAttribute() +activate Spring +Spring --> CatalogController : Model +deactivate Spring +CatalogController --> Customer : "catalog.html" +deactivate CatalogController + +Customer -> CatalogController : addToCart(catalogEntryID : long) +activate CatalogController +CatalogController -> CustomCatalogEntryRepository : findById(catalogEntryID) +activate CustomCatalogEntryRepository +CustomCatalogEntryRepository --> CatalogController : CustomCatalogEntry +deactivate CustomCatalogEntryRepository +CatalogController -> CartService : getCart() +activate CartService +CartService --> CatalogController : cart : CustomCart +deactivate CartService +CatalogController -> CatalogController : cart.addOrUpdateItem() +CatalogController -> CatalogController : cart.setOrderType() +CatalogController -> CartService : setCart() +activate CartService +CartService --> CatalogController +deactivate CartService +CatalogController --> Customer : "redirect:/event" +deactivate CatalogController +deactivate Customer + +== Access order catalog editor == + +Administrator -> CatalogController : editCatalog(model : Model) +activate Administrator +activate CatalogController +CatalogController -> Spring : model.addAttribute() +activate Spring +Spring --> CatalogController : Model +deactivate Spring +CatalogController -> Inventory : findAll() +activate Inventory +Inventory --> CatalogController : List +deactivate Inventory +CatalogController --> Administrator : "catalog_editor" + +@enduml diff --git a/src/main/asciidoc/models/design/seq_orderCatalog.svg b/src/main/asciidoc/models/design/seq_orderCatalog.svg new file mode 100644 index 0000000..d9e5e0d --- /dev/null +++ b/src/main/asciidoc/models/design/seq_orderCatalog.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:015f734908c403a86d8463386d8434f79773e6e08446ed9f569be37f3fed5ab0 +size 18243