updated to complete

This commit is contained in:
2025-10-28 11:43:15 -04:00
parent 1ee497dd99
commit 88b520d756
60 changed files with 1454 additions and 732 deletions

View File

@@ -1,4 +1,5 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.debug.settings.onBuildFailureProceed": true
"java.debug.settings.onBuildFailureProceed": true,
"java.dependency.packagePresentation": "hierarchical"
}

View File

@@ -12,7 +12,7 @@ plugins {
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(24)
languageVersion = JavaLanguageVersion.of(25)
}
}
@@ -27,15 +27,7 @@ repositories {
}
dependencies {
implementation 'io.helidon:helidon:4.3.1'
implementation 'io.helidon.common:helidon-common:4.3.1'
implementation 'io.helidon.media:helidon-media-jsonb:3.2.12'
implementation 'io.helidon.media.jsonb:helidon-media-jsonb-common:1.4.16'
implementation 'io.helidon.media.jsonb:helidon-media-jsonb-server:1.4.16'
implementation 'jakarta.json.bind:jakarta.json.bind-api:3.0.1'
implementation 'io.helidon.webserver:helidon-webserver:4.3.1'
implementation 'jakarta.json.bind:jakarta.json.bind-api:3.0.1'
implementation project(':Model')
}

View File

@@ -1,37 +1,140 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym;
public class Api {
import java.time.ZonedDateTime;
public static void main(String[] args) {
}
import edu.inventorym.model.Customer;
import edu.inventorym.model.CustomerManager;
import edu.inventorym.model.Drawing;
import edu.inventorym.model.InventoryList;
import edu.inventorym.model.InventoryManager;
import edu.inventorym.model.InventoryPiece;
import edu.inventorym.model.Painting;
import edu.inventorym.model.Print;
import edu.inventorym.model.Sculpture;
import edu.inventorym.model.Transaction;
import edu.inventorym.model.TransactionList;
import edu.inventorym.model.TransactionManager;
public interface Api {
void callerInterface(){
//@Comment
/*
1. Add new art object to the inventory. Your manager must check that the art is not already in the inventory before adding
2. Remove art object from the inventory
3. Return a list of all art objects from inventory
public static void main(String[] args) {
3. Add a new transaction object to the list manager is handling
4. Calculate and return transaction price
5. Complete transaction
6. Remove transaction object
callerInterface();
7. Format and return transaction data in print format
8. Retrieve and return transactions based on:
• customer email
• transaction date
• transaction id
• art id
9. Update inventory file(s) on local system
}
10. Update transaction file(s) on local system
11. Any other functionality needed to support the above requirements
*/
}
static void callerInterface() {
// @Comment
/*
* 1. Add new art object to the inventory. Your manager must check that the art
* is not already in the inventory before adding
*/
InventoryManager.getInstance().getArtPieceTypes().forEach(System.out::println);
/* Add Inventory */
InventoryManager.getInstance().add(make(new Drawing()));
InventoryManager.getInstance().add(make(new Print()));
InventoryManager.getInstance().add(make(new Painting()));
InventoryManager.getInstance().add(make(new Sculpture()));
InventoryManager.getInstance().add(make(new Sculpture()));
InventoryManager.getInstance().add(make(new Sculpture()));
/*
* 2. Remove art object from the inventory
*/
InventoryManager imgr = InventoryManager.getInstance();
InventoryPiece art = imgr.find("####");
imgr.Remove(art);
/*
* 3. Return a list of all art objects from inventory
*/
CustomerManager cmgr = CustomerManager.getInstance();
Customer customer = cmgr.findByEmail("kate@it.com");
InventoryList customerCart = new InventoryList();
TransactionManager tmgr = TransactionManager.getInstance();
/*
* 3. Add a new transaction object to the list manager is handling
*/
Transaction tran = tmgr.TransactRequest(customer, customerCart, new Transaction());
/*
* 4. Calculate and return transaction price
* 5. Complete transaction
* 6. Remove transaction object
*/
tmgr.compute(tran);
tmgr.complete(tran);
tmgr.remove(tran);
/*
* 7. Format and return transaction data in print format
*/
System.out.println( tran );
/*
* 8. Retrieve and return transactions based on:
* customer email
*/
TransactionList foundTrans = tmgr.findByCustomerEmail(customer.getEmail());
/*
* transaction date
*/
foundTrans = tmgr.findByTransactionDate(tran.getCompleted());
/*
* transaction id
*/
foundTrans = tmgr.findByTransactionId(tran.getId());
/*
* art id
*/
foundTrans = tmgr.findByTransactionId(tran.getId());
/*
* 9. Update inventory file(s) on local system
*/
InventoryManager.getInstance().save();
/*
* 10. Update transaction file(s) on local system
*/
TransactionManager.getInstance().save();
}
static Drawing make(Drawing o) {
o.setTitle("Windy Rowing");
o.setDescription("East Market Square find. Local Author.");
o.setAuthor("Dave Janson");
o.setCreated(ZonedDateTime.now());
return o;
}
static Painting make(Painting o) {
o.setTitle("Windy Rowing");
o.setDescription("East Market Square find. Local Author.");
o.setAuthor("Dave Janson");
o.setCreated(ZonedDateTime.now());
return o;
}
static Print make(Print o) {
o.setTitle("Windy Rowing");
o.setDescription("East Market Square find. Local Author.");
o.setAuthor("Dave Janson");
o.setCreated(ZonedDateTime.now());
return o;
}
static Sculpture make(Sculpture o) {
o.setTitle("Windy Rowing");
o.setDescription("East Market Square find. Local Author.");
o.setAuthor("Dave Janson");
o.setCreated(ZonedDateTime.now());
return o;
}
}

View File

@@ -1,13 +0,0 @@
package edu.inventorym.model;
public class Customer {
String nameFirst;
String nameLast;
String mailing;
String phone;
String email;
public Customer(){}
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public class CustomerList {
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public class CustomerManager {
}

View File

@@ -1,12 +0,0 @@
package edu.inventorym.model;
public class Drawing extends InventoryPiece {
public String style;
public String technique;
public String category;
public Drawing() {
super(InventoryType.DRAWING);
}
}

View File

@@ -1,17 +0,0 @@
package edu.inventorym.model;
public class InvalidTransOperationException extends RuntimeException {
public InvalidTransOperationException(String message) {
super(message);
}
public InvalidTransOperationException(String message, Throwable cause) {
super(message, cause);
}
public InvalidTransOperationException(Throwable cause) {
super(cause);
}
}

View File

@@ -1,25 +0,0 @@
package edu.inventorym.model;
import java.util.EnumSet;
import java.util.Set;
public class InventoryManager {
final static InventoryManager INSTANCE = new InventoryManager();
public static InventoryManager getInstance() {
return INSTANCE;
}
public InventoryList INVENTORY = new InventoryList();
public CustomerList CUSTOMERS = new CustomerList();
public TransactionList TRANSACTIONS = new TransactionList();
private InventoryManager() {
}
public Set<InventoryType> getArtPieceTypes(){
return EnumSet.allOf(InventoryType.class);
}
}

View File

@@ -1,14 +0,0 @@
package edu.inventorym.model;
public class Painting extends InventoryPiece {
int height;
int width;
String style;
String technique;
String category;
public Painting (){
super(InventoryType.PAINTING);
}
}

View File

@@ -1,11 +0,0 @@
package edu.inventorym.model;
public class Print extends InventoryPiece {
String openEditionType;
String category;
public Print(){
super(InventoryType.PRINT);
}
}

View File

@@ -1,12 +0,0 @@
package edu.inventorym.model;
public class Sculpture extends InventoryPiece {
String material;
float weight;
public Sculpture (){
super(InventoryType.SCULPTURE);
}
}

View File

@@ -1,8 +0,0 @@
package edu.inventorym.model;
import java.time.ZonedDateTime;
public class Transaction {
ZonedDateTime created = ZonedDateTime.now();
ZonedDateTime completed = null;
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public class TransactionList {
}

View File

@@ -1,14 +0,0 @@
package edu.inventorym.model;
import java.security.SecureRandom;
import java.util.Base64;
public class TransactionManager {
final public static String generateTransactionRandomID(int byteLength) {
SecureRandom secureRandom = new SecureRandom();
byte[] bytes = new byte[byteLength];
secureRandom.nextBytes(bytes);
return Base64.getUrlEncoder().withoutPadding().encodeToString(bytes);
}
}

View File

@@ -1,79 +0,0 @@
digraph ClassDiagram {
// Graph attributes
graph [
rankdir="BT",
splines=ortho,
fontname="Arial"
];
node [
fontname="Arial",
fontsize=10,
shape=record,
style=filled,
fillcolor=lightyellow
];
edge [
fontname="Arial",
fontsize=9
];
// --- Clusters for Packages ---
subgraph cluster_edu_inventorym {
label="edu.inventorym";
style=filled;
color=lightgrey;
node [style=filled, color=white];
Api [
label="{class Api|+ main(String[]): void\l+ callerInterface(): void\l}"
];
App [
label="{class App|+ main(String[]): void\l- routing(HttpRouting.Builder): void\l}"
];
RpcDeserializer [
label="{class RpcDeserializer|+ main(String[]): void\l+ mapJsonToObjectList(String, Class<T>): List<T>\l}"
];
}
subgraph cluster_edu_inventorym_model {
label="edu.inventorym.model";
style=filled;
color=lightgrey;
node [style=filled, color=white];
InventoryPiece [
// Inferred from RpcDeserializer.java
label="{interface\n«InventoryPiece»|+ getId(): int\l}"
];
Drawing [
// Inferred from RpcDeserializer.java
label="{class Drawing|+ getId(): int\l}"
];
}
// --- Relationships ---
// Inheritance (Drawing implements InventoryPiece)
InventoryPiece -> Drawing [
arrowhead=empty,
style=dashed,
label="implements"
];
// Associations (Dependencies)
RpcDeserializer -> Drawing [
arrowhead=vee,
style=dashed,
label="uses"
];
RpcDeserializer -> InventoryPiece [
arrowhead=vee,
style=dashed,
label="uses"
];
}

View File

@@ -1,3 +0,0 @@
{
"java.dependency.packagePresentation": "hierarchical"
}

View File

@@ -1,41 +0,0 @@
/*
* This file was generated by the Gradle 'init' task.
*
*/
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'java'
id 'application'
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(24)
}
}
application {
// Define the main class for the application.
mainClass = 'edu.inventorym.RpcDeserializer'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
implementation 'io.helidon:helidon:4.3.1'
implementation 'io.helidon.common:helidon-common:4.3.1'
implementation 'io.helidon.media:helidon-media-jsonb:3.2.12'
implementation 'io.helidon.media.jsonb:helidon-media-jsonb-common:1.4.16'
implementation 'io.helidon.media.jsonb:helidon-media-jsonb-server:1.4.16'
implementation 'jakarta.json.bind:jakarta.json.bind-api:3.0.1'
implementation 'io.helidon.webserver:helidon-webserver:4.3.1'
}

94
App/gradlew.bat vendored
View File

@@ -1,94 +0,0 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -1,30 +0,0 @@
/*
* This source file was generated by the Gradle 'init' task
*/
package edu.inventorym;
import io.helidon.http.Status;
import io.helidon.webserver.WebServer;
import io.helidon.webserver.http.HttpRouting;
public class App{
public static void main(String[] args) {
WebServer.builder()
.routing(App::routing)
.build()
.start();
}
private static void routing(HttpRouting.Builder rules) {
rules.get("/hello", (req, res) -> res.send("Hello, World!"))
.get("/greet/{name}", (req, res) -> {
String name = req.path().pathParameters().get("name");
res.send("Hello, " + name + "!");
})
.post("/data", (req, res) -> {
String body = req.content().as(String.class);
res.send("Received: " + body);
});
}
}

View File

@@ -1,83 +0,0 @@
package edu.inventorym;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import edu.inventorym.model.Drawing;
import edu.inventorym.model.InventoryPiece;
import jakarta.json.JsonArray;
import jakarta.json.Json;
import jakarta.json.bind.Jsonb;
import jakarta.json.bind.JsonbBuilder;
import jakarta.json.bind.JsonbConfig;
public class RpcDeserializer {
public static void main(String[] args) {
String jsonResponse = "{\"jsonrpc\":\"2.0\",\"result\":19,\"id\":1}";
try{
// Deserialize the JSON string to a Java RpcResponse object
Jsonb jsonb = JsonbBuilder.create();
jsonResponse = jsonb.toJson(new Drawing());
System.out.println("json string: " + jsonResponse);
InventoryPiece response = jsonb.fromJson(jsonResponse, Drawing.class);
System.out.println("Result: " + response);
System.out.println("ID: " + response.getId());
}catch(Exception e){
e.printStackTrace();
}
List<Drawing> rpcs = new ArrayList<Drawing>();
try{
// Configure pretty-printing and other settings
JsonbConfig config = new JsonbConfig()
.withFormatting(true); // Enable pretty-printing
Jsonb jsonb = JsonbBuilder.create(config);
// Serialize using the custom configuration
String prettyJsonString = jsonb.toJson(new Drawing());
System.out.println("json string: " + prettyJsonString);
rpcs.add(new Drawing());
}catch(Exception e){
}
try {
// Create Jsonb and serialize
Jsonb jsonb = JsonbBuilder.create();
String result = jsonb.toJson(rpcs);
// Deserialize back
rpcs = jsonb.fromJson(result, new ArrayList<Drawing>() {
}.getClass().getGenericSuperclass());
} catch (Exception e) {
}
}
public static <T> List<T> mapJsonToObjectList(String body, Class<T> baseClass) {
try (var reader = Json.createReader(new StringReader(body));
Jsonb jsonb = JsonbBuilder.create()){
JsonArray jsonArray = reader.readArray();
return jsonArray.stream()
.map(jsonValue -> jsonb.fromJson(jsonValue.toString(), baseClass))
.toList();
} catch (Exception e) {
return (List<T>) new ArrayList<Drawing>();
}
}
}

View File

@@ -1,13 +0,0 @@
package edu.inventorym.model;
public class Customer {
String nameFirst;
String nameLast;
String mailing;
String phone;
String email;
public Customer(){}
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public class CustomerList {
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public class CustomerManager {
}

View File

@@ -1,15 +0,0 @@
package edu.inventorym.model;
public class InvalidArtOperationException extends RuntimeException {
public InvalidArtOperationException(String message) {
super(message);
}
public InvalidArtOperationException(String message, Throwable cause) {
super(message, cause);
}
public InvalidArtOperationException(Throwable cause) {
super(cause);
}
}

View File

@@ -1,17 +0,0 @@
package edu.inventorym.model;
public class InvalidTransactionException extends RuntimeException {
public InvalidTransactionException(String message) {
super(message);
}
public InvalidTransactionException(String message, Throwable cause) {
super(message, cause);
}
public InvalidTransactionException(Throwable cause) {
super(cause);
}
}

View File

@@ -1,9 +0,0 @@
package edu.inventorym.model;
import java.util.ArrayList;
public class InventoryList extends ArrayList<InventoryPiece> {
public InventoryList() {
super();
}
}

View File

@@ -1,25 +0,0 @@
package edu.inventorym.model;
import java.util.EnumSet;
import java.util.Set;
public class InventoryManager {
final static InventoryManager INSTANCE = new InventoryManager();
public static InventoryManager getInstance() {
return INSTANCE;
}
public InventoryList INVENTORY = new InventoryList();
public CustomerList CUSTOMERS = new CustomerList();
public TransactionList TRANSACTIONS = new TransactionList();
private InventoryManager() {
}
public Set<InventoryType> getArtPieceTypes(){
return EnumSet.allOf(InventoryType.class);
}
}

View File

@@ -1,84 +0,0 @@
package edu.inventorym.model;
import java.time.ZonedDateTime;
public abstract class InventoryPiece {
public String Id;
public float price;
public ZonedDateTime created;
public String title;
/**
* max 500 characters
*/
public String description;
public String Author;
InventoryType iventoryType;
public InventoryPiece(InventoryType iventoryType) {
this.iventoryType = iventoryType;
this.created = ZonedDateTime.now();
this.Id = TransactionManager.generateTransactionRandomID(10);
}
public InventoryPiece() {
}
public Boolean isArt(InventoryPiece piece) {
return false;
}
public String getType() {
return this.iventoryType.toString();
};
public String getId() {
return Id;
}
public void setId(String id) {
Id = id;
}
public float getPrice() {
return price;
}
public void setPrice(float price) {
this.price = price;
}
public ZonedDateTime getCreated() {
return created;
}
public void setCreated(ZonedDateTime created) {
this.created = created;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getAuthor() {
return Author;
}
public void setAuthor(String author) {
Author = author;
}
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public enum InventoryType {
PAINTING, DRAWING, PRINT, SCULPTURE
}

View File

@@ -1,11 +0,0 @@
package edu.inventorym.model;
public class Print extends InventoryPiece {
String openEditionType;
String category;
public Print(){
super(InventoryType.PRINT);
}
}

View File

@@ -1,8 +0,0 @@
package edu.inventorym.model;
import java.time.ZonedDateTime;
public class Transaction {
ZonedDateTime created = ZonedDateTime.now();
ZonedDateTime completed = null;
}

View File

@@ -1,5 +0,0 @@
package edu.inventorym.model;
public class TransactionList {
}

View File

@@ -1,14 +0,0 @@
package edu.inventorym.model;
import java.security.SecureRandom;
import java.util.Base64;
public class TransactionManager {
final public static String generateTransactionRandomID(int byteLength) {
SecureRandom secureRandom = new SecureRandom();
byte[] bytes = new byte[byteLength];
secureRandom.nextBytes(bytes);
return Base64.getUrlEncoder().withoutPadding().encodeToString(bytes);
}
}

39
Model/build.gradle Normal file
View File

@@ -0,0 +1,39 @@
/*
* This file was generated by the Gradle 'init' task.
*
*/
plugins {
id 'java-library'
id 'application'
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
group = 'edu.inventorym'
version = '1.0.0'
application {
// Define the main class for the application.
mainClass = 'edu.inventorym.TransactionManager'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
implementation 'jakarta.json.bind:jakarta.json.bind-api:3.0.1'
implementation 'org.eclipse:yasson:3.0.4'
}

View File

@@ -0,0 +1,114 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public final class Address{
String street;
String city;
String state;
String zip;
/** not used
*
*/
public Address() {
}
public Address(String street, String city, String state, String zip) {
this.street = street;
this.city = city;
this.state = state;
this.zip = zip;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((street == null) ? 0 : street.hashCode());
result = prime * result + ((city == null) ? 0 : city.hashCode());
result = prime * result + ((state == null) ? 0 : state.hashCode());
result = prime * result + ((zip == null) ? 0 : zip.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Address other = (Address) obj;
if (street == null) {
if (other.street != null)
return false;
} else if (!street.equals(other.street))
return false;
if (city == null) {
if (other.city != null)
return false;
} else if (!city.equals(other.city))
return false;
if (state == null) {
if (other.state != null)
return false;
} else if (!state.equals(other.state))
return false;
if (zip == null) {
if (other.zip != null)
return false;
} else if (!zip.equals(other.zip))
return false;
return true;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{ \"Address\":{");
sb.append("\"street\": \"" + street + "\",");
sb.append("\"city\": \"" + city + "\",");
sb.append("\"state\": \"" + state + "\",");
sb.append("\"zip\": \"" + zip + "\"");
sb.append("}}");
return sb.toString();
}
}

View File

@@ -0,0 +1,82 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.time.ZonedDateTime;
public class Customer {
protected String id;
protected ZonedDateTime updated;
String phone;
Address mailing;
String email;
String nameFirst;
String nameLast;
public Customer(String nameFirst, String nameLast, String phone, String email) {
this.nameFirst = nameFirst;
this.nameLast = nameLast;
this.phone = phone;
this.email = email;
this.updated = ZonedDateTime.now();
}
public Customer(){}
public String getEmail() {
return email;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
this.updated = ZonedDateTime.now();
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
this.updated = ZonedDateTime.now();
}
public Address getMailing() {
return mailing;
}
public void setMailing(Address mailing) {
this.mailing = mailing;
this.updated = ZonedDateTime.now();
}
public void setEmail(String email) {
this.email = email;
this.updated = ZonedDateTime.now();
}
public String getNameFirst() {
return nameFirst;
}
public void setNameFirst(String nameFirst) {
this.nameFirst = nameFirst;
this.updated = ZonedDateTime.now();
}
public String getNameLast() {
return nameLast;
}
public void setNameLast(String nameLast) {
this.nameLast = nameLast;
this.updated = ZonedDateTime.now();
}
}

View File

@@ -0,0 +1,14 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.util.ArrayList;
public class CustomerList extends ArrayList<Customer> {
public CustomerList() {
super();
}
}

View File

@@ -0,0 +1,33 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class CustomerManager {
final static CustomerManager INSTANCE = new CustomerManager();
public static CustomerManager getInstance() {
return INSTANCE;
}
public CustomerList CUSTOMERS = new CustomerList();
public boolean add(Customer c) throws InvalidRecordDataException{
check(c);
return CUSTOMERS.add(c);
}
void check(Customer c) throws InvalidRecordDataException{
}
public Customer findById(String id){
return null;
}
public Customer findByEmail(String email){
return null;
}
}

View File

@@ -0,0 +1,134 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import jakarta.json.Json;
import jakarta.json.JsonArray;
import jakarta.json.bind.Jsonb;
import jakarta.json.bind.JsonbBuilder;
import jakarta.json.bind.JsonbConfig;
public class DataRepository {
final static DataRepository INSTANCE = new DataRepository();
public static DataRepository getInstance() {
return INSTANCE;
}
final public static String generateRandomID(int byteLength) {
SecureRandom secureRandom = new SecureRandom();
byte[] bytes = new byte[byteLength];
secureRandom.nextBytes(bytes);
return Base64.getUrlEncoder().withoutPadding().encodeToString(bytes);
}
final public static String generateRandom10DigitID() {
int count = 32;
SecureRandom rnd = new SecureRandom();
BigInteger randomCountLength = BigInteger.valueOf(1000009000L);
BigInteger val1 = new BigInteger(count, rnd);
BigInteger val2 = randomCountLength.add(val1);
return String.format("%010d", val2);
}
public static void WalkFileSystemTree(final InventoryManager manager) throws IOException {
}
public static void WalkFileSystemTree(final CustomerManager manager) throws IOException {
}
public static void WalkFileSystemTree(final TransactionManager manager) throws IOException {
}
static void serialize_deserialize(){
String jsonResponse = "";
try{
// Deserialize the JSON string to a Java RpcResponse object
Jsonb jsonb = JsonbBuilder.create();
jsonResponse = jsonb.toJson((InventoryPiece)new Drawing());
System.out.println("json string: " + jsonResponse);
InventoryPiece response = jsonb.fromJson(jsonResponse, Drawing.class);
System.out.println("Result: " + response);
System.out.println("ID: " + response.getId());
}catch(Exception e){
e.printStackTrace();
}
try{
// Configure pretty-printing and other settings
JsonbConfig config = new JsonbConfig()
.withFormatting(true); // Enable pretty-printing
Jsonb jsonb = JsonbBuilder.create(config);
// Serialize using the custom configuration
String prettyJsonString = jsonb.toJson(new Drawing());
System.out.println("json string: " + prettyJsonString);
}catch(Exception e){
e.printStackTrace();
}
try {
List<Drawing> rpcs = new ArrayList<Drawing>();
rpcs.add(new Drawing());
rpcs.add(new Drawing());
rpcs.add(new Drawing());
// Create Jsonb and serialize
Jsonb jsonb = JsonbBuilder.create();
String result = jsonb.toJson(rpcs);
// Deserialize back
rpcs = jsonb.fromJson(result,
new ArrayList<Drawing>() {}
.getClass()
.getGenericSuperclass());
System.out.println( rpcs );
} catch (Exception e) {
e.printStackTrace();
}
}
public static <T> List<T> mapJsonToObjectList(String body, Class<T> baseClass) {
try (var reader = Json.createReader(new StringReader(body));
Jsonb jsonb = JsonbBuilder.create()){
JsonArray jsonArray = reader.readArray();
return jsonArray.stream()
.map(jsonValue -> jsonb.fromJson(jsonValue.toString(), baseClass))
.toList();
} catch (Exception e) {
return (List<T>) new ArrayList<Drawing>();
}
}
public final static class getRepositoryConfig {
public final static String getPath() {
String home = System.getenv("HOME") != null ? System.getenv("HOME")
: System.getenv("HOMEDRIVE") + System.getenv("HOMEPATH");
return home.replace('\\', '/') + "/workspace/reservationsystem/src/resources/db";
}
}
}

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class Drawing extends InventoryPiece {

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class InvalidArtOperationException extends RuntimeException {

View File

@@ -0,0 +1,22 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class InvalidRecordDataException extends RuntimeException {
public InvalidRecordDataException(String message) {
super(message);
}
public InvalidRecordDataException(String message, Throwable cause) {
super(message, cause);
}
public InvalidRecordDataException(Throwable cause) {
super(cause);
}
}

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class InvalidTransOperationException extends RuntimeException {

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class InvalidTransactionException extends RuntimeException {

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.util.ArrayList;

View File

@@ -0,0 +1,59 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.io.IOException;
import java.util.EnumSet;
import java.util.Set;
public class InventoryManager {
final static InventoryManager INSTANCE = new InventoryManager();
public static InventoryManager getInstance() {
return INSTANCE;
}
public InventoryList INVENTORY = new InventoryList();
private InventoryManager() {
}
public Set<InventoryType> getArtPieceTypes() {
return EnumSet.allOf(InventoryType.class);
}
public void add(InventoryPiece iPiece) {
INVENTORY.add(iPiece);
}
public InventoryPiece find(String id) {
return null;
}
public InventoryPiece update(InventoryPiece iPiece) {
return iPiece;
}
public void save() {
}
public void loadAll(){
try {
DataRepository.WalkFileSystemTree(INSTANCE);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void Remove(InventoryPiece iPiece) {
//int i = find(iPiece);
//INVENTORY.remove(i)
//*** multiple quantiies of iPiece */
};
}

View File

@@ -1,9 +1,17 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.time.ZonedDateTime;
import jakarta.json.bind.annotation.JsonbProperty;
import jakarta.json.bind.annotation.JsonbTransient;
import jakarta.json.bind.annotation.JsonbDateFormat;
public abstract class InventoryPiece {
public String Id;
public String id;
public float price;
public ZonedDateTime created;
public String title;
@@ -20,7 +28,7 @@ public abstract class InventoryPiece {
public InventoryPiece(InventoryType iventoryType) {
this.iventoryType = iventoryType;
this.created = ZonedDateTime.now();
this.Id = TransactionManager.generateTransactionRandomID(10);
this.id = DataRepository.generateRandom10DigitID();
}
public InventoryPiece() {
@@ -35,11 +43,11 @@ public abstract class InventoryPiece {
};
public String getId() {
return Id;
return id;
}
public void setId(String id) {
Id = id;
this.id = id;
}
public float getPrice() {

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public enum InventoryType {

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class Painting extends InventoryPiece {

View File

@@ -0,0 +1,36 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class Print extends InventoryPiece {
String openEditionType;
String category;
public Print(){
super(InventoryType.PRINT);
}
public Print(String openEditionType, String category) {
this.openEditionType = openEditionType;
this.category = category;
}
public String getOpenEditionType() {
return openEditionType;
}
public void setOpenEditionType(String openEditionType) {
this.openEditionType = openEditionType;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
}

View File

@@ -1,3 +1,7 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public class Sculpture extends InventoryPiece {

View File

@@ -0,0 +1,49 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.time.ZonedDateTime;
import jakarta.json.JsonArray;
public class Transaction {
String id;
ZonedDateTime created = ZonedDateTime.now();
ZonedDateTime completed = null;
String customerId;
Address shipToAddress;
InventoryList customerInventoryList;
JsonArray attributes;
public Transaction() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ZonedDateTime getCreated() {
return created;
}
public void setCreated(ZonedDateTime created) {
this.created = created;
}
public ZonedDateTime getCompleted() {
return completed;
}
public void setCompleted(ZonedDateTime completed) {
this.completed = completed;
}
}

View File

@@ -0,0 +1,19 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.util.ArrayList;
public class TransactionList extends ArrayList<Transaction> {
public TransactionList() {
super();
}
@Override
public boolean add(Transaction e) {
// TODO Auto-generated method stub
return super.add(e);
}
}

View File

@@ -0,0 +1,56 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
import java.time.ZonedDateTime;
public class TransactionManager {
final static TransactionManager INSTANCE = new TransactionManager();
public static TransactionManager getInstance() {
return INSTANCE;
}
public TransactionList TRANSACTIONS = new TransactionList();
public Transaction TransactRequest(Customer customer, InventoryList iPieces, Transaction transacted) {
return transacted;
}
public void compute(Transaction tran, TransactionOperationEnum operation) {
}
public void compute(Transaction tran) {
}
public void complete(Transaction tran) {
}
public TransactionList findByCustomerEmail(String email) {
return null;
}
public TransactionList findByTransactionId(String id) {
return null;
}
public TransactionList findByTransactionDate(ZonedDateTime completed) {
return null;
}
public void remove(Transaction tran) {
}
public void save() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'save'");
}
}

View File

@@ -0,0 +1,14 @@
/**
* license: GPLv3
edu.inventorym
*/
package edu.inventorym.model;
public enum TransactionOperationEnum {
Completed,
Draft,
Pricing,
Removed,
Shipping
}

View File

@@ -1,2 +1,8 @@
# inventorym
Inheritance: Shows inheritance relationships (Drawing, Painting, Print, Sculpture extending InventoryPiece)
Associations: Shows composition relationships (Customer has Address, Transaction has Address and InventoryList)
Enumerations: InventoryType and TransactionOperationEnum
Exceptions: four application exception classes extend RuntimeException
Manager Classes: Singleton pattern managers with their collections
Collections: Custom list classes extending ArrayList

View File

@@ -5,5 +5,6 @@ plugins {
}
rootProject.name = 'inventorym'
include('App')
include('Api')
include('Model')
include('Api')

91
uml/classdiagram.dot Normal file
View File

@@ -0,0 +1,91 @@
digraph InventoryManagementSystem {
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): 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}"];
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()\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}"];
InventoryPiece [label="{«abstract»\lInventoryPiece|+ id: String\l+ price: float\l+ created: ZonedDateTime\l+ title: String\l+ description: String\l+ Author: String\l- iventoryType: InventoryType\l|+ InventoryPiece()\l+ InventoryPiece(InventoryType)\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}"];
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}"];
// Inventory Subclasses
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»\lInventoryType|PAINTING\lDRAWING\lPRINT\lSCULPTURE\l}"];
TransactionOperationEnum [label="{«enumeration»\lTransactionOperationEnum|Completed\lDraft\lPricing\lRemoved\lShipping\l}"];
// Collections
CustomerList [label="{CustomerList|+ CustomerList()\l}"];
InventoryList [label="{InventoryList|+ InventoryList()\l}"];
TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction): boolean\l}"];
// Managers
CustomerManager [label="{CustomerManager|- 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}"];
InventoryManager [label="{InventoryManager|- INSTANCE: InventoryManager\l+ INVENTORY: InventoryList\l|+ getInstance(): InventoryManager\l+ getArtPieceTypes(): Set\l+ add(InventoryPiece): void\l+ find(String): InventoryPiece\l+ update(InventoryPiece): InventoryPiece\l+ save(): void\l+ loadAll(): void\l+ Remove(InventoryPiece): void\l}"];
TransactionManager [label="{TransactionManager|- 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}"];
DataRepository [label="{DataRepository|- 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}"];
// Exceptions
InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l+ InvalidRecordDataException(String, Throwable)\l+ InvalidRecordDataException(Throwable)\l}"];
InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l+ InvalidArtOperationException(String, Throwable)\l+ InvalidArtOperationException(Throwable)\l}"];
InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l+ InvalidTransactionException(String, Throwable)\l+ InvalidTransactionException(Throwable)\l}"];
InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l+ InvalidTransOperationException(String, Throwable)\l+ InvalidTransOperationException(Throwable)\l}"];
// 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 -> "ArrayList<Customer>" [arrowhead=empty, label="extends"];
InventoryList -> "ArrayList<InventoryPiece>" [arrowhead=empty, label="extends"];
TransactionList -> "ArrayList<Transaction>" [arrowhead=empty, label="extends"];
InvalidRecordDataException -> RuntimeException [arrowhead=empty, label="extends"];
InvalidArtOperationException -> RuntimeException [arrowhead=empty, label="extends"];
InvalidTransactionException -> RuntimeException [arrowhead=empty, label="extends"];
InvalidTransOperationException -> RuntimeException [arrowhead=empty, label="extends"];
// Associations
Customer -> Address [arrowhead=open, label="mailing"];
Transaction -> Address [arrowhead=open, label="shipToAddress"];
Transaction -> InventoryList [arrowhead=open, label="customerInventoryList"];
CustomerManager -> CustomerList [arrowhead=open, label="CUSTOMERS"];
InventoryManager -> InventoryList [arrowhead=open, label="INVENTORY"];
TransactionManager -> TransactionList [arrowhead=open, label="TRANSACTIONS"];
InventoryPiece -> InventoryType [arrowhead=open, label="iventoryType"];
// Dependencies
CustomerManager -> InvalidRecordDataException [style=dashed, arrowhead=open, label="throws"];
DataRepository -> InventoryManager [style=dashed, arrowhead=open];
DataRepository -> CustomerManager [style=dashed, arrowhead=open];
DataRepository -> TransactionManager [style=dashed, arrowhead=open];
TransactionManager -> Customer [style=dashed, arrowhead=open];
TransactionManager -> TransactionOperationEnum [style=dashed, arrowhead=open];
// Invisible nodes for layout
"ArrayList<Customer>" [shape=plaintext, label=""];
"ArrayList<InventoryPiece>" [shape=plaintext, label=""];
"ArrayList<Transaction>" [shape=plaintext, label=""];
RuntimeException [shape=plaintext, label=""];
}

504
uml/classdiagram.svg Normal file
View File

@@ -0,0 +1,504 @@
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2236pt" height="1112pt" viewBox="0.00 0.00 2235.82 1112.4">
<g id="graph0" class="graph" transform="translate(-341.9763189164946,1433.4115071391775) scale(1.7411011265922518)" data-name="InventoryManagementSystem">
<polygon fill="white" stroke="none" points="-4,4 -4,-1108.4 2231.82,-1108.4 2231.82,4 -4,4"/>
<!-- Address -->
<g id="node1" class="node" pointer-events="visible" data-name="Address">
<polygon fill="none" stroke="black" points="448.75,-0.5 448.75,-216.5 579.54,-216.5 579.54,-0.5 448.75,-0.5"/>
<text text-anchor="middle" x="514.14" y="-203.5" font-family="Arial" font-size="10.00">Address</text>
<polyline fill="none" stroke="black" points="448.75,-196.5 579.54,-196.5"/>
<text text-anchor="start" x="456.75" y="-183.5" font-family="Arial" font-size="10.00">+ street: String</text>
<text text-anchor="start" x="456.75" y="-171.5" font-family="Arial" font-size="10.00">+ city: String</text>
<text text-anchor="start" x="456.75" y="-159.5" font-family="Arial" font-size="10.00">+ state: String</text>
<text text-anchor="start" x="456.75" y="-147.5" font-family="Arial" font-size="10.00">+ zip: String</text>
<polyline fill="none" stroke="black" points="448.75,-140.5 579.54,-140.5"/>
<text text-anchor="start" x="456.75" y="-127.5" font-family="Arial" font-size="10.00">+ getStreet(): String</text>
<text text-anchor="start" x="456.75" y="-115.5" font-family="Arial" font-size="10.00">+ setStreet(String): void</text>
<text text-anchor="start" x="456.75" y="-103.5" font-family="Arial" font-size="10.00">+ getCity(): String</text>
<text text-anchor="start" x="456.75" y="-91.5" font-family="Arial" font-size="10.00">+ setCity(String): void</text>
<text text-anchor="start" x="456.75" y="-79.5" font-family="Arial" font-size="10.00">+ getState(): String</text>
<text text-anchor="start" x="456.75" y="-67.5" font-family="Arial" font-size="10.00">+ setState(String): void</text>
<text text-anchor="start" x="456.75" y="-55.5" font-family="Arial" font-size="10.00">+ getZip(): String</text>
<text text-anchor="start" x="456.75" y="-43.5" font-family="Arial" font-size="10.00">+ setZip(String): void</text>
<text text-anchor="start" x="456.75" y="-31.5" font-family="Arial" font-size="10.00">+ hashCode(): int</text>
<text text-anchor="start" x="456.75" y="-19.5" font-family="Arial" font-size="10.00">+ equals(Object): boolean</text>
<text text-anchor="start" x="456.75" y="-7.5" font-family="Arial" font-size="10.00">+ toString(): String</text>
</g>
<!-- Customer -->
<g id="node2" class="node" pointer-events="visible" data-name="Customer">
<polygon fill="none" stroke="black" points="316.25,-264.3 316.25,-552.3 512.04,-552.3 512.04,-264.3 316.25,-264.3"/>
<text text-anchor="middle" x="414.14" y="-539.3" font-family="Arial" font-size="10.00">Customer</text>
<polyline fill="none" stroke="black" points="316.25,-532.3 512.04,-532.3"/>
<text text-anchor="start" x="324.25" y="-519.3" font-family="Arial" font-size="10.00"># id: String</text>
<text text-anchor="start" x="324.25" y="-507.3" font-family="Arial" font-size="10.00"># updated: ZonedDateTime</text>
<text text-anchor="start" x="324.25" y="-495.3" font-family="Arial" font-size="10.00">- phone: String</text>
<text text-anchor="start" x="324.25" y="-483.3" font-family="Arial" font-size="10.00">- mailing: Address</text>
<text text-anchor="start" x="324.25" y="-471.3" font-family="Arial" font-size="10.00">- email: String</text>
<text text-anchor="start" x="324.25" y="-459.3" font-family="Arial" font-size="10.00">- nameFirst: String</text>
<text text-anchor="start" x="324.25" y="-447.3" font-family="Arial" font-size="10.00">- nameLast: String</text>
<polyline fill="none" stroke="black" points="316.25,-440.3 512.04,-440.3"/>
<text text-anchor="start" x="324.25" y="-427.3" font-family="Arial" font-size="10.00">+ Customer()</text>
<text text-anchor="start" x="324.25" y="-415.3" font-family="Arial" font-size="10.00">+ Customer(String, String, String, String)</text>
<text text-anchor="start" x="324.25" y="-403.3" font-family="Arial" font-size="10.00">+ getId(): String</text>
<text text-anchor="start" x="324.25" y="-391.3" font-family="Arial" font-size="10.00">+ setId(String): void</text>
<text text-anchor="start" x="324.25" y="-379.3" font-family="Arial" font-size="10.00">+ getPhone(): String</text>
<text text-anchor="start" x="324.25" y="-367.3" font-family="Arial" font-size="10.00">+ setPhone(String): void</text>
<text text-anchor="start" x="324.25" y="-355.3" font-family="Arial" font-size="10.00">+ getMailing(): Address</text>
<text text-anchor="start" x="324.25" y="-343.3" font-family="Arial" font-size="10.00">+ setMailing(Address): void</text>
<text text-anchor="start" x="324.25" y="-331.3" font-family="Arial" font-size="10.00">+ getEmail(): String</text>
<text text-anchor="start" x="324.25" y="-319.3" font-family="Arial" font-size="10.00">+ setEmail(String): void</text>
<text text-anchor="start" x="324.25" y="-307.3" font-family="Arial" font-size="10.00">+ getNameFirst(): String</text>
<text text-anchor="start" x="324.25" y="-295.3" font-family="Arial" font-size="10.00">+ setNameFirst(String): void</text>
<text text-anchor="start" x="324.25" y="-283.3" font-family="Arial" font-size="10.00">+ getNameLast(): String</text>
<text text-anchor="start" x="324.25" y="-271.3" font-family="Arial" font-size="10.00">+ setNameLast(String): void</text>
</g>
<!-- Customer&#45;&gt;Address -->
<g id="edge12" class="edge" data-name="Customer-&gt;Address">
<path fill="none" stroke="black" d="M462.09,-264.51C466.49,-251.41 470.91,-238.26 475.21,-225.44"/>
<polygon fill="black" stroke="black" points="478.32,-216.18 479.4,-227.09 476.73,-220.92 475.14,-225.66 475.14,-225.66 475.14,-225.66 476.73,-220.92 470.87,-224.23 478.32,-216.18 478.32,-216.18"/>
<text text-anchor="middle" x="484.4" y="-237.7" font-family="Arial" font-size="9.00">mailing</text>
</g>
<!-- InventoryPiece -->
<g id="node3" class="node" pointer-events="visible" data-name="InventoryPiece">
<polygon fill="none" stroke="black" points="1870.25,-600.1 1870.25,-924.1 2046.04,-924.1 2046.04,-600.1 1870.25,-600.1"/>
<text text-anchor="start" x="1878.25" y="-911.1" font-family="Arial" font-size="10.00">«abstract»</text>
<text text-anchor="middle" x="1958.14" y="-899.1" font-family="Arial" font-size="10.00">InventoryPiece</text>
<polyline fill="none" stroke="black" points="1870.25,-892.1 2046.04,-892.1"/>
<text text-anchor="start" x="1878.25" y="-879.1" font-family="Arial" font-size="10.00">+ id: String</text>
<text text-anchor="start" x="1878.25" y="-867.1" font-family="Arial" font-size="10.00">+ price: float</text>
<text text-anchor="start" x="1878.25" y="-855.1" font-family="Arial" font-size="10.00">+ created: ZonedDateTime</text>
<text text-anchor="start" x="1878.25" y="-843.1" font-family="Arial" font-size="10.00">+ title: String</text>
<text text-anchor="start" x="1878.25" y="-831.1" font-family="Arial" font-size="10.00">+ description: String</text>
<text text-anchor="start" x="1878.25" y="-819.1" font-family="Arial" font-size="10.00">+ Author: String</text>
<text text-anchor="start" x="1878.25" y="-807.1" font-family="Arial" font-size="10.00">- iventoryType: InventoryType</text>
<polyline fill="none" stroke="black" points="1870.25,-800.1 2046.04,-800.1"/>
<text text-anchor="start" x="1878.25" y="-787.1" font-family="Arial" font-size="10.00">+ InventoryPiece()</text>
<text text-anchor="start" x="1878.25" y="-775.1" font-family="Arial" font-size="10.00">+ InventoryPiece(InventoryType)</text>
<text text-anchor="start" x="1878.25" y="-763.1" font-family="Arial" font-size="10.00">+ isArt(InventoryPiece): Boolean</text>
<text text-anchor="start" x="1878.25" y="-751.1" font-family="Arial" font-size="10.00">+ getType(): String</text>
<text text-anchor="start" x="1878.25" y="-739.1" font-family="Arial" font-size="10.00">+ getId(): String</text>
<text text-anchor="start" x="1878.25" y="-727.1" font-family="Arial" font-size="10.00">+ setId(String): void</text>
<text text-anchor="start" x="1878.25" y="-715.1" font-family="Arial" font-size="10.00">+ getPrice(): float</text>
<text text-anchor="start" x="1878.25" y="-703.1" font-family="Arial" font-size="10.00">+ setPrice(float): void</text>
<text text-anchor="start" x="1878.25" y="-691.1" font-family="Arial" font-size="10.00">+ getCreated(): ZonedDateTime</text>
<text text-anchor="start" x="1878.25" y="-679.1" font-family="Arial" font-size="10.00">+ setCreated(ZonedDateTime): void</text>
<text text-anchor="start" x="1878.25" y="-667.1" font-family="Arial" font-size="10.00">+ getTitle(): String</text>
<text text-anchor="start" x="1878.25" y="-655.1" font-family="Arial" font-size="10.00">+ setTitle(String): void</text>
<text text-anchor="start" x="1878.25" y="-643.1" font-family="Arial" font-size="10.00">+ getDescription(): String</text>
<text text-anchor="start" x="1878.25" y="-631.1" font-family="Arial" font-size="10.00">+ setDescription(String): void</text>
<text text-anchor="start" x="1878.25" y="-619.1" font-family="Arial" font-size="10.00">+ getAuthor(): String</text>
<text text-anchor="start" x="1878.25" y="-607.1" font-family="Arial" font-size="10.00">+ setAuthor(String): void</text>
</g>
<!-- InventoryType -->
<g id="node9" class="node" pointer-events="visible" data-name="InventoryType">
<polygon fill="none" stroke="black" points="1916.79,-364.3 1916.79,-452.3 1999.49,-452.3 1999.49,-364.3 1916.79,-364.3"/>
<text text-anchor="start" x="1924.79" y="-439.3" font-family="Arial" font-size="10.00">«enumeration»</text>
<text text-anchor="middle" x="1958.14" y="-427.3" font-family="Arial" font-size="10.00">InventoryType</text>
<polyline fill="none" stroke="black" points="1916.79,-420.3 1999.49,-420.3"/>
<text text-anchor="start" x="1924.79" y="-407.3" font-family="Arial" font-size="10.00">PAINTING</text>
<text text-anchor="start" x="1924.79" y="-395.3" font-family="Arial" font-size="10.00">DRAWING</text>
<text text-anchor="start" x="1924.79" y="-383.3" font-family="Arial" font-size="10.00">PRINT</text>
<text text-anchor="start" x="1924.79" y="-371.3" font-family="Arial" font-size="10.00">SCULPTURE</text>
</g>
<!-- InventoryPiece&#45;&gt;InventoryType -->
<g id="edge18" class="edge" data-name="InventoryPiece-&gt;InventoryType">
<path fill="none" stroke="black" d="M1958.14,-600.13C1958.14,-550.14 1958.14,-498.53 1958.14,-461.6"/>
<polygon fill="black" stroke="black" points="1958.14,-452.07 1962.64,-462.07 1958.14,-457.07 1958.14,-462.07 1958.14,-462.07 1958.14,-462.07 1958.14,-457.07 1953.64,-462.07 1958.14,-452.07 1958.14,-452.07"/>
<text text-anchor="middle" x="1983.9" y="-573.5" font-family="Arial" font-size="9.00">iventoryType</text>
</g>
<!-- Transaction -->
<g id="node4" class="node" pointer-events="visible" data-name="Transaction">
<polygon fill="none" stroke="black" points="436.85,-660.1 436.85,-864.1 625.43,-864.1 625.43,-660.1 436.85,-660.1"/>
<text text-anchor="middle" x="531.14" y="-851.1" font-family="Arial" font-size="10.00">Transaction</text>
<polyline fill="none" stroke="black" points="436.85,-844.1 625.43,-844.1"/>
<text text-anchor="start" x="444.85" y="-831.1" font-family="Arial" font-size="10.00">- id: String</text>
<text text-anchor="start" x="444.85" y="-819.1" font-family="Arial" font-size="10.00">- created: ZonedDateTime</text>
<text text-anchor="start" x="444.85" y="-807.1" font-family="Arial" font-size="10.00">- completed: ZonedDateTime</text>
<text text-anchor="start" x="444.85" y="-795.1" font-family="Arial" font-size="10.00">- customerId: String</text>
<text text-anchor="start" x="444.85" y="-783.1" font-family="Arial" font-size="10.00">- shipToAddress: Address</text>
<text text-anchor="start" x="444.85" y="-771.1" font-family="Arial" font-size="10.00">- customerInventoryList: InventoryList</text>
<text text-anchor="start" x="444.85" y="-759.1" font-family="Arial" font-size="10.00">- attributes: JsonArray</text>
<polyline fill="none" stroke="black" points="436.85,-752.1 625.43,-752.1"/>
<text text-anchor="start" x="444.85" y="-739.1" font-family="Arial" font-size="10.00">+ Transaction()</text>
<text text-anchor="start" x="444.85" y="-727.1" font-family="Arial" font-size="10.00">+ getId(): String</text>
<text text-anchor="start" x="444.85" y="-715.1" font-family="Arial" font-size="10.00">+ setId(String): void</text>
<text text-anchor="start" x="444.85" y="-703.1" font-family="Arial" font-size="10.00">+ getCreated(): ZonedDateTime</text>
<text text-anchor="start" x="444.85" y="-691.1" font-family="Arial" font-size="10.00">+ setCreated(ZonedDateTime): void</text>
<text text-anchor="start" x="444.85" y="-679.1" font-family="Arial" font-size="10.00">+ getCompleted(): ZonedDateTime</text>
<text text-anchor="start" x="444.85" y="-667.1" font-family="Arial" font-size="10.00">+ setCompleted(ZonedDateTime): void</text>
</g>
<!-- Transaction&#45;&gt;Address -->
<g id="edge13" class="edge" data-name="Transaction-&gt;Address">
<path fill="none" stroke="black" d="M529.86,-660.12C528.4,-559.63 525.63,-401.03 521.14,-263.8 520.74,-251.52 520.26,-238.69 519.74,-225.91"/>
<polygon fill="black" stroke="black" points="519.33,-216.15 524.24,-225.95 519.54,-221.14 519.75,-226.14 519.75,-226.14 519.75,-226.14 519.54,-221.14 515.25,-226.33 519.33,-216.15 519.33,-216.15"/>
<text text-anchor="middle" x="558.16" y="-405.6" font-family="Arial" font-size="9.00">shipToAddress</text>
</g>
<!-- InventoryList -->
<g id="node12" class="node" pointer-events="visible" data-name="InventoryList">
<polygon fill="none" stroke="black" points="655.16,-388.3 655.16,-428.3 743.13,-428.3 743.13,-388.3 655.16,-388.3"/>
<text text-anchor="middle" x="699.14" y="-415.3" font-family="Arial" font-size="10.00">InventoryList</text>
<polyline fill="none" stroke="black" points="655.16,-408.3 743.13,-408.3"/>
<text text-anchor="start" x="663.16" y="-395.3" font-family="Arial" font-size="10.00">+ InventoryList()</text>
</g>
<!-- Transaction&#45;&gt;InventoryList -->
<g id="edge14" class="edge" data-name="Transaction-&gt;InventoryList">
<path fill="none" stroke="black" d="M579.28,-660.29C615.74,-583.96 663.28,-484.4 685.97,-436.88"/>
<polygon fill="black" stroke="black" points="690.17,-428.09 689.92,-439.06 688.01,-432.61 685.86,-437.12 685.86,-437.12 685.86,-437.12 688.01,-432.61 681.8,-435.18 690.17,-428.09 690.17,-428.09"/>
<text text-anchor="middle" x="665.16" y="-573.5" font-family="Arial" font-size="9.00">customerInventoryList</text>
</g>
<!-- Drawing -->
<g id="node5" class="node" pointer-events="visible" data-name="Drawing">
<polygon fill="none" stroke="black" points="1715.31,-995.9 1715.31,-1079.9 1814.98,-1079.9 1814.98,-995.9 1715.31,-995.9"/>
<text text-anchor="middle" x="1765.14" y="-1066.9" font-family="Arial" font-size="10.00">Drawing</text>
<polyline fill="none" stroke="black" points="1715.31,-1059.9 1814.98,-1059.9"/>
<text text-anchor="start" x="1723.31" y="-1046.9" font-family="Arial" font-size="10.00">+ style: String</text>
<text text-anchor="start" x="1723.31" y="-1034.9" font-family="Arial" font-size="10.00">+ technique: String</text>
<text text-anchor="start" x="1723.31" y="-1022.9" font-family="Arial" font-size="10.00">+ category: String</text>
<polyline fill="none" stroke="black" points="1715.31,-1015.9 1814.98,-1015.9"/>
<text text-anchor="start" x="1723.31" y="-1002.9" font-family="Arial" font-size="10.00">+ Drawing()</text>
</g>
<!-- Drawing&#45;&gt;InventoryPiece -->
<g id="edge1" class="edge" data-name="Drawing-&gt;InventoryPiece">
<path fill="none" stroke="black" d="M1794.04,-995.91C1812.79,-969.3 1838.4,-932.97 1863.81,-896.93"/>
<polygon fill="none" stroke="black" points="1866.49,-899.2 1869.39,-889.01 1860.77,-895.17 1866.49,-899.2"/>
<text text-anchor="middle" x="1843.9" y="-945.3" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- Painting -->
<g id="node6" class="node" pointer-events="visible" data-name="Painting">
<polygon fill="none" stroke="black" points="1832.56,-983.9 1832.56,-1091.9 1929.72,-1091.9 1929.72,-983.9 1832.56,-983.9"/>
<text text-anchor="middle" x="1881.14" y="-1078.9" font-family="Arial" font-size="10.00">Painting</text>
<polyline fill="none" stroke="black" points="1832.56,-1071.9 1929.72,-1071.9"/>
<text text-anchor="start" x="1840.56" y="-1058.9" font-family="Arial" font-size="10.00">- height: int</text>
<text text-anchor="start" x="1840.56" y="-1046.9" font-family="Arial" font-size="10.00">- width: int</text>
<text text-anchor="start" x="1840.56" y="-1034.9" font-family="Arial" font-size="10.00">- style: String</text>
<text text-anchor="start" x="1840.56" y="-1022.9" font-family="Arial" font-size="10.00">- technique: String</text>
<text text-anchor="start" x="1840.56" y="-1010.9" font-family="Arial" font-size="10.00">- category: String</text>
<polyline fill="none" stroke="black" points="1832.56,-1003.9 1929.72,-1003.9"/>
<text text-anchor="start" x="1840.56" y="-990.9" font-family="Arial" font-size="10.00">+ Painting()</text>
</g>
<!-- Painting&#45;&gt;InventoryPiece -->
<g id="edge2" class="edge" data-name="Painting-&gt;InventoryPiece">
<path fill="none" stroke="black" d="M1895.99,-984.11C1900.11,-969.44 1904.83,-952.66 1909.78,-935.06"/>
<polygon fill="none" stroke="black" points="1913.14,-936.03 1912.48,-925.46 1906.41,-934.14 1913.14,-936.03"/>
<text text-anchor="middle" x="1921.9" y="-945.3" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- Print -->
<g id="node7" class="node" pointer-events="visible" data-name="Print">
<polygon fill="none" stroke="black" points="1948.19,-971.9 1948.19,-1103.9 2120.1,-1103.9 2120.1,-971.9 1948.19,-971.9"/>
<text text-anchor="middle" x="2034.14" y="-1090.9" font-family="Arial" font-size="10.00">Print</text>
<polyline fill="none" stroke="black" points="1948.19,-1083.9 2120.1,-1083.9"/>
<text text-anchor="start" x="1956.19" y="-1070.9" font-family="Arial" font-size="10.00">- openEditionType: String</text>
<text text-anchor="start" x="1956.19" y="-1058.9" font-family="Arial" font-size="10.00">- category: String</text>
<polyline fill="none" stroke="black" points="1948.19,-1051.9 2120.1,-1051.9"/>
<text text-anchor="start" x="1956.19" y="-1038.9" font-family="Arial" font-size="10.00">+ Print()</text>
<text text-anchor="start" x="1956.19" y="-1026.9" font-family="Arial" font-size="10.00">+ Print(String, String)</text>
<text text-anchor="start" x="1956.19" y="-1014.9" font-family="Arial" font-size="10.00">+ getOpenEditionType(): String</text>
<text text-anchor="start" x="1956.19" y="-1002.9" font-family="Arial" font-size="10.00">+ setOpenEditionType(String): void</text>
<text text-anchor="start" x="1956.19" y="-990.9" font-family="Arial" font-size="10.00">+ getCategory(): String</text>
<text text-anchor="start" x="1956.19" y="-978.9" font-family="Arial" font-size="10.00">+ setCategory(String): void</text>
</g>
<!-- Print&#45;&gt;InventoryPiece -->
<g id="edge3" class="edge" data-name="Print-&gt;InventoryPiece">
<path fill="none" stroke="black" d="M2016.13,-972.01C2012.93,-960.46 2009.45,-947.95 2005.86,-935"/>
<polygon fill="none" stroke="black" points="2009.26,-934.18 2003.21,-925.48 2002.52,-936.05 2009.26,-934.18"/>
<text text-anchor="middle" x="2025.9" y="-945.3" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- Sculpture -->
<g id="node8" class="node" pointer-events="visible" data-name="Sculpture">
<polygon fill="none" stroke="black" points="2138.47,-1001.9 2138.47,-1073.9 2227.82,-1073.9 2227.82,-1001.9 2138.47,-1001.9"/>
<text text-anchor="middle" x="2183.14" y="-1060.9" font-family="Arial" font-size="10.00">Sculpture</text>
<polyline fill="none" stroke="black" points="2138.47,-1053.9 2227.82,-1053.9"/>
<text text-anchor="start" x="2146.47" y="-1040.9" font-family="Arial" font-size="10.00">- material: String</text>
<text text-anchor="start" x="2146.47" y="-1028.9" font-family="Arial" font-size="10.00">- weight: float</text>
<polyline fill="none" stroke="black" points="2138.47,-1021.9 2227.82,-1021.9"/>
<text text-anchor="start" x="2146.47" y="-1008.9" font-family="Arial" font-size="10.00">+ Sculpture()</text>
</g>
<!-- Sculpture&#45;&gt;InventoryPiece -->
<g id="edge4" class="edge" data-name="Sculpture-&gt;InventoryPiece">
<path fill="none" stroke="black" d="M2154.42,-1001.94C2128.76,-970.72 2089.69,-923.18 2053.15,-878.71"/>
<polygon fill="none" stroke="black" points="2055.89,-876.54 2046.84,-871.04 2050.49,-880.98 2055.89,-876.54"/>
<text text-anchor="middle" x="2126.9" y="-945.3" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- TransactionOperationEnum -->
<g id="node10" class="node" pointer-events="visible" data-name="TransactionOperationEnum">
<polygon fill="none" stroke="black" points="0,-358.3 0,-458.3 138.29,-458.3 138.29,-358.3 0,-358.3"/>
<text text-anchor="start" x="8" y="-445.3" font-family="Arial" font-size="10.00">«enumeration»</text>
<text text-anchor="middle" x="69.14" y="-433.3" font-family="Arial" font-size="10.00">TransactionOperationEnum</text>
<polyline fill="none" stroke="black" points="0,-426.3 138.29,-426.3"/>
<text text-anchor="start" x="8" y="-413.3" font-family="Arial" font-size="10.00">Completed</text>
<text text-anchor="start" x="8" y="-401.3" font-family="Arial" font-size="10.00">Draft</text>
<text text-anchor="start" x="8" y="-389.3" font-family="Arial" font-size="10.00">Pricing</text>
<text text-anchor="start" x="8" y="-377.3" font-family="Arial" font-size="10.00">Removed</text>
<text text-anchor="start" x="8" y="-365.3" font-family="Arial" font-size="10.00">Shipping</text>
</g>
<!-- CustomerList -->
<g id="node11" class="node" pointer-events="visible" data-name="CustomerList">
<polygon fill="none" stroke="black" points="776.05,-388.3 776.05,-428.3 866.23,-428.3 866.23,-388.3 776.05,-388.3"/>
<text text-anchor="middle" x="821.14" y="-415.3" font-family="Arial" font-size="10.00">CustomerList</text>
<polyline fill="none" stroke="black" points="776.05,-408.3 866.23,-408.3"/>
<text text-anchor="start" x="784.05" y="-395.3" font-family="Arial" font-size="10.00">+ CustomerList()</text>
</g>
<!-- ArrayList&lt;Customer&gt; -->
<g id="node22" class="node" pointer-events="visible" data-name="ArrayList&lt;Customer&gt;">
</g>
<!-- CustomerList&#45;&gt;ArrayList&lt;Customer&gt; -->
<g id="edge5" class="edge" data-name="CustomerList-&gt;ArrayList&lt;Customer&gt;">
<path fill="none" stroke="black" d="M821.14,-388.67C821.14,-338.04 821.14,-197.69 821.14,-137.5"/>
<polygon fill="none" stroke="black" points="824.64,-137.77 821.14,-127.77 817.64,-137.77 824.64,-137.77"/>
<text text-anchor="middle" x="836.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- ArrayList&lt;InventoryPiece&gt; -->
<g id="node23" class="node" pointer-events="visible" data-name="ArrayList&lt;InventoryPiece&gt;">
</g>
<!-- InventoryList&#45;&gt;ArrayList&lt;InventoryPiece&gt; -->
<g id="edge6" class="edge" data-name="InventoryList-&gt;ArrayList&lt;InventoryPiece&gt;">
<path fill="none" stroke="black" d="M699.14,-388.67C699.14,-338.04 699.14,-197.69 699.14,-137.5"/>
<polygon fill="none" stroke="black" points="702.64,-137.77 699.14,-127.77 695.64,-137.77 702.64,-137.77"/>
<text text-anchor="middle" x="714.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- TransactionList -->
<g id="node13" class="node" pointer-events="visible" data-name="TransactionList">
<polygon fill="none" stroke="black" points="156.46,-382.3 156.46,-434.3 297.82,-434.3 297.82,-382.3 156.46,-382.3"/>
<text text-anchor="middle" x="227.14" y="-421.3" font-family="Arial" font-size="10.00">TransactionList</text>
<polyline fill="none" stroke="black" points="156.46,-414.3 297.82,-414.3"/>
<text text-anchor="start" x="164.46" y="-401.3" font-family="Arial" font-size="10.00">+ TransactionList()</text>
<text text-anchor="start" x="164.46" y="-389.3" font-family="Arial" font-size="10.00">+ add(Transaction): boolean</text>
</g>
<!-- ArrayList&lt;Transaction&gt; -->
<g id="node24" class="node" pointer-events="visible" data-name="ArrayList&lt;Transaction&gt;">
</g>
<!-- TransactionList&#45;&gt;ArrayList&lt;Transaction&gt; -->
<g id="edge7" class="edge" data-name="TransactionList-&gt;ArrayList&lt;Transaction&gt;">
<path fill="none" stroke="black" d="M227.14,-382.42C227.14,-327.35 227.14,-195.43 227.14,-137.54"/>
<polygon fill="none" stroke="black" points="230.64,-137.88 227.14,-127.88 223.64,-137.88 230.64,-137.88"/>
<text text-anchor="middle" x="242.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- CustomerManager -->
<g id="node14" class="node" pointer-events="visible" data-name="CustomerManager">
<polygon fill="none" stroke="black" points="861.47,-702.1 861.47,-822.1 1032.82,-822.1 1032.82,-702.1 861.47,-702.1"/>
<text text-anchor="middle" x="947.14" y="-809.1" font-family="Arial" font-size="10.00">CustomerManager</text>
<polyline fill="none" stroke="black" points="861.47,-802.1 1032.82,-802.1"/>
<text text-anchor="start" x="869.47" y="-789.1" font-family="Arial" font-size="10.00">- INSTANCE: CustomerManager</text>
<text text-anchor="start" x="869.47" y="-777.1" font-family="Arial" font-size="10.00">+ CUSTOMERS: CustomerList</text>
<polyline fill="none" stroke="black" points="861.47,-770.1 1032.82,-770.1"/>
<text text-anchor="start" x="869.47" y="-757.1" font-family="Arial" font-size="10.00">+ getInstance(): CustomerManager</text>
<text text-anchor="start" x="869.47" y="-745.1" font-family="Arial" font-size="10.00">+ add(Customer): boolean</text>
<text text-anchor="start" x="869.47" y="-733.1" font-family="Arial" font-size="10.00">- check(Customer): void</text>
<text text-anchor="start" x="869.47" y="-721.1" font-family="Arial" font-size="10.00">+ findById(String): Customer</text>
<text text-anchor="start" x="869.47" y="-709.1" font-family="Arial" font-size="10.00">+ findByEmail(String): Customer</text>
</g>
<!-- CustomerManager&#45;&gt;CustomerList -->
<g id="edge15" class="edge" data-name="CustomerManager-&gt;CustomerList">
<path fill="none" stroke="black" d="M926.05,-702.22C898.57,-625.48 851.61,-494.37 831.16,-437.26"/>
<polygon fill="black" stroke="black" points="827.88,-428.12 835.49,-436.01 829.57,-432.82 831.25,-437.53 831.25,-437.53 831.25,-437.53 829.57,-432.82 827.02,-439.05 827.88,-428.12 827.88,-428.12"/>
<text text-anchor="middle" x="909.89" y="-573.5" font-family="Arial" font-size="9.00">CUSTOMERS</text>
</g>
<!-- InvalidRecordDataException -->
<g id="node18" class="node" pointer-events="visible" data-name="InvalidRecordDataException">
<polygon fill="none" stroke="black" points="1406.23,-376.3 1406.23,-440.3 1642.06,-440.3 1642.06,-376.3 1406.23,-376.3"/>
<text text-anchor="middle" x="1524.14" y="-427.3" font-family="Arial" font-size="10.00">InvalidRecordDataException</text>
<polyline fill="none" stroke="black" points="1406.23,-420.3 1642.06,-420.3"/>
<text text-anchor="start" x="1414.23" y="-407.3" font-family="Arial" font-size="10.00">+ InvalidRecordDataException(String)</text>
<text text-anchor="start" x="1414.23" y="-395.3" font-family="Arial" font-size="10.00">+ InvalidRecordDataException(String, Throwable)</text>
<text text-anchor="start" x="1414.23" y="-383.3" font-family="Arial" font-size="10.00">+ InvalidRecordDataException(Throwable)</text>
</g>
<!-- CustomerManager&#45;&gt;InvalidRecordDataException -->
<g id="edge19" class="edge" data-name="CustomerManager-&gt;InvalidRecordDataException">
<path fill="none" stroke="black" d="M1032.82,-733.46C1127.8,-700.2 1282.68,-638.01 1397.14,-552.8 1437,-523.13 1473.57,-479.24 1497.13,-447.82" stroke-dasharray="5,2"/>
<polygon fill="black" stroke="black" points="1502.83,-440.12 1500.5,-450.83 1499.86,-444.14 1496.88,-448.15 1496.88,-448.15 1496.88,-448.15 1499.86,-444.14 1493.27,-445.48 1502.83,-440.12 1502.83,-440.12"/>
<text text-anchor="middle" x="1378.4" y="-573.5" font-family="Arial" font-size="9.00">throws</text>
</g>
<!-- InventoryManager -->
<g id="node15" class="node" pointer-events="visible" data-name="InventoryManager">
<polygon fill="none" stroke="black" points="643.28,-684.1 643.28,-840.1 843,-840.1 843,-684.1 643.28,-684.1"/>
<text text-anchor="middle" x="743.14" y="-827.1" font-family="Arial" font-size="10.00">InventoryManager</text>
<polyline fill="none" stroke="black" points="643.28,-820.1 843,-820.1"/>
<text text-anchor="start" x="651.28" y="-807.1" font-family="Arial" font-size="10.00">- INSTANCE: InventoryManager</text>
<text text-anchor="start" x="651.28" y="-795.1" font-family="Arial" font-size="10.00">+ INVENTORY: InventoryList</text>
<polyline fill="none" stroke="black" points="643.28,-788.1 843,-788.1"/>
<text text-anchor="start" x="651.28" y="-775.1" font-family="Arial" font-size="10.00">+ getInstance(): InventoryManager</text>
<text text-anchor="start" x="651.28" y="-763.1" font-family="Arial" font-size="10.00">+ getArtPieceTypes(): Set</text>
<text text-anchor="start" x="651.28" y="-751.1" font-family="Arial" font-size="10.00">+ add(InventoryPiece): void</text>
<text text-anchor="start" x="651.28" y="-739.1" font-family="Arial" font-size="10.00">+ find(String): InventoryPiece</text>
<text text-anchor="start" x="651.28" y="-727.1" font-family="Arial" font-size="10.00">+ update(InventoryPiece): InventoryPiece</text>
<text text-anchor="start" x="651.28" y="-715.1" font-family="Arial" font-size="10.00">+ save(): void</text>
<text text-anchor="start" x="651.28" y="-703.1" font-family="Arial" font-size="10.00">+ loadAll(): void</text>
<text text-anchor="start" x="651.28" y="-691.1" font-family="Arial" font-size="10.00">+ Remove(InventoryPiece): void</text>
</g>
<!-- InventoryManager&#45;&gt;InventoryList -->
<g id="edge16" class="edge" data-name="InventoryManager-&gt;InventoryList">
<path fill="none" stroke="black" d="M733.54,-684.33C723.85,-606.81 709.38,-491.15 702.73,-437.95"/>
<polygon fill="black" stroke="black" points="701.5,-428.17 707.21,-437.54 702.12,-433.14 702.74,-438.1 702.74,-438.1 702.74,-438.1 702.12,-433.14 698.28,-438.66 701.5,-428.17 701.5,-428.17"/>
<text text-anchor="middle" x="746.4" y="-573.5" font-family="Arial" font-size="9.00">INVENTORY</text>
</g>
<!-- TransactionManager -->
<g id="node16" class="node" pointer-events="visible" data-name="TransactionManager">
<polygon fill="none" stroke="black" points="76.83,-672.1 76.83,-852.1 405.46,-852.1 405.46,-672.1 76.83,-672.1"/>
<text text-anchor="middle" x="241.14" y="-839.1" font-family="Arial" font-size="10.00">TransactionManager</text>
<polyline fill="none" stroke="black" points="76.83,-832.1 405.46,-832.1"/>
<text text-anchor="start" x="84.83" y="-819.1" font-family="Arial" font-size="10.00">- INSTANCE: TransactionManager</text>
<text text-anchor="start" x="84.83" y="-807.1" font-family="Arial" font-size="10.00">+ TRANSACTIONS: TransactionList</text>
<polyline fill="none" stroke="black" points="76.83,-800.1 405.46,-800.1"/>
<text text-anchor="start" x="84.83" y="-787.1" font-family="Arial" font-size="10.00">+ getInstance(): TransactionManager</text>
<text text-anchor="start" x="84.83" y="-775.1" font-family="Arial" font-size="10.00">+ TransactRequest(Customer, InventoryList, Transaction): Transaction</text>
<text text-anchor="start" x="84.83" y="-763.1" font-family="Arial" font-size="10.00">+ compute(Transaction, TransactionOperationEnum): void</text>
<text text-anchor="start" x="84.83" y="-751.1" font-family="Arial" font-size="10.00">+ compute(Transaction): void</text>
<text text-anchor="start" x="84.83" y="-739.1" font-family="Arial" font-size="10.00">+ complete(Transaction): void</text>
<text text-anchor="start" x="84.83" y="-727.1" font-family="Arial" font-size="10.00">+ findByCustomerEmail(String): TransactionList</text>
<text text-anchor="start" x="84.83" y="-715.1" font-family="Arial" font-size="10.00">+ findByTransactionId(String): TransactionList</text>
<text text-anchor="start" x="84.83" y="-703.1" font-family="Arial" font-size="10.00">+ findByTransactionDate(ZonedDateTime): TransactionList</text>
<text text-anchor="start" x="84.83" y="-691.1" font-family="Arial" font-size="10.00">+ remove(Transaction): void</text>
<text text-anchor="start" x="84.83" y="-679.1" font-family="Arial" font-size="10.00">+ save(): void</text>
</g>
<!-- TransactionManager&#45;&gt;Customer -->
<g id="edge23" class="edge" data-name="TransactionManager-&gt;Customer">
<path fill="none" stroke="black" d="M284.8,-672.33C301.46,-638.45 320.95,-598.81 339.68,-560.73" stroke-dasharray="5,2"/>
<polygon fill="black" stroke="black" points="343.91,-552.12 343.53,-563.08 341.7,-556.61 339.5,-561.09 339.5,-561.09 339.5,-561.09 341.7,-556.61 335.46,-559.11 343.91,-552.12 343.91,-552.12"/>
</g>
<!-- TransactionManager&#45;&gt;TransactionOperationEnum -->
<g id="edge24" class="edge" data-name="TransactionManager-&gt;TransactionOperationEnum">
<path fill="none" stroke="black" d="M197.74,-672.33C166.19,-607.79 124.4,-522.33 97.16,-466.6" stroke-dasharray="5,2"/>
<polygon fill="black" stroke="black" points="92.91,-457.92 101.35,-464.92 95.11,-462.41 97.3,-466.9 97.3,-466.9 97.3,-466.9 95.11,-462.41 93.26,-468.88 92.91,-457.92 92.91,-457.92"/>
</g>
<!-- TransactionManager&#45;&gt;TransactionList -->
<g id="edge17" class="edge" data-name="TransactionManager-&gt;TransactionList">
<path fill="none" stroke="black" d="M237.61,-672.33C234.66,-598.28 230.62,-496.69 228.53,-444.06"/>
<polygon fill="black" stroke="black" points="228.13,-434.21 233.03,-444.03 228.33,-439.21 228.53,-444.21 228.53,-444.21 228.53,-444.21 228.33,-439.21 224.04,-444.38 228.13,-434.21 228.13,-434.21"/>
<text text-anchor="middle" x="269.4" y="-573.5" font-family="Arial" font-size="9.00">TRANSACTIONS</text>
</g>
<!-- DataRepository -->
<g id="node17" class="node" pointer-events="visible" data-name="DataRepository">
<polygon fill="none" stroke="black" points="623.58,-971.9 623.58,-1103.9 862.71,-1103.9 862.71,-971.9 623.58,-971.9"/>
<text text-anchor="middle" x="743.14" y="-1090.9" font-family="Arial" font-size="10.00">DataRepository</text>
<polyline fill="none" stroke="black" points="623.58,-1083.9 862.71,-1083.9"/>
<text text-anchor="start" x="631.58" y="-1070.9" font-family="Arial" font-size="10.00">- INSTANCE: DataRepository</text>
<polyline fill="none" stroke="black" points="623.58,-1063.9 862.71,-1063.9"/>
<text text-anchor="start" x="631.58" y="-1050.9" font-family="Arial" font-size="10.00">+ getInstance(): DataRepository</text>
<text text-anchor="start" x="631.58" y="-1038.9" font-family="Arial" font-size="10.00">+ generateRandomID(int): String</text>
<text text-anchor="start" x="631.58" y="-1026.9" font-family="Arial" font-size="10.00">+ generateRandom10DigitID(): String</text>
<text text-anchor="start" x="631.58" y="-1014.9" font-family="Arial" font-size="10.00">+ WalkFileSystemTree(InventoryManager): void</text>
<text text-anchor="start" x="631.58" y="-1002.9" font-family="Arial" font-size="10.00">+ WalkFileSystemTree(CustomerManager): void</text>
<text text-anchor="start" x="631.58" y="-990.9" font-family="Arial" font-size="10.00">+ WalkFileSystemTree(TransactionManager): void</text>
<text text-anchor="start" x="631.58" y="-978.9" font-family="Arial" font-size="10.00">+ mapJsonToObjectList(String, Class): List</text>
</g>
<!-- DataRepository&#45;&gt;CustomerManager -->
<g id="edge21" class="edge" data-name="DataRepository-&gt;CustomerManager">
<path fill="none" stroke="black" d="M811.04,-972.18C825.32,-957.16 839.79,-940.81 852.14,-924.6 874.39,-895.4 895.49,-860.56 912.12,-830.72" stroke-dasharray="5,2"/>
<polygon fill="black" stroke="black" points="916.92,-822.04 916.02,-832.97 914.5,-826.42 912.08,-830.8 912.08,-830.8 912.08,-830.8 914.5,-826.42 908.14,-828.62 916.92,-822.04 916.92,-822.04"/>
</g>
<!-- DataRepository&#45;&gt;InventoryManager -->
<g id="edge20" class="edge" data-name="DataRepository-&gt;InventoryManager">
<path fill="none" stroke="black" d="M743.14,-972.01C743.14,-935.42 743.14,-889.23 743.14,-849.6" stroke-dasharray="5,2"/>
<polygon fill="black" stroke="black" points="743.14,-839.67 747.64,-849.67 743.14,-844.67 743.14,-849.67 743.14,-849.67 743.14,-849.67 743.14,-844.67 738.64,-849.67 743.14,-839.67 743.14,-839.67"/>
</g>
<!-- DataRepository&#45;&gt;TransactionManager -->
<g id="edge22" class="edge" data-name="DataRepository-&gt;TransactionManager">
<path fill="none" stroke="black" d="M623.76,-1005.76C562.84,-987.09 488.97,-960.03 428.14,-924.6 396.5,-906.17 365.16,-882.07 337.45,-858.13" stroke-dasharray="5,2"/>
<polygon fill="black" stroke="black" points="330.11,-851.72 340.6,-854.91 333.88,-855.01 337.64,-858.3 337.64,-858.3 337.64,-858.3 333.88,-855.01 334.68,-861.69 330.11,-851.72 330.11,-851.72"/>
</g>
<!-- RuntimeException -->
<g id="node25" class="node" pointer-events="visible" data-name="RuntimeException">
</g>
<!-- InvalidRecordDataException&#45;&gt;RuntimeException -->
<g id="edge8" class="edge" data-name="InvalidRecordDataException-&gt;RuntimeException">
<path fill="none" stroke="black" d="M1505.35,-376.55C1469.52,-317.92 1391.98,-191.05 1358.31,-135.95"/>
<polygon fill="none" stroke="black" points="1361.35,-134.22 1353.15,-127.51 1355.38,-137.87 1361.35,-134.22"/>
<text text-anchor="middle" x="1438.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- InvalidArtOperationException -->
<g id="node19" class="node" pointer-events="visible" data-name="InvalidArtOperationException">
<polygon fill="none" stroke="black" points="1659.56,-376.3 1659.56,-440.3 1898.72,-440.3 1898.72,-376.3 1659.56,-376.3"/>
<text text-anchor="middle" x="1779.14" y="-427.3" font-family="Arial" font-size="10.00">InvalidArtOperationException</text>
<polyline fill="none" stroke="black" points="1659.56,-420.3 1898.72,-420.3"/>
<text text-anchor="start" x="1667.56" y="-407.3" font-family="Arial" font-size="10.00">+ InvalidArtOperationException(String)</text>
<text text-anchor="start" x="1667.56" y="-395.3" font-family="Arial" font-size="10.00">+ InvalidArtOperationException(String, Throwable)</text>
<text text-anchor="start" x="1667.56" y="-383.3" font-family="Arial" font-size="10.00">+ InvalidArtOperationException(Throwable)</text>
</g>
<!-- InvalidArtOperationException&#45;&gt;RuntimeException -->
<g id="edge9" class="edge" data-name="InvalidArtOperationException-&gt;RuntimeException">
<path fill="none" stroke="black" d="M1757.2,-376.46C1733.71,-345.09 1693.97,-296.55 1651.14,-263.8 1562.8,-196.25 1440.29,-145.6 1379.48,-122.81"/>
<polygon fill="none" stroke="black" points="1380.88,-119.59 1370.28,-119.4 1378.45,-126.16 1380.88,-119.59"/>
<text text-anchor="middle" x="1636.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- InvalidTransactionException -->
<g id="node20" class="node" pointer-events="visible" data-name="InvalidTransactionException">
<polygon fill="none" stroke="black" points="883.78,-376.3 883.78,-440.3 1118.5,-440.3 1118.5,-376.3 883.78,-376.3"/>
<text text-anchor="middle" x="1001.14" y="-427.3" font-family="Arial" font-size="10.00">InvalidTransactionException</text>
<polyline fill="none" stroke="black" points="883.78,-420.3 1118.5,-420.3"/>
<text text-anchor="start" x="891.78" y="-407.3" font-family="Arial" font-size="10.00">+ InvalidTransactionException(String)</text>
<text text-anchor="start" x="891.78" y="-395.3" font-family="Arial" font-size="10.00">+ InvalidTransactionException(String, Throwable)</text>
<text text-anchor="start" x="891.78" y="-383.3" font-family="Arial" font-size="10.00">+ InvalidTransactionException(Throwable)</text>
</g>
<!-- InvalidTransactionException&#45;&gt;RuntimeException -->
<g id="edge10" class="edge" data-name="InvalidTransactionException-&gt;RuntimeException">
<path fill="none" stroke="black" d="M1024.88,-376.35C1048.94,-345.99 1088.09,-299.2 1127.14,-263.8 1185.22,-211.16 1261.37,-160.16 1305.71,-131.98"/>
<polygon fill="none" stroke="black" points="1307.34,-135.1 1313.93,-126.8 1303.6,-129.18 1307.34,-135.1"/>
<text text-anchor="middle" x="1175.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- InvalidTransOperationException -->
<g id="node21" class="node" pointer-events="visible" data-name="InvalidTransOperationException">
<polygon fill="none" stroke="black" points="1136.17,-376.3 1136.17,-440.3 1388.12,-440.3 1388.12,-376.3 1136.17,-376.3"/>
<text text-anchor="middle" x="1262.14" y="-427.3" font-family="Arial" font-size="10.00">InvalidTransOperationException</text>
<polyline fill="none" stroke="black" points="1136.17,-420.3 1388.12,-420.3"/>
<text text-anchor="start" x="1144.17" y="-407.3" font-family="Arial" font-size="10.00">+ InvalidTransOperationException(String)</text>
<text text-anchor="start" x="1144.17" y="-395.3" font-family="Arial" font-size="10.00">+ InvalidTransOperationException(String, Throwable)</text>
<text text-anchor="start" x="1144.17" y="-383.3" font-family="Arial" font-size="10.00">+ InvalidTransOperationException(Throwable)</text>
</g>
<!-- InvalidTransOperationException&#45;&gt;RuntimeException -->
<g id="edge11" class="edge" data-name="InvalidTransOperationException-&gt;RuntimeException">
<path fill="none" stroke="black" d="M1270.4,-376.55C1286.02,-318.4 1319.67,-193.16 1334.66,-137.34"/>
<polygon fill="none" stroke="black" points="1338.04,-138.25 1337.26,-127.68 1331.28,-136.43 1338.04,-138.25"/>
<text text-anchor="middle" x="1322.9" y="-237.7" font-family="Arial" font-size="9.00">extends</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 40 KiB