Add sequence diagram for orderCatalog

This commit is contained in:
Erik Hohlfeld 2024-01-19 14:22:52 +01:00 committed by Mathis
parent 989be26391
commit 6e7e81a26d
3 changed files with 68 additions and 0 deletions

View file

@ -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]

View file

@ -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<CustomCatalogEntry>
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<Product>
deactivate Inventory
CatalogController --> Administrator : "catalog_editor"
@enduml

BIN
src/main/asciidoc/models/design/seq_orderCatalog.svg (Stored with Git LFS) Normal file

Binary file not shown.