Updates
This commit is contained in:
@@ -1,87 +1,84 @@
|
||||
digraph InventoryMClassDiagram {
|
||||
rankdir=TB;
|
||||
node [shape=record, fontname="Arial", fontsize=10];
|
||||
edge [fontname="Arial", fontsize=9];
|
||||
|
||||
// Core Model Classes
|
||||
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)\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}"];
|
||||
|
||||
// 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}"];
|
||||
|
||||
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)\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)\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+ 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}"];
|
||||
|
||||
// List Classes (extend ArrayList)
|
||||
CustomerList [label="{CustomerList|+ CustomerList()\l}" style=filled, fillcolor=lightyellow];
|
||||
InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece) : boolean\l}" style=filled, fillcolor=lightyellow];
|
||||
TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}" style=filled, fillcolor=lightyellow];
|
||||
|
||||
node [shape=record, style=filled, fillcolor=lightblue];
|
||||
|
||||
// Abstract Classes
|
||||
InventoryPiece [label="{InventoryPiece\n«abstract»|+ id : String\l+ price : float\l+ created : ZonedDateTime\l+ title : String\l+ description : String\l+ Author : String\l|+ getType() : String\l+ computePrice() : float\l}", fillcolor=lightyellow];
|
||||
|
||||
// Concrete Classes - Inventory Items
|
||||
Drawing [label="{Drawing|+ style : String\l+ technique : String\l+ category : String\l|+ computePrice() : float\l}"];
|
||||
Painting [label="{Painting|- height : int\l- width : int\l- style : String\l- technique : String\l- category : String\l|+ computePrice() : float\l}"];
|
||||
Print [label="{Print|- openEditionType : String\l- category : String\l|+ computePrice() : float\l}"];
|
||||
Sculpture [label="{Sculpture|- material : String\l- weight : float\l|+ computePrice() : float\l}"];
|
||||
|
||||
// Customer and Address
|
||||
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(nameFirst, nameLast, phone, email)\l+ getId() : String\l+ getEmail() : String\l}"];
|
||||
Address [label="{Address|- street : String\l- city : String\l- state : String\l- zip : String\l|+ Address(street, city, state, zip)\l+ toString() : String\l+ equals(Object) : boolean\l+ hashCode() : int\l}"];
|
||||
|
||||
// Transaction
|
||||
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, cart)\l+ check() : void\l+ toString() : String\l}"];
|
||||
|
||||
// List Classes
|
||||
InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece) : boolean\l}"];
|
||||
CustomerList [label="{CustomerList|+ CustomerList()\l}"];
|
||||
TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}"];
|
||||
|
||||
// Manager Classes (Singletons)
|
||||
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="{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="{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="{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];
|
||||
|
||||
InventoryManager [label="{InventoryManager|+ INVENTORY : InventoryList\l- INSTANCE : InventoryManager\l|+ getInstance() : InventoryManager\l+ add(InventoryPiece) : void\l+ find(String) : InventoryPiece\l+ Remove(InventoryPiece) : InventoryPiece\l+ save() : void\l+ load() : void\l}"];
|
||||
CustomerManager [label="{CustomerManager|+ CUSTOMERS : CustomerList\l- INSTANCE : CustomerManager\l|+ getInstance() : CustomerManager\l+ add(Customer) : boolean\l+ findByEmail(String) : Customer\l+ save() : void\l+ load() : void\l}"];
|
||||
TransactionManager [label="{TransactionManager|+ TRANSACTIONS : TransactionList\l- INSTANCE : TransactionManager\l|+ getInstance() : TransactionManager\l+ TransactRequest(Customer, InventoryList) : Transaction\l+ complete(Transaction) : void\l+ compute(Transaction) : void\l+ save() : void\l+ load() : void\l}"];
|
||||
|
||||
// Repository
|
||||
DataRepository [label="{DataRepository|- INSTANCE : DataRepository\l|+ getInstance() : DataRepository\l+ generateRandomID(int) : String\l+ generateRandom10DigitID() : String\l+ write(InventoryManager) : void\l+ write(CustomerManager) : void\l+ write(TransactionManager) : void\l+ WalkFileSystemTree(...) : void\l}"];
|
||||
|
||||
// Exception Classes
|
||||
InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l+ InvalidArtOperationException(String, Throwable)\l+ InvalidArtOperationException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||
|
||||
InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l+ InvalidRecordDataException(String, Throwable)\l+ InvalidRecordDataException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||
|
||||
InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l+ InvalidTransactionException(String, Throwable)\l+ InvalidTransactionException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||
|
||||
InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l+ InvalidTransOperationException(String, Throwable)\l+ InvalidTransOperationException(Throwable)\l}" style=filled, fillcolor=pink];
|
||||
|
||||
// Inheritance relationships
|
||||
InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l}", fillcolor=lightcoral];
|
||||
InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l}", fillcolor=lightcoral];
|
||||
InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l}", fillcolor=lightcoral];
|
||||
InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l}", fillcolor=lightcoral];
|
||||
|
||||
// Inheritance Relationships
|
||||
Drawing -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||
Painting -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||
Print -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||
Sculpture -> InventoryPiece [arrowhead=empty, label="extends"];
|
||||
|
||||
CustomerList -> Customer [arrowhead=diamond, label="contains"];
|
||||
InventoryList -> InventoryPiece [arrowhead=diamond, label="contains"];
|
||||
TransactionList -> Transaction [arrowhead=diamond, label="contains"];
|
||||
|
||||
// Associations
|
||||
Customer -> Address [arrowhead=open, label="has"];
|
||||
Transaction -> Address [arrowhead=open, label="shipTo"];
|
||||
Transaction -> InventoryList [arrowhead=open, label="has"];
|
||||
Transaction -> Customer [arrowhead=open, style=dashed, label="references"];
|
||||
|
||||
// Manager relationships
|
||||
CustomerManager -> CustomerList [arrowhead=diamond];
|
||||
InventoryManager -> InventoryList [arrowhead=diamond];
|
||||
TransactionManager -> TransactionList [arrowhead=diamond];
|
||||
|
||||
// DataRepository relationships
|
||||
DataRepository -> CustomerManager [arrowhead=open, style=dashed, label="persists"];
|
||||
DataRepository -> InventoryManager [arrowhead=open, style=dashed, label="persists"];
|
||||
DataRepository -> TransactionManager [arrowhead=open, style=dashed, label="persists"];
|
||||
|
||||
// Exception usage
|
||||
CustomerManager -> InvalidRecordDataException [arrowhead=open, style=dashed, label="throws"];
|
||||
|
||||
// Legend
|
||||
subgraph cluster_legend {
|
||||
label="Legend";
|
||||
style=dashed;
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
InventoryList -> ArrayList [arrowhead=empty, label="extends", style=dashed];
|
||||
CustomerList -> ArrayList [arrowhead=empty, label="extends", style=dashed];
|
||||
TransactionList -> ArrayList [arrowhead=empty, label="extends", style=dashed];
|
||||
|
||||
InvalidArtOperationException -> RuntimeException [arrowhead=empty, label="extends", style=dashed];
|
||||
InvalidRecordDataException -> RuntimeException [arrowhead=empty, label="extends", style=dashed];
|
||||
InvalidTransactionException -> RuntimeException [arrowhead=empty, label="extends", style=dashed];
|
||||
InvalidTransOperationException -> RuntimeException [arrowhead=empty, label="extends", style=dashed];
|
||||
|
||||
// Composition/Aggregation Relationships
|
||||
Customer -> Address [arrowhead=diamond, label="mailing"];
|
||||
Transaction -> Address [arrowhead=diamond, label="shipToAddress"];
|
||||
Transaction -> InventoryList [arrowhead=diamond, label="customerInventoryList"];
|
||||
Transaction -> Customer [arrowhead=none, style=dashed, label="customerId"];
|
||||
|
||||
InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"];
|
||||
CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"];
|
||||
TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"];
|
||||
|
||||
InventoryList -> InventoryPiece [arrowhead=odiamond, label="contains"];
|
||||
CustomerList -> Customer [arrowhead=odiamond, label="contains"];
|
||||
TransactionList -> Transaction [arrowhead=odiamond, label="contains"];
|
||||
|
||||
// Dependencies
|
||||
InventoryManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
||||
CustomerManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
||||
TransactionManager -> DataRepository [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"];
|
||||
|
||||
TransactionManager -> Customer [arrowhead=vee, style=dashed, label="uses"];
|
||||
TransactionManager -> InventoryList [arrowhead=vee, style=dashed, label="uses"];
|
||||
|
||||
// External Classes (referenced but not defined)
|
||||
ArrayList [label="{ArrayList\n«Java Util»}", fillcolor=lightgray, style="filled,dashed"];
|
||||
RuntimeException [label="{RuntimeException\n«Java Lang»}", fillcolor=lightgray, style="filled,dashed"];
|
||||
}
|
||||
Reference in New Issue
Block a user