Improve developer documentation packaging proposals

This commit is contained in:
Theo Reichert 2023-11-02 16:00:10 +01:00 committed by Simon Bruder
parent 1f9d756fa9
commit 95a2d9bab0
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
8 changed files with 69 additions and 50 deletions

View file

@ -12,7 +12,6 @@ package Salespoint {
interface DataInitializer
interface Inventory << T > InventoryItem >>
class Product
' + has price,name and categories : Iterable'
class Quantity
}
@ -22,6 +21,9 @@ package catering.catalog {
+ findByType(type, sort : Sort) : Iterable
+ findByEventType(type) : Iterable
}
CateringCatalog --o CatalogController : "-catalog"
CateringCatalog ..> Catalog : "<bind> <T->Product"
class CatalogController {
+ CatalogController()
+ eventcateringCatalog(model : Model) : String
@ -29,29 +31,21 @@ package catering.catalog {
+ mobilebreakfast(model : Model) : String
+ rentacookCatalog(model : Model) : String
}
CatalogController --> Inventory : "- inventory"
CatalogController ..> Model : "use"
class Consumable {
wholesalePrice
retailPrice
promotionPrice [0..1]
}
Consumable --|> Product
class Rentable {
pricePerHour
}
Rentable --|> Product
}
CateringCatalog --o "-catalog" CatalogController
'- for listing entries to customers'
Inventory "- inventory" <-- CatalogController
'- for checking availabilty'
Model "use" <.. CatalogController
'- for generating html for a view'
Catalog <.. "<bind> <T->Product" CateringCatalog
Product <|-- Consumable
Product <|-- Rentable
@enduml

Binary file not shown.

View file

@ -25,22 +25,22 @@ package catering.inventory {
+ InventoryController(inventory : UniqueInventory)
+ stock(model : Model) : String
}
InventoryController ..> Model
InventoryController --> UniqueInventory : "-inventory"
class InventoryInitializer {
+ InventoryInitializer(inventory : UniqueInventory, catalog : CateringCatalog)
+ initialize() : void
}
InventoryInitializer --> CateringCatalog : "-cateringCatalog"
InventoryInitializer ..|> DataInitializer
InventoryInitializer ..> Quantity
InventoryInitializer ..> UniqueInventoryItem
InventoryInitializer ---> UniqueInventory : "-inventory"
}
CateringCatalog "1 -cateringCatalog" <-- InventoryInitializer
DataInitializer <|.. InventoryInitializer
Quantity <.. InventoryInitializer
UniqueInventoryItem <.. InventoryInitializer
UniqueInventory "1 -inventory" <-- InventoryInitializer
Model <.. InventoryController
UniqueInventory "1 -inventory" <-- InventoryController
@enduml

Binary file not shown.

View file

@ -10,17 +10,18 @@ package Spring {
}
package Salespoint {
interface OrderManager <<"T > Order">>
class Cart
class Cash
class Order
class Product
class Quantity
class UserAccount
enum OrderStatus
}
package catering.catalog {
class Product
class Consumable
class Rentable
}
package catering.order {
@ -31,6 +32,16 @@ package catering.order {
+ buy(cart : Cart, userAccount : UserAccount) : String
+ orders(model : Model) : String
}
OrderController --> OrderManager : "-orderManager"
OrderController ..> Model
OrderController ..> UserAccount
OrderController ..> Order
OrderController ..> OrderStatus
OrderController ..> Cash
OrderController ..> Quantity
OrderController ..> Cart
OrderController ..> Consumable
OrderController ..> Rentable
}
@enduml

BIN
src/main/asciidoc/models/design/order.svg (Stored with Git LFS)

Binary file not shown.

View file

@ -4,36 +4,50 @@ skinparam linetype ortho
skinparam groupInheritance 2
package Salespoint {
Class PersistentUserAccountManager
Interface UserAccountRepository
Class UserAccount
Class Role
PersistentUserAccountManager "1" <-- UserAccountRepository
UserAccountRepository o-- UserAccount
UserAccount - "0...*" Role
interface UserAccountManagement
interface DataInitalizer
class UserAccount
UserAccount - Role : "0...*"
class Role
}
package catering.users {
'what is on the left will be higher up'
UserAccount <|-- AdministratorAccount
UserAccount <|-- CustomerAccount
class AdministratorAccount {
}
class CustomerAccount {
class Customer {
- address
- email
+ Customer(userAccount : UserAccount, address : String, email : String)
+ getAddress() : String
+ setAddress() : String
+ getUserAccount() : UserAccount
}
Customer --> UserAccount : "-userAccount"
Class UserController {
class UserController {
+ UserController()
+ register(form : Form, model : Model) : String
+ customers(model : Model) : String
}
UserController --> CustomerManagement : "-customerManagement"
UserController --> "1" PersistentUserAccountManager
class CustomerManagement {
+ CustomerManagement(customers : CustomerRepository, userAccounts : UserAccountsManagement)
+ createCustomer(form : RegistrationForm) : Customer
+ findAll() : Streamable
}
CustomerManagement ---> UserAccountManagement : "-userAccounts"
CustomerManagement ...> Role : "uses"
class CustomerDataInitalizer {
+ CustomerDataInitalizer(userAcccountManager : UserAccountManagement, customerRepository : CustomerRepository)
+ initalize() : void
}
CustomerDataInitalizer --> CustomerManagement : "-customerManagement"
CustomerDataInitalizer --> UserAccountManagement : "-userAcccountManagement"
CustomerDataInitalizer ..|> DataInitalizer
}
'do employees need an account?'

BIN
src/main/asciidoc/models/design/user.svg (Stored with Git LFS)

Binary file not shown.