Files
inventorym/uml/classdiagram.dot
2025-10-29 13:14:10 -04:00

90 lines
8.4 KiB
Plaintext

digraph InventoryManagementSystem {
rankdir=TB;
node [shape=record, fontname=Arial, fontsize=10];
edge [fontname=Arial, fontsize=9];
// Abstract and Base Classes
InventoryPiece [label="{InventoryPiece\n(abstract)|+ id: String\n+ price: float\n+ created: ZonedDateTime\n+ title: String\n+ description: String\n+ Author: String\n- iventoryType: InventoryType|+ getId(): String\n+ setId(String): void\n+ getPrice(): float\n+ setPrice(float): void\n+ getCreated(): ZonedDateTime\n+ setCreated(ZonedDateTime): void\n+ getTitle(): String\n+ setTitle(String): void\n+ getDescription(): String\n+ setDescription(String): void\n+ getAuthor(): String\n+ setAuthor(String): void\n+ isArt(InventoryPiece): Boolean\n+ getType(): String}", style=filled, fillcolor=lightblue];
// Concrete Inventory Classes
Drawing [label="{Drawing|+ style: String\n+ technique: String\n+ category: String|+ Drawing()}", style=filled, fillcolor=lightgreen];
Painting [label="{Painting|+ height: int\n+ width: int\n+ style: String\n+ technique: String\n+ category: String|+ Painting()}", style=filled, fillcolor=lightgreen];
Print [label="{Print|+ openEditionType: String\n+ category: String|+ Print()\n+ Print(String, String)\n+ getOpenEditionType(): String\n+ setOpenEditionType(String): void\n+ getCategory(): String\n+ setCategory(String): void}", style=filled, fillcolor=lightgreen];
Sculpture [label="{Sculpture|+ material: String\n+ weight: float|+ Sculpture()}", style=filled, fillcolor=lightgreen];
// Enums
InventoryType [label="{\\<\\<enumeration\\>\\>\nInventoryType|PAINTING\nDRAWING\nPRINT\nSCULPTURE}", style=filled, fillcolor=lightyellow];
TransactionOperationEnum [label="{\\<\\<enumeration\\>\\>\nTransactionOperationEnum|Completed\nDraft\nPricing\nRemoved\nShipping}", style=filled, fillcolor=lightyellow];
// Customer Related Classes
Customer [label="{Customer|# id: String\n# updated: ZonedDateTime\n- phone: String\n- mailing: Address\n- email: String\n- nameFirst: String\n- nameLast: String|+ Customer()\n+ Customer(String, String, String, String)\n+ getEmail(): String\n+ getId(): String\n+ setId(String): void\n+ getPhone(): String\n+ setPhone(String): void\n+ getMailing(): Address\n+ setMailing(Address): void\n+ setEmail(String): void\n+ getNameFirst(): String\n+ setNameFirst(String): void\n+ getNameLast(): String\n+ setNameLast(String): void}", style=filled, fillcolor=lightcyan];
Address [label="{Address|- street: String\n- city: String\n- state: String\n- zip: String|+ Address()\n+ Address(String, String, String, String)\n+ getStreet(): String\n+ setStreet(String): void\n+ getCity(): String\n+ setCity(String): void\n+ getState(): String\n+ setState(String): void\n+ getZip(): String\n+ setZip(String): void\n+ hashCode(): int\n+ equals(Object): boolean\n+ toString(): String}", style=filled, fillcolor=white];
// Transaction
Transaction [label="{Transaction|- id: String\n- created: ZonedDateTime\n- completed: ZonedDateTime\n- customerId: String\n- shipToAddress: Address\n- customerInventoryList: InventoryList\n- attributes: JsonArray|+ Transaction()\n+ getId(): String\n+ setId(String): void\n+ getCreated(): ZonedDateTime\n+ setCreated(ZonedDateTime): void\n+ getCompleted(): ZonedDateTime\n+ setCompleted(ZonedDateTime): void}", style=filled, fillcolor=lightcyan];
// List Classes (Collections)
InventoryList [label="{InventoryList|\\<extends ArrayList\\<InventoryPiece\\>\\>|+ InventoryList()}", style=filled, fillcolor=wheat];
CustomerList [label="{CustomerList|\\<extends ArrayList\\<Customer\\>\\>|+ CustomerList()}", style=filled, fillcolor=wheat];
TransactionList [label="{TransactionList|\\<extends ArrayList\\<Transaction\\>\\>|+ TransactionList()\n+ add(Transaction): boolean}", style=filled, fillcolor=wheat];
// Manager Classes (Singletons)
InventoryManager [label="{InventoryManager|+ INVENTORY: InventoryList\n- INSTANCE: InventoryManager|+ getInstance(): InventoryManager\n+ getArtPieceTypes(): Set\\<InventoryType\\>\n+ add(InventoryPiece): void\n+ find(String): InventoryPiece\n+ update(InventoryPiece): InventoryPiece\n+ save(): void\n+ loadAll(): void\n+ Remove(InventoryPiece): void}", style=filled, fillcolor=lightpink];
CustomerManager [label="{CustomerManager|+ CUSTOMERS: CustomerList\n- INSTANCE: CustomerManager|+ getInstance(): CustomerManager\n+ add(Customer): boolean\n- check(Customer): void\n+ findById(String): Customer\n+ findByEmail(String): Customer}", style=filled, fillcolor=lightpink];
TransactionManager [label="{TransactionManager|+ TRANSACTIONS: TransactionList\n- INSTANCE: TransactionManager|+ getInstance(): TransactionManager\n+ TransactRequest(Customer, InventoryList, Transaction): Transaction\n+ compute(Transaction, TransactionOperationEnum): void\n+ compute(Transaction): void\n+ complete(Transaction): void\n+ findByCustomerEmail(String): TransactionList\n+ findByTransactionId(String): TransactionList\n+ findByTransactionDate(ZonedDateTime): TransactionList\n+ remove(Transaction): void\n+ save(): void}", style=filled, fillcolor=lightpink];
// Repository
DataRepository [label="{DataRepository|+ INSTANCE: DataRepository|+ getInstance(): DataRepository\n+ generateRandomID(int): String\n+ generateRandom10DigitID(): String\n+ WalkFileSystemTree(InventoryManager): void\n+ WalkFileSystemTree(CustomerManager): void\n+ WalkFileSystemTree(TransactionManager): void\n- serialize_deserialize(): void\n+ mapJsonToObjectList(String, Class\\<T\\>): List\\<T\\>}", style=filled, fillcolor=orange];
// Exception Classes
InvalidArtOperationException [label="{InvalidArtOperationException|\\<extends RuntimeException\\>|+ InvalidArtOperationException(String)\n+ InvalidArtOperationException(String, Throwable)\n+ InvalidArtOperationException(Throwable)}", style=filled, fillcolor=tomato];
InvalidRecordDataException [label="{InvalidRecordDataException|\\<extends RuntimeException\\>|+ InvalidRecordDataException(String)\n+ InvalidRecordDataException(String, Throwable)\n+ InvalidRecordDataException(Throwable)}", style=filled, fillcolor=tomato];
InvalidTransactionException [label="{InvalidTransactionException|\\<extends RuntimeException\\>|+ InvalidTransactionException(String)\n+ InvalidTransactionException(String, Throwable)\n+ InvalidTransactionException(Throwable)}", style=filled, fillcolor=tomato];
InvalidTransOperationException [label="{InvalidTransOperationException|\\<extends RuntimeException\\>|+ InvalidTransOperationException(String)\n+ InvalidTransOperationException(String, Throwable)\n+ InvalidTransOperationException(Throwable)}", style=filled, fillcolor=tomato];
// 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"];
// Associations
InventoryPiece -> InventoryType [arrowhead=open, style=dashed, label="uses"];
Customer -> Address [arrowhead=diamond, label="has"];
Transaction -> Address [arrowhead=open, label="shipToAddress"];
Transaction -> InventoryList [arrowhead=open, label="customerInventoryList"];
// Manager to List relationships
InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"];
CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"];
TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"];
// List contains relationships
InventoryList -> InventoryPiece [arrowhead=diamond, style=dashed, label="contains"];
CustomerList -> Customer [arrowhead=diamond, style=dashed, label="contains"];
TransactionList -> Transaction [arrowhead=diamond, style=dashed, label="contains"];
// Manager relationships
DataRepository -> InventoryManager [arrowhead=open, style=dashed, label="uses"];
DataRepository -> CustomerManager [arrowhead=open, style=dashed, label="uses"];
DataRepository -> TransactionManager [arrowhead=open, style=dashed, label="uses"];
TransactionManager -> TransactionOperationEnum [arrowhead=open, style=dashed, label="uses"];
CustomerManager -> InvalidRecordDataException [arrowhead=open, style=dashed, label="throws"];
// Transaction relationships
TransactionManager -> Customer [arrowhead=open, style=dashed, label="uses"];
TransactionManager -> InventoryList [arrowhead=open, style=dashed, label="uses"];
}