Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'github/develop-fokus' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
thanosa75 committed Aug 5, 2019
2 parents 329de82 + 0910ea0 commit 5b74e57
Show file tree
Hide file tree
Showing 14 changed files with 260 additions and 144 deletions.
11 changes: 9 additions & 2 deletions csp-apps/rt/rt-adapter-emitter/README.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

https://gitlab.fokus.fraunhofer.de/EU-CSP/csp-apps.git
https://github.com/melicertes/csp.git

#to make
mvn clean install -DskipTests

#to run this
java -jar rt-emitter-adapter-0.4.0-SNAPSHOT-exec.jar
java -jar rt-emitter-adapter-4.0.7-SNAPSHOT-exec.jar


REST API
Expand All @@ -15,3 +15,10 @@ mvn clean install -DskipTests
http://csp-rtemitter:8081/rt/emitter/test/3 POST PUT new Incident TEST copy from ticket nummer 3
http://localhost:8081/rt/adapter/alltest/927 with ticket nummer 3


cd /opt/csp/modules/rtf9918a2f540b/
docker-compose stop rt-adapter
docker-compose start rt-adapter
docker exec -it csp-rt /bin/sh
wget http://csp-rt_adapter:8081/rt/adapter/alltest/22

4 changes: 2 additions & 2 deletions csp-apps/rt/rt-adapter-emitter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.fraunhofer.csp</groupId>
<artifactId>rt</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.7-SNAPSHOT</version>
</parent>

<name>rt-emitter-adapter</name>
<description>Project Spring Boot RT emitter and adapter</description>
<artifactId>rt-emitter-adapter</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.7-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void error(final String msg) {
System.out.println("[ERROR]: " + msg);
}

@SuppressWarnings("unused")
public void info(final String msg) {
System.out.println("[INFO]: " + msg);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.fraunhofer.csp.rt.api;

import java.util.Arrays;
import java.util.List;
import java.util.UUID;

import org.joda.time.DateTime;
Expand Down Expand Up @@ -88,6 +90,13 @@ public ResponseEntity<?> doAllTestTicketById(@PathVariable String ticketid) {

String message = rtAppClient.getMessage(ticketid);
LOG.debug("doAllTestTicketById:got message:" + message);
List<String> comments = rtAppClient.getComments(ticketid);
if (comments != null && comments.size() > 0) {
LOG.debug("doAllTestTicketById:got comments:" + comments.size());
for (String comment : comments) {
LOG.debug("doAllTestTicketById:got comment:" + comment);
}
}
String response = rtAppClient.callRtNewReportTest();
LOG.debug("doAllTestTicketById:callRtNewReportTest:" + response);

Expand All @@ -109,10 +118,12 @@ public ResponseEntity<?> doAllTestTicketById(@PathVariable String ticketid) {
LOG.debug("doAllTestTicketById:callRtClientTicketsTest:" + response);

incident.setUUID(UUID.randomUUID().toString());
incident.setSubject("test subject:" + new DateTime());
incident.setSubject("test subject from doAllTest:" + new DateTime());
response = rtAppClient.addRtTicket(incident, "demo1-csp:rt", RtQueues.INCIDENT_QUEUE.toString());

rtAppClient.addMessage2Incident(response, "test message:" + new DateTime());
rtAppClient.addComment2Incident(response, "test message:" + new DateTime());
List<String> mycomments = Arrays.asList("Hello", "World!", "How", "Are", "You");
rtAppClient.updateComments2Incident(response, mycomments);

ResponseEntity<String> responseEntity = new ResponseEntity<>("doAllTestTicketById done", HttpStatus.OK);
LOG.debug("################doAllTestTicketById END#####################");
Expand Down
Loading

0 comments on commit 5b74e57

Please sign in to comment.