swt23w23/src/main/asciidoc/models/design/catalog.puml

99 lines
3.2 KiB
Plaintext
Raw Normal View History

2023-11-02 06:33:27 +01:00
@startuml
skinparam linetype ortho
skinparam groupInheritance 2
2023-11-11 18:07:03 +01:00
package javax.money {
class MonetaryAmount
}
2023-11-02 06:33:27 +01:00
package Spring {
interface Model
class Sort
}
package Salespoint {
2023-11-09 09:01:25 +01:00
'https://st.inf.tu-dresden.de/SalesPoint/api//org/salespointframework/catalog/Catalog.html'
interface Catalog << T > Product >> {
findByAnyCategory(categories : String) : Streamable<Product>
findByAllCategories(categories : String) : Streamable<Product>
}
2023-11-02 06:33:27 +01:00
interface DataInitializer
interface Inventory << T > InventoryItem >>
2023-11-09 09:01:25 +01:00
class Product {
2023-11-10 23:57:50 +01:00
- name : String
2023-11-11 18:07:03 +01:00
- price : MonetaryAmount
+ Product(name : String, price : MonetaryAmount, [Metric : metric])
2023-11-09 09:01:25 +01:00
+ getID() : Product.Identifier
+ getCategories() : Streamable<String>
2023-11-10 23:57:50 +01:00
'+ addCategory(category : String) : boolean
'+ removeCategory(category : String) : boolean
2023-11-09 09:01:25 +01:00
+ getName() : String
2023-11-11 18:07:03 +01:00
+ getPrice() : @NonNull MonetaryAmount
+ setPrice(MonetaryAmount) : void
2023-11-10 23:57:50 +01:00
'+ supports(quantity : Quantity) : boolean
2023-11-09 09:01:25 +01:00
}
2023-11-10 23:57:50 +01:00
' class Quantity {
' + getAmount() : @NotNull BigDecimal
' }
2023-11-02 06:33:27 +01:00
}
package catering.catalog {
2023-11-10 23:57:50 +01:00
interface RentableCatalog {
+ DEFAULT_SORT : Sort
}
interface ConsumableCatalog {
2023-11-02 06:33:27 +01:00
+ DEFAULT_SORT : Sort
}
2023-11-10 23:57:50 +01:00
RentableCatalog --o CatalogController : "-rentableCatalog"
RentableCatalog ..> Catalog : "<bind> <T->Rentable"
ConsumableCatalog --o CatalogController : "-consumableCatalog"
ConsumableCatalog ..> Catalog : "<bind> <T->Catalog"
2023-11-02 06:33:27 +01:00
class CatalogController {
+ CatalogController()
2023-11-09 09:01:25 +01:00
+ CatalogByEventategory(model : Model, form : Form) : String
2023-11-02 06:33:27 +01:00
}
CatalogController --> Inventory : "- inventory"
CatalogController ..> Model : "use"
2023-11-09 09:01:25 +01:00
CatalogController .> CatalogForm : "use"
class CatalogForm {
- query
+ getQuery() : String
}
2023-11-02 06:33:27 +01:00
class Consumable {
2023-11-11 18:07:03 +01:00
- promotionPrice : MonetaryAmount
- wholesalePrice : MonetaryAmount
+ Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount) : Consumable
+ Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : MonetaryAmount) : Consumable
+ getPrice() : MonetaryAmount
+ getRetailPrice() : MonetaryAmount
+ setPrice(price : MonetaryAmount) : void
+ getPromotionPrice(): MonetaryAmount
+ setPromotionPrice(price : MonetaryAmount)
+ getWholeSalePrice() : MonetaryAmount
+ setWholeSalePrice(price : MonetaryAmount)
2023-11-02 06:33:27 +01:00
}
Consumable --|> Product
2023-11-11 18:07:03 +01:00
Consumable ..> MonetaryAmount : use
2023-11-02 06:33:27 +01:00
class Rentable {
2023-11-11 18:07:03 +01:00
+ Rentable(name : String, pricePerHour : MonetaryAmount) : Rentable
2023-11-02 06:33:27 +01:00
}
Rentable --|> Product
2023-11-10 23:57:50 +01:00
class CatalogDataInitalizer {
- rentableCatalog : RentableCatalog
- consumableCatalog : ConsumableCatalog
+ initalize()
}
CatalogDataInitalizer ..|> DataInitializer
2023-11-02 06:33:27 +01:00
}
2023-11-09 09:01:25 +01:00
'#TODO: to determine which Products of a Category to offer I need to retrieve information about availability of e.g. Cooks and ServicePersonel from the Users or Rentables from the Inventory'
2023-11-02 06:33:27 +01:00
@enduml