mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-23 21:03:42 +02:00
Simon Bruder
bac025fd0a
This finally makes the licensing under AGPL-3.0-or-later explicit after I got the okay from the kickstart source owners. This also checks the REUSE compliance in a pre commit hook, and therefore also in CI.
96 lines
3 KiB
Plaintext
96 lines
3 KiB
Plaintext
' SPDX-License-Identifier: AGPL-3.0-or-later
|
|
' SPDX-FileCopyrightText: 2023 swt23w23
|
|
@startuml
|
|
skinparam linetype ortho
|
|
skinparam groupInheritance 2
|
|
|
|
package javax.money {
|
|
class MonetaryAmount
|
|
}
|
|
|
|
package java.util {
|
|
class Optional
|
|
class Set
|
|
}
|
|
|
|
package Salespoint {
|
|
'https://st.inf.tu-dresden.de/SalesPoint/api//org/salespointframework/catalog/Catalog.html'
|
|
interface Catalog<T extends Product> {
|
|
findByAnyCategory(categories : String) : Streamable<Product>
|
|
findByAllCategories(categories : String) : Streamable<Product>
|
|
|
|
}
|
|
interface DataInitializer
|
|
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() : MonetaryAmount
|
|
+ setPrice(MonetaryAmount) : void
|
|
'+ supports(quantity : Quantity) : boolean
|
|
|
|
}
|
|
' class Quantity {
|
|
' + getAmount() : @NotNull BigDecimal
|
|
' }
|
|
}
|
|
|
|
package catering.order {
|
|
enum OrderType
|
|
}
|
|
|
|
package catering.catalog {
|
|
|
|
interface CateringCatalog {
|
|
+ DEFAULT_SORT : Sort
|
|
+ findByCategories()
|
|
+ findRentablesByCategories()
|
|
+ findConsumablesByCategories()
|
|
}
|
|
CateringCatalog --|> Catalog
|
|
|
|
class Consumable {
|
|
- promotionPrice : MonetaryAmount
|
|
- wholesalePrice : MonetaryAmount
|
|
+ Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : Optional<MonetaryAmount>, Set<OrderType> categories) : Consumable
|
|
+ getPrice() : MonetaryAmount
|
|
+ getRetailPrice() : MonetaryAmount
|
|
+ setRetailPrice(price : MonetaryAmount) : void
|
|
+ getPromotionPrice(): Optional<MonetaryAmount>
|
|
+ setPromotionPrice(price : Optional<MonetaryAmount>)
|
|
+ getWholesalePrice() : MonetaryAmount
|
|
+ setWholesalePrice(price : MonetaryAmount)
|
|
}
|
|
Consumable --|> Product
|
|
Consumable ..> MonetaryAmount
|
|
Consumable ..> java.util.Optional
|
|
Consumable ..> java.util.Set
|
|
Consumable ..> catering.order.OrderType
|
|
|
|
class Rentable {
|
|
- wholesalePrice : MonetaryAmount
|
|
+ Rentable(name : String, pricePerHour : MonetaryAmount, wholesalePrice : MonetaryAmount, Set<OrderType> categories) : Rentable
|
|
+ getWholesalePrice() : MonetaryAmount
|
|
+ setWholesalePrice(price : MonetaryAmount)
|
|
}
|
|
Rentable --|> Product
|
|
Rentable ..> java.util.Set
|
|
Rentable ..> catering.order.OrderType
|
|
|
|
class CatalogDataInitializer {
|
|
- rentableCatalog : RentableCatalog
|
|
- consumableCatalog : ConsumableCatalog
|
|
+ initialize()
|
|
}
|
|
CatalogDataInitializer ..|> 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 <<use>>rs or Rentables from the Inventory'
|
|
|
|
@enduml
|