mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-30 18:33:42 +02:00
99 lines
3.2 KiB
Plaintext
99 lines
3.2 KiB
Plaintext
@startuml
|
|
skinparam linetype ortho
|
|
skinparam groupInheritance 2
|
|
|
|
package javax.money {
|
|
class MonetaryAmount
|
|
}
|
|
|
|
package Spring {
|
|
interface Model
|
|
class Sort
|
|
}
|
|
|
|
package Salespoint {
|
|
'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>
|
|
|
|
}
|
|
interface DataInitializer
|
|
interface Inventory << T > InventoryItem >>
|
|
class Product {
|
|
- name : String
|
|
- price : MonetaryAmount
|
|
+ Product(name : String, price : MonetaryAmount, [Metric : metric])
|
|
+ getID() : Product.Identifier
|
|
+ getCategories() : Streamable<String>
|
|
'+ addCategory(category : String) : boolean
|
|
'+ removeCategory(category : String) : boolean
|
|
+ getName() : String
|
|
+ getPrice() : @NonNull MonetaryAmount
|
|
+ setPrice(MonetaryAmount) : void
|
|
'+ supports(quantity : Quantity) : boolean
|
|
|
|
}
|
|
' class Quantity {
|
|
' + getAmount() : @NotNull BigDecimal
|
|
' }
|
|
}
|
|
|
|
package catering.catalog {
|
|
interface RentableCatalog {
|
|
+ DEFAULT_SORT : Sort
|
|
}
|
|
interface ConsumableCatalog {
|
|
+ DEFAULT_SORT : Sort
|
|
}
|
|
RentableCatalog --o CatalogController : "-rentableCatalog"
|
|
RentableCatalog ..> Catalog : "<bind> <T->Rentable"
|
|
ConsumableCatalog --o CatalogController : "-consumableCatalog"
|
|
ConsumableCatalog ..> Catalog : "<bind> <T->Catalog"
|
|
|
|
class CatalogController {
|
|
+ CatalogController()
|
|
+ CatalogByEventategory(model : Model, form : Form) : String
|
|
}
|
|
CatalogController --> Inventory : "- inventory"
|
|
CatalogController ..> Model : "use"
|
|
CatalogController .> CatalogForm : "use"
|
|
|
|
class CatalogForm {
|
|
- query
|
|
+ getQuery() : String
|
|
}
|
|
|
|
class Consumable {
|
|
- 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)
|
|
}
|
|
Consumable --|> Product
|
|
Consumable ..> MonetaryAmount : use
|
|
|
|
class Rentable {
|
|
+ Rentable(name : String, pricePerHour : MonetaryAmount) : Rentable
|
|
}
|
|
Rentable --|> Product
|
|
|
|
class CatalogDataInitalizer {
|
|
- rentableCatalog : RentableCatalog
|
|
- consumableCatalog : ConsumableCatalog
|
|
+ initalize()
|
|
}
|
|
CatalogDataInitalizer ..|> DataInitializer
|
|
}
|
|
|
|
'#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'
|
|
|
|
@enduml
|