Skip to content

Commit b7a27d1

Browse files
committed
digital double logic
1 parent e61fc4b commit b7a27d1

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

java-ai/src/main/java/oracleai/DigitalDoubleService.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,20 @@ public class DigitalDoubleService {
2323

2424
public void updateDigitalDoubleData(DigitalDoubleDownloadInfo info) {
2525
String url = AIApplication.ORDS_OMLOPSENDPOINT_URL + "update_digital_double_data/";
26-
2726
HttpHeaders headers = new HttpHeaders();
2827
headers.setContentType(MediaType.APPLICATION_JSON);
29-
3028
Map<String, Object> requestBody = new HashMap<>();
3129
requestBody.put("p_participant_email", info.getEmail());
3230
requestBody.put("p_modelglburl_out", info.getModelGlbUrl());
3331
requestBody.put("p_modelfbxurl_out", info.getModelFbxUrl());
3432
requestBody.put("p_modelusdzurl_out", info.getModelUsdzUrl());
3533
requestBody.put("p_thumbnailurl_out", info.getThumbnailUrl());
3634
requestBody.put("p_videourl_out", info.getAnimatedVideoLocation());
37-
requestBody.put("p_video_out", null); // Optional field
38-
requestBody.put("p_similar_image_out", null);
39-
40-
// Create the HttpEntity that includes headers and the body
35+
requestBody.put("p_video_out", "");
36+
requestBody.put("p_similar_image_out", "");
4137
HttpEntity<Map<String, Object>> entity = new HttpEntity<>(requestBody, headers);
42-
RestTemplate restTemplate = new RestTemplate();
38+
RestTemplate restTemplate = new RestTemplate();
4339
ResponseEntity<String> response = restTemplate.postForEntity(url, entity, String.class);
44-
45-
// Handle the response (optional)
4640
if (response.getStatusCode().is2xxSuccessful()) {
4741
System.out.println("Request successful: " + response.getBody());
4842
} else {

java-ai/src/main/java/oracleai/DigitalDoubles.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public ResponseEntity<byte[]> getImage(@PathVariable String filename) throws IOE
9393
@PostMapping("/downloaddigitaldouble")
9494
public String downloaddigitaldouble(@RequestParam("email") String email, Model model) throws Exception {
9595
model.addAttribute("fbxlink", ORDSCalls.getDigitalDoubleData(email));
96-
model.addAttribute("fbxtest", "fbx link");
96+
model.addAttribute("fbxtext", "fbx link");
9797
model.addAttribute("mp4link", ImageProcessor.objectStoreLocation + email);
9898
model.addAttribute("mp4text", "mp4 link");
9999
// return "resultswithlinkpage";

java-ai/src/main/resources/templates/digitaldoubleresults.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
<body>
7777
<div class="container">
7878
<h1>Your Digital Doubles For Download......</h1>
79-
<h4>*Note that links will not be active until assets are ready for download. Updates on status be emailed nightly.</h4>
79+
<h4>*Note that links will not be active until assets are ready for download.</h4>
80+
<h4>*Updates on status will be emailed nightly.</h4>
8081

8182
<div class="w3-container">
8283
<a th:href="@{${fbxlink}}" th:text="${fbxtext}">Your 3D Digital Double</a>

0 commit comments

Comments
 (0)