updates
This commit is contained in:
@@ -1,49 +1,50 @@
|
|||||||
digraph InventoryManagementSystem {
|
digraph InventoryMClassDiagram {
|
||||||
rankdir=TB;
|
rankdir=TB;
|
||||||
node [shape=record, fontname="Arial", fontsize=10];
|
node [shape=record, fontname="Arial", fontsize=10];
|
||||||
edge [fontname="Arial", fontsize=9];
|
edge [fontname="Arial", fontsize=9];
|
||||||
|
|
||||||
// Core Model Classes
|
// Core Model Classes
|
||||||
Address [label="{Address|+ street: String\l+ city: String\l+ state: String\l+ zip: String\l|+ getStreet(): String\l+ setStreet(String): void\l+ getCity(): String\l+ setCity(String): void\l+ getState(): String\l+ setState(String): void\l+ getZip(): String\l+ setZip(String): void\l+ hashCode(): int\l+ equals(Object): boolean\l+ toString(): String\l}"];
|
Address [label="{Address|+ street : String\l+ city : String\l+ state : String\l+ zip : String\l|+ getStreet() : String\l+ setStreet(String)\l+ getCity() : String\l+ setCity(String)\l+ getState() : String\l+ setState(String)\l+ getZip() : String\l+ setZip(String)\l+ hashCode() : int\l+ equals(Object) : boolean\l+ toString() : String\l}"];
|
||||||
|
|
||||||
Customer [label="{Customer|# id: String\l# updated: ZonedDateTime\l- phone: String\l- mailing: Address\l- email: String\l- nameFirst: String\l- nameLast: String\l|+ Customer(String, String, String, String)\l+ getId(): String\l+ setId(String): void\l+ getPhone(): String\l+ setPhone(String): void\l+ getMailing(): Address\l+ setMailing(Address): void\l+ getEmail(): String\l+ setEmail(String): void\l+ getNameFirst(): String\l+ setNameFirst(String): void\l+ getNameLast(): String\l+ setNameLast(String): void\l}"];
|
Customer [label="{Customer|# id : String\l# updated : ZonedDateTime\l- phone : String\l- mailing : Address\l- email : String\l- nameFirst : String\l- nameLast : String\l|+ Customer(String, String, String, String)\l+ getId() : String\l+ setId(String)\l+ getPhone() : String\l+ setPhone(String)\l+ getMailing() : Address\l+ setMailing(Address)\l+ getEmail() : String\l+ setEmail(String)\l+ getNameFirst() : String\l+ setNameFirst(String)\l+ getNameLast() : String\l+ setNameLast(String)\l}"];
|
||||||
|
|
||||||
InventoryPiece [label="{«abstract»\lInventoryPiece|+ id: String\l+ price: float\l+ created: ZonedDateTime\l+ title: String\l+ description: String\l+ Author: String\l|+ InventoryPiece()\l+ getType(): String\l+ getId(): String\l+ setId(String): void\l+ getPrice(): float\l+ setPrice(float): void\l+ getCreated(): ZonedDateTime\l+ setCreated(ZonedDateTime): void\l+ getTitle(): String\l+ setTitle(String): void\l+ getDescription(): String\l+ setDescription(String): void\l+ getAuthor(): String\l+ setAuthor(String): void\l+ «abstract» computePrice(): float\l}"];
|
// Inventory Hierarchy
|
||||||
|
InventoryPiece [label="{«abstract»\lInventoryPiece|+ id : String\l+ price : float\l+ created : ZonedDateTime\l+ title : String\l+ description : String\l+ Author : String\l|+ InventoryPiece()\l+ getType() : String\l+ getId() : String\l+ setId(String)\l+ getPrice() : float\l+ setPrice(float)\l+ getCreated() : ZonedDateTime\l+ setCreated(ZonedDateTime)\l+ getTitle() : String\l+ setTitle(String)\l+ getDescription() : String\l+ setDescription(String)\l+ getAuthor() : String\l+ setAuthor(String)\l+ computePrice() : float\l}" style=filled, fillcolor=lightblue];
|
||||||
|
|
||||||
Drawing [label="{Drawing|+ style: String\l+ technique: String\l+ category: String\l|+ Drawing()\l+ computePrice(): float\l}"];
|
Drawing [label="{Drawing|+ style : String\l+ technique : String\l+ category : String\l|+ Drawing()\l+ computePrice() : float\l}"];
|
||||||
|
|
||||||
Painting [label="{Painting|- height: int\l- width: int\l- style: String\l- technique: String\l- category: String\l|+ Painting()\l+ Painting(int, int)\l+ getHeight(): int\l+ setHeight(int): void\l+ getWidth(): int\l+ setWidth(int): void\l+ getStyle(): String\l+ setStyle(String): void\l+ getTechnique(): String\l+ setTechnique(String): void\l+ getCategory(): String\l+ setCategory(String): void\l+ computePrice(): float\l}"];
|
Painting [label="{Painting|- height : int\l- width : int\l- style : String\l- technique : String\l- category : String\l|+ Painting()\l+ Painting(int, int)\l+ getHeight() : int\l+ setHeight(int)\l+ getWidth() : int\l+ setWidth(int)\l+ getStyle() : String\l+ setStyle(String)\l+ getTechnique() : String\l+ setTechnique(String)\l+ getCategory() : String\l+ setCategory(String)\l+ computePrice() : float\l}"];
|
||||||
|
|
||||||
Print [label="{Print|- openEditionType: String\l- category: String\l|+ Print()\l+ Print(String, String)\l+ getOpenEditionType(): String\l+ setOpenEditionType(String): void\l+ getCategory(): String\l+ setCategory(String): void\l+ computePrice(): float\l}"];
|
Print [label="{Print|- openEditionType : String\l- category : String\l|+ Print()\l+ Print(String, String)\l+ getOpenEditionType() : String\l+ setOpenEditionType(String)\l+ getCategory() : String\l+ setCategory(String)\l+ computePrice() : float\l}"];
|
||||||
|
|
||||||
Sculpture [label="{Sculpture|- material: String\l- weight: float\l|+ Sculpture()\l+ Sculpture(float)\l+ getMaterial(): String\l+ setMaterial(String): void\l+ getWeight(): float\l+ setWeight(float): void\l+ computePrice(): float\l}"];
|
Sculpture [label="{Sculpture|- material : String\l- weight : float\l|+ Sculpture()\l+ Sculpture(float)\l+ getMaterial() : String\l+ setMaterial(String)\l+ getWeight() : float\l+ setWeight(float)\l+ computePrice() : float\l}"];
|
||||||
|
|
||||||
Transaction [label="{Transaction|- id: String\l- created: ZonedDateTime\l- completed: ZonedDateTime\l- customerId: String\l- shipToAddress: Address\l- customerInventoryList: InventoryList\l- totalPrice: float\l- attributes: JsonArray\l|# Transaction(Customer, InventoryList)\l# Transaction()\l+ getId(): String\l+ setId(String): void\l+ getCreated(): ZonedDateTime\l+ setCreated(ZonedDateTime): void\l+ getCompleted(): ZonedDateTime\l+ setCompleted(ZonedDateTime): void\l+ getCustomerId(): String\l+ setCustomerId(String): void\l+ getShipToAddress(): Address\l+ setShipToAddress(Address): void\l+ getCustomerInventoryList(): InventoryList\l+ setCustomerInventoryList(InventoryList): void\l+ getTotalPrice(): float\l+ setTotalPrice(float): void\l+ getAttributes(): JsonArray\l+ setAttributes(JsonArray): void\l+ toString(): String\l}"];
|
Transaction [label="{Transaction|- id : String\l- created : ZonedDateTime\l- completed : ZonedDateTime\l- customerId : String\l- shipToAddress : Address\l- customerInventoryList : InventoryList\l- totalPrice : float\l- attributes : JsonArray\l|# Transaction(Customer, InventoryList)\l+ getId() : String\l+ setId(String)\l+ getCreated() : ZonedDateTime\l+ setCreated(ZonedDateTime)\l+ getCompleted() : ZonedDateTime\l+ setCompleted(ZonedDateTime)\l+ getCustomerId() : String\l+ setCustomerId(String)\l+ getShipToAddress() : Address\l+ setShipToAddress(Address)\l+ getCustomerInventoryList() : InventoryList\l+ setCustomerInventoryList(InventoryList)\l+ getTotalPrice() : float\l+ setTotalPrice(float)\l+ getAttributes() : JsonArray\l+ setAttributes(JsonArray)\l+ toString() : String\l}"];
|
||||||
|
|
||||||
// Collection Classes
|
// List Classes (extend ArrayList)
|
||||||
CustomerList [label="{CustomerList|+ CustomerList()\l}"];
|
CustomerList [label="{CustomerList|+ CustomerList()\l}" style=filled, fillcolor=lightyellow];
|
||||||
InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece): boolean\l}"];
|
InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece) : boolean\l}" style=filled, fillcolor=lightyellow];
|
||||||
TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction): boolean\l}"];
|
TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}" style=filled, fillcolor=lightyellow];
|
||||||
|
|
||||||
// Manager Classes
|
// Manager Classes (Singletons)
|
||||||
CustomerManager [label="{«singleton»\lCustomerManager|- INSTANCE: CustomerManager\l+ CUSTOMERS: CustomerList\l|+ getInstance(): CustomerManager\l+ add(Customer): boolean\l- check(Customer): void\l+ findById(String): Customer\l+ findByEmail(String): Customer\l+ save(): void\l+ load(): void\l}"];
|
CustomerManager [label="{CustomerManager|- INSTANCE : CustomerManager\l+ CUSTOMERS : CustomerList\l|+ getInstance() : CustomerManager\l+ add(Customer) : boolean\l- check(Customer)\l+ findById(String) : Customer\l+ findByEmail(String) : Customer\l+ save()\l+ load()\l}" style=filled, fillcolor=lightgreen];
|
||||||
|
|
||||||
InventoryManager [label="{«singleton»\lInventoryManager|- INSTANCE: InventoryManager\l+ INVENTORY: InventoryList\l|+ getInstance(): InventoryManager\l+ add(InventoryPiece): void\l+ find(String): InventoryPiece\l+ update(InventoryPiece): InventoryPiece\l+ Remove(InventoryPiece): InventoryPiece\l+ save(): void\l+ load(): void\l}"];
|
InventoryManager [label="{InventoryManager|- INSTANCE : InventoryManager\l+ INVENTORY : InventoryList\l|+ getInstance() : InventoryManager\l+ add(InventoryPiece)\l+ find(String) : InventoryPiece\l+ update(InventoryPiece) : InventoryPiece\l+ Remove(InventoryPiece) : InventoryPiece\l+ save()\l+ load()\l}" style=filled, fillcolor=lightgreen];
|
||||||
|
|
||||||
TransactionManager [label="{«singleton»\lTransactionManager|- INSTANCE: TransactionManager\l+ TRANSACTIONS: TransactionList\l|+ getInstance(): TransactionManager\l+ TransactRequest(Customer, InventoryList): Transaction\l+ complete(Transaction): void\l+ compute(Transaction): void\l+ findByCustomerEmail(String): TransactionList\l+ findByTransactionId(String): TransactionList\l+ findByTransactionDate(ZonedDateTime): TransactionList\l+ remove(Transaction): void\l+ save(): void\l}"];
|
TransactionManager [label="{TransactionManager|- INSTANCE : TransactionManager\l+ TRANSACTIONS : TransactionList\l|+ getInstance() : TransactionManager\l+ TransactRequest(Customer, InventoryList) : Transaction\l+ complete(Transaction)\l+ compute(Transaction)\l+ findByCustomerEmail(String) : TransactionList\l+ findByTransactionId(String) : TransactionList\l+ findByTransactionDate(ZonedDateTime) : TransactionList\l+ remove(Transaction)\l+ save()\l}" style=filled, fillcolor=lightgreen];
|
||||||
|
|
||||||
DataRepository [label="{«singleton»\lDataRepository|- INSTANCE: DataRepository\l|+ getInstance(): DataRepository\l+ generateRandomID(int): String\l+ generateRandom10DigitID(): String\l+ WalkFileSystemTree(InventoryManager): void\l+ WalkFileSystemTree(CustomerManager): void\l+ WalkFileSystemTree(TransactionManager): void\l+ mapJsonToObjectList(String, Class): List\l- write(CustomerManager): void\l- write(InventoryManager): void\l- read(CustomerManager, Path): void\l- read(InventoryManager, Path): void\l}"];
|
DataRepository [label="{DataRepository|- INSTANCE : DataRepository\l|+ getInstance() : DataRepository\l+ generateRandomID(int) : String\l+ generateRandom10DigitID() : String\l+ WalkFileSystemTree(InventoryManager)\l+ WalkFileSystemTree(CustomerManager)\l+ WalkFileSystemTree(TransactionManager)\l+ mapJsonToObjectList(String, Class) : List\l- write(CustomerManager)\l- write(InventoryManager)\l- read(CustomerManager, Path)\l- read(InventoryManager, Path)\l}" style=filled, fillcolor=lightcoral];
|
||||||
|
|
||||||
// Exception Classes
|
// Exception Classes
|
||||||
InvalidArtOperationException [label="{«exception»\lInvalidArtOperationException|+ InvalidArtOperationException(String)\l+ InvalidArtOperationException(String, Throwable)\l+ InvalidArtOperationException(Throwable)\l}"];
|
InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l+ InvalidArtOperationException(String, Throwable)\l+ InvalidArtOperationException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||||
|
|
||||||
InvalidRecordDataException [label="{«exception»\lInvalidRecordDataException|+ InvalidRecordDataException(String)\l+ InvalidRecordDataException(String, Throwable)\l+ InvalidRecordDataException(Throwable)\l}"];
|
InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l+ InvalidRecordDataException(String, Throwable)\l+ InvalidRecordDataException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||||
|
|
||||||
InvalidTransactionException [label="{«exception»\lInvalidTransactionException|+ InvalidTransactionException(String)\l+ InvalidTransactionException(String, Throwable)\l+ InvalidTransactionException(Throwable)\l}"];
|
InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l+ InvalidTransactionException(String, Throwable)\l+ InvalidTransactionException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||||
|
|
||||||
InvalidTransOperationException [label="{«exception»\lInvalidTransOperationException|+ InvalidTransOperationException(String)\l+ InvalidTransOperationException(String, Throwable)\l+ InvalidTransOperationException(Throwable)\l}"];
|
InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l+ InvalidTransOperationException(String, Throwable)\l+ InvalidTransOperationException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||||
|
|
||||||
// Inheritance Relationships
|
// Inheritance relationships
|
||||||
Drawing -> InventoryPiece [arrowhead=empty, label="extends"];
|
Drawing -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||||
Painting -> InventoryPiece [arrowhead=empty, label="extends"];
|
Painting -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||||
Print -> InventoryPiece [arrowhead=empty, label="extends"];
|
Print -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||||
@@ -53,47 +54,34 @@ digraph InventoryManagementSystem {
|
|||||||
InventoryList -> InventoryPiece [arrowhead=diamond, label="contains"];
|
InventoryList -> InventoryPiece [arrowhead=diamond, label="contains"];
|
||||||
TransactionList -> Transaction [arrowhead=diamond, label="contains"];
|
TransactionList -> Transaction [arrowhead=diamond, label="contains"];
|
||||||
|
|
||||||
// Composition/Association Relationships
|
// Associations
|
||||||
Customer -> Address [arrowhead=diamond, label="has"];
|
Customer -> Address [arrowhead=open, label="has"];
|
||||||
Transaction -> Address [arrowhead=diamond, label="has"];
|
Transaction -> Address [arrowhead=open, label="shipTo"];
|
||||||
Transaction -> InventoryList [arrowhead=diamond, label="has"];
|
Transaction -> InventoryList [arrowhead=open, label="has"];
|
||||||
|
Transaction -> Customer [arrowhead=open, style=dashed, label="references"];
|
||||||
|
|
||||||
// Manager Relationships
|
// Manager relationships
|
||||||
CustomerManager -> CustomerList [arrowhead=diamond, label="manages"];
|
CustomerManager -> CustomerList [arrowhead=diamond];
|
||||||
InventoryManager -> InventoryList [arrowhead=diamond, label="manages"];
|
InventoryManager -> InventoryList [arrowhead=diamond];
|
||||||
TransactionManager -> TransactionList [arrowhead=diamond, label="manages"];
|
TransactionManager -> TransactionList [arrowhead=diamond];
|
||||||
|
|
||||||
// Dependencies
|
// DataRepository relationships
|
||||||
CustomerManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
DataRepository -> CustomerManager [arrowhead=open, style=dashed, label="persists"];
|
||||||
InventoryManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
DataRepository -> InventoryManager [arrowhead=open, style=dashed, label="persists"];
|
||||||
TransactionManager -> Customer [arrowhead=vee, style=dashed, label="uses"];
|
DataRepository -> TransactionManager [arrowhead=open, style=dashed, label="persists"];
|
||||||
TransactionManager -> InventoryList [arrowhead=vee, style=dashed, label="uses"];
|
|
||||||
Customer -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
|
||||||
InventoryPiece -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
|
||||||
Transaction -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
|
||||||
|
|
||||||
// Exception Usage
|
// Exception usage
|
||||||
CustomerManager -> InvalidRecordDataException [arrowhead=vee, style=dashed, label="throws"];
|
CustomerManager -> InvalidRecordDataException [arrowhead=open, style=dashed, label="throws"];
|
||||||
subgraph cluster_exceptions {
|
|
||||||
label="Exception Classes";
|
|
||||||
style=filled;
|
|
||||||
color=lightyellow;
|
|
||||||
InvalidArtOperationException; InvalidRecordDataException; InvalidTransactionException; InvalidTransOperationException;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subgraphs for organization
|
// Legend
|
||||||
subgraph cluster_model {
|
subgraph cluster_legend {
|
||||||
label="Model Classes";
|
label="Legend";
|
||||||
style=filled;
|
style=dashed;
|
||||||
color=lightgrey;
|
|
||||||
Address; Customer; InventoryPiece; Drawing; Painting; Print; Sculpture; Transaction;
|
legend1 [label="Abstract Class" style=filled, fillcolor=lightblue, shape=box];
|
||||||
|
legend2 [label="Manager (Singleton)" style=filled, fillcolor=lightgreen, shape=box];
|
||||||
|
legend3 [label="Collection" style=filled, fillcolor=lightyellow, shape=box];
|
||||||
|
legend4 [label="Repository" style=filled, fillcolor=lightcoral, shape=box];
|
||||||
|
legend5 [label="Exception" style=filled, fillcolor=pink, shape=box];
|
||||||
}
|
}
|
||||||
|
|
||||||
subgraph cluster_managers {
|
|
||||||
label="Manager Classes (Singletons)";
|
|
||||||
style=filled;
|
|
||||||
color=lightgreen;
|
|
||||||
CustomerManager; InventoryManager; TransactionManager; DataRepository; CustomerList; InventoryList; TransactionList;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user