update docs
This commit is contained in:
10
.vscode/launch.json
vendored
10
.vscode/launch.json
vendored
@@ -23,7 +23,15 @@
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "ApplicationView",
|
||||
"name": "ApplicationView-linux",
|
||||
"request": "launch",
|
||||
"mainClass": "edu.inventorym.ApplicationView",
|
||||
"projectName": "UiView",
|
||||
"vmArgs": " --module-path /home/sherwinp/workspace/javafx-sdk/lib --add-modules ALL-MODULE-PATH --enable-native-access=javafx.web,javafx.controls,javafx.media,javafx.graphics -Dcom.sun.management.jmxremote=false -Djava.awt.headless=true -XX:+DisableAttachMechanism"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "ApplicationView-windows",
|
||||
"request": "launch",
|
||||
"mainClass": "edu.inventorym.ApplicationView",
|
||||
"projectName": "UiView",
|
||||
|
||||
@@ -216,7 +216,7 @@ public class DataRepository {
|
||||
public final static String getPath() {
|
||||
String home = System.getenv("HOME") != null ? System.getenv("HOME")
|
||||
: System.getenv("HOMEDRIVE") + System.getenv("HOMEPATH");
|
||||
return home.replace('\\', '/') + "/workspace/inventorym/Api/src/resources/db";
|
||||
return home.replace('\\', '/') + "/workspace/inventorym/Ui/src/resources/db";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
public interface ApiController { // SINGLETON
|
||||
public class ApiController { // SINGLETON
|
||||
|
||||
@Operation(summary = "Get status Inventory Loaded", description = "Returns status Inventory Loaded.")
|
||||
@ApiResponse(responseCode = "200", description = "loaded")
|
||||
@@ -45,16 +45,9 @@ public interface ApiController { // SINGLETON
|
||||
InventoryManager.getInstance().add(make(new Sculpture()));
|
||||
InventoryManager.getInstance().add(make(new Sculpture()));
|
||||
InventoryManager.getInstance().add(make(new Sculpture()));
|
||||
}
|
||||
return new ResponseEntity<>("Resource loaded!", HttpStatus.OK);
|
||||
}
|
||||
|
||||
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().save();
|
||||
}
|
||||
|
||||
/* Customers */
|
||||
CustomerManager.getInstance().load();
|
||||
@@ -68,6 +61,16 @@ public interface ApiController { // SINGLETON
|
||||
CustomerManager.getInstance().save();
|
||||
}
|
||||
|
||||
return new ResponseEntity<>("Resource loaded!", HttpStatus.OK);
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
/*
|
||||
* 2. Remove art object from the inventory
|
||||
*/
|
||||
|
||||
23
Ui/src/resources/db/customers.json
Normal file
23
Ui/src/resources/db/customers.json
Normal file
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"email": "kate@museum.com",
|
||||
"id": "2020281777",
|
||||
"nameFirst": "Kate",
|
||||
"nameLast": "Demsey",
|
||||
"phone": "310-676-4844"
|
||||
},
|
||||
{
|
||||
"email": "jim@homedeco.com",
|
||||
"id": "5261329301",
|
||||
"nameFirst": "Jim",
|
||||
"nameLast": "Gumbly",
|
||||
"phone": "203-676-4844"
|
||||
},
|
||||
{
|
||||
"email": "evan@homedeco.com",
|
||||
"id": "4961460829",
|
||||
"nameFirst": "Evan",
|
||||
"nameLast": "Hao",
|
||||
"phone": "203-676-8943"
|
||||
}
|
||||
]
|
||||
67
Ui/src/resources/db/inventory.json
Normal file
67
Ui/src/resources/db/inventory.json
Normal file
@@ -0,0 +1,67 @@
|
||||
[
|
||||
{
|
||||
"Author": "Dave Janson",
|
||||
"author": "Dave Janson",
|
||||
"created": "2026-01-28T18:21:41.628880822-05:00[America/New_York]",
|
||||
"description": "East Market Square find. Local Author.",
|
||||
"id": "3215738680",
|
||||
"price": 92.0,
|
||||
"title": "Windy Rowing",
|
||||
"type": "DRAWING"
|
||||
},
|
||||
{
|
||||
"Author": "Dave Janson",
|
||||
"author": "Dave Janson",
|
||||
"created": "2026-01-28T18:21:41.628927081-05:00[America/New_York]",
|
||||
"description": "East Market Square find. Local Author.",
|
||||
"id": "5150484617",
|
||||
"price": 102.0,
|
||||
"title": "Different day same thing",
|
||||
"type": "PRINT"
|
||||
},
|
||||
{
|
||||
"Author": "Dave Janson",
|
||||
"author": "Dave Janson",
|
||||
"created": "2026-01-28T18:21:41.628966511-05:00[America/New_York]",
|
||||
"description": "East Market Square find. Local Author.",
|
||||
"id": "4279724246",
|
||||
"price": 51.0,
|
||||
"title": "Walking by the beach.",
|
||||
"type": "PAINTING",
|
||||
"height": 0,
|
||||
"width": 0
|
||||
},
|
||||
{
|
||||
"Author": "Dave Janson",
|
||||
"author": "Dave Janson",
|
||||
"created": "2026-01-28T18:21:41.628997921-05:00[America/New_York]",
|
||||
"description": "East Market Square find. Local Author.",
|
||||
"id": "2561610938",
|
||||
"price": 32.0,
|
||||
"title": "Jolly Romp",
|
||||
"type": "SCULPTURE",
|
||||
"weight": 4.0
|
||||
},
|
||||
{
|
||||
"Author": "Dave Janson",
|
||||
"author": "Dave Janson",
|
||||
"created": "2026-01-28T18:21:41.629066491-05:00[America/New_York]",
|
||||
"description": "East Market Square find. Local Author.",
|
||||
"id": "3819887576",
|
||||
"price": 32.0,
|
||||
"title": "Jolly Romp",
|
||||
"type": "SCULPTURE",
|
||||
"weight": 4.0
|
||||
},
|
||||
{
|
||||
"Author": "Dave Janson",
|
||||
"author": "Dave Janson",
|
||||
"created": "2026-01-28T18:21:41.62908951-05:00[America/New_York]",
|
||||
"description": "East Market Square find. Local Author.",
|
||||
"id": "4329655027",
|
||||
"price": 32.0,
|
||||
"title": "Jolly Romp",
|
||||
"type": "SCULPTURE",
|
||||
"weight": 4.0
|
||||
}
|
||||
]
|
||||
@@ -16,7 +16,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="menu-info"><label><em><a href="http://localhost:8080/swagger-ui.html">http://localhost:8080/swagger-ui.html</a></em></label>|<label>http://localhost:8080/api</label></div>
|
||||
<div id="menu-info"><label><em><a href="http://localhost:8080/swagger-ui.html">http://localhost:8080/swagger-ui.html</a></em></label>|<label><a href="http://localhost:8080/api" >http://localhost:8080/api</a></label></div>
|
||||
<div class="tab-container">
|
||||
<div class="flex-item">1</div>
|
||||
<div class="flex-item">2</div>
|
||||
|
||||
Reference in New Issue
Block a user