mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Add sequence diagram for orderCatalog
This commit is contained in:
parent
989be26391
commit
6e7e81a26d
|
@ -347,3 +347,6 @@ image:models/design/seq_inventory.svg[sequence diagram - inventory]
|
||||||
=== Order
|
=== Order
|
||||||
image:models/design/seq_order.svg[sequence diagram - order]
|
image:models/design/seq_order.svg[sequence diagram - order]
|
||||||
|
|
||||||
|
=== OrderCatalog
|
||||||
|
image:models/design/seq_orderCatalog.svg[sequence diagram - orderCatalog]
|
||||||
|
|
||||||
|
|
62
src/main/asciidoc/models/design/seq_orderCatalog.puml
Normal file
62
src/main/asciidoc/models/design/seq_orderCatalog.puml
Normal 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
BIN
src/main/asciidoc/models/design/seq_orderCatalog.svg
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in a new issue