84 lines
8.4 KiB
Plaintext
84 lines
8.4 KiB
Plaintext
digraph InventorySystem {
|
|
// Graph settings
|
|
rankdir=TB;
|
|
node [shape=record, fontname="Arial", fontsize=10];
|
|
edge [fontname="Arial", fontsize=9];
|
|
|
|
// Abstract Class
|
|
InventoryPiece [label="{InventoryPiece\n«abstract»|+ id : String\l+ price : float\l+ created : ZonedDateTime\l+ title : String\l+ description : String\l+ Author : String\l- iventoryType : InventoryType\l|+ InventoryPiece(InventoryType)\l+ InventoryPiece()\l+ isArt(InventoryPiece) : Boolean\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}", style=filled, fillcolor=lightyellow];
|
|
|
|
// Concrete Classes extending InventoryPiece
|
|
Drawing [label="{Drawing|+ style : String\l+ technique : String\l+ category : String\l|+ Drawing()\l}"];
|
|
Painting [label="{Painting|- height : int\l- width : int\l- style : String\l- technique : String\l- category : String\l|+ Painting()\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}"];
|
|
Sculpture [label="{Sculpture|- material : String\l- weight : float\l|+ Sculpture()\l}"];
|
|
|
|
// Enums
|
|
InventoryType [label="{«enumeration»\nInventoryType|PAINTING\lDRAWING\lPRINT\lSCULPTURE\l}", style=filled, fillcolor=lightblue];
|
|
TransactionOperationEnum [label="{«enumeration»\nTransactionOperationEnum|Completed\lDraft\lPricing\lRemoved\lShipping\l}", style=filled, fillcolor=lightblue];
|
|
|
|
// Value Objects
|
|
Address [label="{Address|- street : String\l- city : String\l- state : String\l- zip : String\l|+ Address()\l+ Address(String, String, String, 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}"];
|
|
|
|
// Domain Classes
|
|
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+ Customer()\l+ getEmail() : String\l+ getId() : String\l+ setId(String) : void\l+ getPhone() : String\l+ setPhone(String) : void\l+ getMailing() : Address\l+ setMailing(Address) : void\l+ setEmail(String) : void\l+ getNameFirst() : String\l+ setNameFirst(String) : void\l+ getNameLast() : String\l+ setNameLast(String) : void\l}"];
|
|
|
|
Transaction [label="{Transaction|- id : String\l- created : ZonedDateTime\l- completed : ZonedDateTime\l- customerId : String\l- shipToAddress : Address\l- customerInventoryList : InventoryList\l- attributes : JsonArray\l|+ Transaction()\l+ getId() : String\l+ setId(String) : void\l+ getCreated() : ZonedDateTime\l+ setCreated(ZonedDateTime) : void\l+ getCompleted() : ZonedDateTime\l+ setCompleted(ZonedDateTime) : void\l}"];
|
|
|
|
// Collection Classes
|
|
InventoryList [label="{InventoryList|+ InventoryList()\l}", style=filled, fillcolor=lightgreen];
|
|
CustomerList [label="{CustomerList|+ CustomerList()\l}", style=filled, fillcolor=lightgreen];
|
|
TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}", style=filled, fillcolor=lightgreen];
|
|
|
|
// Manager Classes (Singletons)
|
|
InventoryManager [label="{«singleton»\nInventoryManager|- INSTANCE : InventoryManager\l+ INVENTORY : InventoryList\l|- InventoryManager()\l+ getInstance() : InventoryManager\l+ getArtPieceTypes() : Set\<InventoryType\>\l+ add(InventoryPiece) : void\l+ find(String) : InventoryPiece\l+ update(InventoryPiece) : InventoryPiece\l+ save() : void\l+ loadAll() : void\l+ Remove(InventoryPiece) : void\l}", style=filled, fillcolor=lightcoral];
|
|
|
|
CustomerManager [label="{«singleton»\nCustomerManager|- 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}", style=filled, fillcolor=lightcoral];
|
|
|
|
TransactionManager [label="{«singleton»\nTransactionManager|- INSTANCE : TransactionManager\l+ TRANSACTIONS : TransactionList\l|+ getInstance() : TransactionManager\l+ TransactRequest(Customer, InventoryList, Transaction) : Transaction\l+ compute(Transaction, TransactionOperationEnum) : void\l+ compute(Transaction) : void\l+ complete(Transaction) : void\l+ findByCustomerEmail(String) : TransactionList\l+ findByTransactionId(String) : TransactionList\l+ findByTransactionDate(ZonedDateTime) : TransactionList\l+ remove(Transaction) : void\l+ save() : void\l}", style=filled, fillcolor=lightcoral];
|
|
|
|
// Utility Class
|
|
DataRepository [label="{«singleton»\nDataRepository|- 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\<T\>) : List\<T\>\l}", style=filled, fillcolor=lavender];
|
|
|
|
// 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
|
|
InventoryPiece -> Drawing [dir=back, arrowtail=empty, label="extends"];
|
|
InventoryPiece -> Painting [dir=back, arrowtail=empty, label="extends"];
|
|
InventoryPiece -> Print [dir=back, arrowtail=empty, label="extends"];
|
|
InventoryPiece -> Sculpture [dir=back, arrowtail=empty, label="extends"];
|
|
|
|
// Collection inheritance
|
|
InventoryList -> InventoryPiece [arrowhead=diamond, label="contains *"];
|
|
CustomerList -> Customer [arrowhead=diamond, label="contains *"];
|
|
TransactionList -> Transaction [arrowhead=diamond, label="contains *"];
|
|
|
|
// Composition relationships
|
|
Customer -> Address [arrowhead=diamond, label="mailing"];
|
|
Transaction -> Address [arrowhead=diamond, label="shipToAddress"];
|
|
Transaction -> InventoryList [arrowhead=diamond, label="customerInventoryList"];
|
|
|
|
// Manager aggregations
|
|
InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"];
|
|
CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"];
|
|
TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"];
|
|
|
|
// Dependencies
|
|
InventoryPiece -> InventoryType [style=dashed, arrowhead=open, label="uses"];
|
|
CustomerManager -> InvalidRecordDataException [style=dashed, arrowhead=open, label="throws"];
|
|
TransactionManager -> TransactionOperationEnum [style=dashed, arrowhead=open, label="uses"];
|
|
InventoryManager -> DataRepository [style=dashed, arrowhead=open, label="uses"];
|
|
CustomerManager -> DataRepository [style=dashed, arrowhead=open, label="uses"];
|
|
TransactionManager -> DataRepository [style=dashed, arrowhead=open, label="uses"];
|
|
InventoryPiece -> DataRepository [style=dashed, arrowhead=open, label="uses"];
|
|
TransactionManager -> Customer [style=dashed, arrowhead=open, label="uses"];
|
|
TransactionManager -> InventoryList [style=dashed, arrowhead=open, label="uses"];
|
|
DataRepository -> InventoryPiece [style=dashed, arrowhead=open, label="serializes"];
|
|
} |