mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update Customer and Staff design model and class descriptions
Co-authored-by: Simon Bruder <simon.bruder@mailbox.tu-dresden.de>
This commit is contained in:
parent
ca38efaf1c
commit
7a769f2976
|
@ -268,6 +268,11 @@ image:models/design/user.svg[class design diagram - User]
|
|||
[options="header"]
|
||||
|===
|
||||
|Class/Enumeration |Description
|
||||
|Usercontroller |A Spring MVC Controller to handle profile management.
|
||||
|UserDataInitalizer |An Initializer with primary purpose to add the admin.
|
||||
|UserManagement |A class that manages the UserRepository.
|
||||
|UserRepository |An extension of 'CrudRepository' to save Users.
|
||||
|User |A class that allows a person to associate system data with themselves.
|
||||
|===
|
||||
|
||||
=== Staff
|
||||
|
@ -277,11 +282,24 @@ image:models/design/staff.svg[class design diagram - Staff]
|
|||
[options="header"]
|
||||
|===
|
||||
|Class/Enumeration |Description
|
||||
|Usercontroller |A Spring MVC Controller to handle profile management.
|
||||
|UserDataInitalizer |An Initalizer with primary purpose to add the admin.
|
||||
|UserManagement |A class that manages the UserRepository.
|
||||
|UserRepository |An exntension of 'CrudRepository' to save Users.
|
||||
|User |A class that allows a person to associate system data with themself.
|
||||
|Staff |A class that represents staff members. It includes personal details and job information.
|
||||
|StaffController |A Spring MVC Controller for managing staff-related operations such as adding, removing, and updating staff data.
|
||||
|StaffDataInitializer |An Initalizer with primary purpose to create dummy data on application startup.
|
||||
|StaffRepository |An extension of 'CrudRepository' to perform add, save, count, remove, and find by id operations specific to staff objects.
|
||||
|===
|
||||
|
||||
=== Customer
|
||||
|
||||
image:models/design/customer.svg[class design diagram - Customer]
|
||||
|
||||
[options="header"]
|
||||
|===
|
||||
|Class/Enumeration |Description
|
||||
|Customer |A class that represents the customer's information. It includes the customer names and surnames.
|
||||
|CustomerController |A Spring MVC Controller for managing customer-related operations such as removing, and updating customer data.
|
||||
|CustomerDataInitializer |An Initalizer with primary purpose to create dummy data on application startup.
|
||||
|CustomerRepository |An extension of 'CrudRepository' to perform add, save, count, remove, and find by id operations specific to customer objects.
|
||||
|RegistrationForm |A class to handle the data input for new customer registration. It provides methods to retrieve the information and validate the data provided through forms.
|
||||
|===
|
||||
|
||||
|
||||
|
|
|
@ -16,17 +16,19 @@ package customer {
|
|||
|
||||
class Customer {
|
||||
- id: int
|
||||
+ Customer()
|
||||
+ addCustomer(customer: Customer): boolean
|
||||
+ save(customer: Customer): void
|
||||
+ count(): long
|
||||
+ removeCustomer(customerID: int): boolean
|
||||
+ getCustomers(): Collection<Customer>
|
||||
+ findById(id: int): Optional<Customer>
|
||||
- surname: String
|
||||
- name: String
|
||||
+ Customer(name: String, surname: String)
|
||||
+ getId(): int
|
||||
+ getSurname(): String
|
||||
+ getName(): String
|
||||
+ setId(): void
|
||||
+ setSurname(): void
|
||||
+ setName(): void
|
||||
}
|
||||
|
||||
class CustomerController {
|
||||
+ CustomerController(staffRepository: StaffRepository)
|
||||
+ CustomerController(customerRepository: CustomerRepository)
|
||||
+ getCustomer(model Model): String
|
||||
+ removeCustomer(customerID: int, model Model): String
|
||||
+ editCustomer(id: int, model Model): String
|
||||
|
@ -34,7 +36,7 @@ package customer {
|
|||
}
|
||||
|
||||
class CustomerDataInitializer {
|
||||
+ CustomerDataInitializer(customeRepository: CustomeRepository)
|
||||
+ CustomerDataInitializer(customerRepository: CustomerRepository)
|
||||
+ initialize(): void
|
||||
}
|
||||
|
||||
|
@ -43,17 +45,29 @@ package customer {
|
|||
+ addCustomer(customer: Customer): boolean
|
||||
+ save(customer: Customer): void
|
||||
+ count(): long
|
||||
+ removeStaff(staffID: int) boolean
|
||||
+ getCustomer(): Collection<Customer>
|
||||
+ removeCustomer(customerID: int) boolean
|
||||
+ getCustomers(): Collection<Customer>
|
||||
+ findById(id: int): Optional<Customer>
|
||||
}
|
||||
|
||||
class RegistrationForm {
|
||||
- name: String
|
||||
- password: String
|
||||
- address: String
|
||||
+ RegistrationForm(String name, String password, String address)
|
||||
+ getName(): String
|
||||
+ getPassword(): String
|
||||
+ getAddress(): String
|
||||
+ validate(errors Errors): void
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
CustomerRepository *-- Customer : -customer
|
||||
CustomerController --> CustomerRepository : -customerRepository
|
||||
CustomerDataInitializer --> CustomerRepository : -customerRepository
|
||||
RegistrationForm <-- CustomerController : use
|
||||
CustomerRepository --> Set : -customers
|
||||
CustomerRepository --> HashSet : use
|
||||
CustomerRepository --> Collection : use
|
||||
|
|
BIN
src/main/asciidoc/models/design/customer.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/customer.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -34,7 +34,7 @@ package staff {
|
|||
+ StaffController(staffRepository: StaffRepository)
|
||||
+ getStaff(model Model): String
|
||||
+ removeStaff(staffID: int, model Model): String
|
||||
+ addStaff(name: String, surname: String, job: String): String
|
||||
+ addStaff(name: String, surname: String, job: String, model Model): String
|
||||
+ editStaff(id: int, model Model): String
|
||||
+ updateStaff(staff: Staff): String
|
||||
}
|
||||
|
|
BIN
src/main/asciidoc/models/design/staff.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/staff.svg
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue