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

93 lines
3.1 KiB
Plaintext
Raw Normal View History

2023-11-02 06:33:27 +01:00
@startuml
skinparam linetype ortho
skinparam groupInheritance 2
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-09 09:01:25 +01:00
+ Product(name : String, price : javax.money.MonetaryAmount, [Metric : metric])
+ 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
+ getPrice() : @NonNull javax.money.MonetaryAmount
2023-11-10 23:57:50 +01:00
'+ setPrice() : @NonNull javax.money.MonetaryAmount
'+ 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-10 23:57:50 +01:00
'- wholesalePrice : javax.money.MonetaryAmount
2023-11-09 09:01:25 +01:00
- retailPrice : javax.money.MonetaryAmount
- promotionPrice : javax.money.MonetaryAmount
2023-11-10 23:57:50 +01:00
+ Consumable(name : String, price : javax.money.MonetaryAmount) : Consumable
2023-11-09 09:01:25 +01:00
+ getPrice() : javax.money.MonetaryAmount
2023-11-10 23:57:50 +01:00
+ setPrice() : javax.money.MonetaryAmount
'+ setWholeSalePrice(price : javax.money.MonetaryAmount)
+ setRetailPrice(price : javax.money.MonetaryAmount)
+ setPromotionPrice(price : javax.money.MonetaryAmount)
2023-11-02 06:33:27 +01:00
}
Consumable --|> Product
2023-11-02 06:33:27 +01:00
class Rentable {
2023-11-09 09:01:25 +01:00
- pricePerHour : javax.money.MonetaryAmount
2023-11-10 23:57:50 +01:00
+ Rentable(name : String, pricePerHour : javax.money.MonetaryAmount) : Rentable
+ getPrice() : javax.money.MonetaryAmount 'return pricePerHour'
+ setPrice(price : javax.money.MonetaryAmount)
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