Skip to content

Commit c5b09ed

Browse files
author
Vasile Baluta
committed
rebase
2 parents 31460ab + 65e2a0f commit c5b09ed

File tree

93 files changed

+4094
-776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4094
-776
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ target/
1717

1818
# Others
1919
derby.log
20+
work/
2021

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ before_install:
1313
- chmod +x pom.xml
1414

1515
script:
16-
- mvn -DsomeModule.test.excludes="**/FlowTest.java, **/FlowTest2.java, **/TrafficGeneratedTest.java, **/FlowTestExternalComposition.java" test
16+
- mvn -DsomeModule.test.excludes="**/FlowTest.java, **/FlowTest2.java, **/TrafficGeneratedTest.java, **/FlowTestExternalComposition.java, **/FlowTestTestExecution.java, **/FlowSourceChangeObject.java" test
1717
- mvn -DsomeModule.test.includes="**/FlowTest.java" test
1818
- mvn -DsomeModule.test.includes="**/FlowTest2.java" test
1919
- mvn -DsomeModule.test.includes="**/TrafficGeneratedTest.java" test
20-
- mvn -DsomeModule.test.includes="**/FlowTestExternalComposition.java" test
20+
- mvn -DsomeModule.test.includes="**/FlowTestExternalComposition.java" test
21+
- mvn -DsomeModule.test.includes="**/FlowSourceChangeObject.java" test
22+
- mvn -DsomeModule.test.includes="**/FlowTestTestExecution.java" test

pom.xml

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.ericsson.ei</groupId>
55
<artifactId>eiffel-intelligence</artifactId>
6-
<version>0.0.1-SNAPSHOT</version>
6+
<version>0.0.1</version>
77

88
<parent>
99
<groupId>org.springframework.boot</groupId>
1010
<artifactId>spring-boot-starter-parent</artifactId>
11-
<version>1.5.4.RELEASE</version>
11+
<version>1.5.5.RELEASE</version>
1212
<relativePath/> <!-- .. lookup parent from repository -->
1313
</parent>
1414

1515
<properties>
1616
<java.version>1.8</java.version>
17-
<plugin-version>0.8.6</plugin-version>
17+
<plugin-version>0.10.11</plugin-version>
1818
<output-relative-path>src/main/java</output-relative-path>
19-
<raml-path>src/main/resources/public/raml/subscription.raml</raml-path>
19+
<raml-path>src/main/resources/public/raml/instance_info.raml</raml-path>
20+
<raml-path>src/main/resources/public/raml/eiffel-intelligence.raml</raml-path>
2021
<base-package>com.ericsson.ei.controller</base-package>
2122
</properties>
2223

@@ -72,7 +73,7 @@
7273
<dependency>
7374
<groupId>com.fasterxml.jackson.core</groupId>
7475
<artifactId>jackson-databind</artifactId>
75-
<version>2.8.3</version>
76+
<version>2.8.9</version>
7677
</dependency>
7778

7879
<dependency>
@@ -101,11 +102,11 @@
101102
<version>1.10.19</version>
102103
</dependency>
103104

104-
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-io -->
105+
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
105106
<dependency>
106-
<groupId>org.apache.commons</groupId>
107+
<groupId>commons-io</groupId>
107108
<artifactId>commons-io</artifactId>
108-
<version>1.3.2</version>
109+
<version>2.5</version>
109110
</dependency>
110111

111112
<!-- <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId>
@@ -135,13 +136,9 @@
135136
<artifactId>joda-time</artifactId>
136137
</dependency>
137138
<dependency>
138-
<groupId>com.fasterxml.jackson.core</groupId>
139-
<artifactId>jackson-databind</artifactId>
140-
</dependency>
141-
<dependency>
142-
<groupId>commons-lang</groupId>
143-
<artifactId>commons-lang</artifactId>
144-
<version>2.6</version>
139+
<groupId>org.apache.commons</groupId>
140+
<artifactId>commons-lang3</artifactId>
141+
<version>3.5</version>
145142
</dependency>
146143
<dependency>
147144
<groupId>io.springfox</groupId>
@@ -168,7 +165,12 @@
168165
<version>2.0.0</version>
169166
<scope>test</scope>
170167
</dependency>
171-
168+
<dependency>
169+
<groupId>org.projectlombok</groupId>
170+
<artifactId>lombok</artifactId>
171+
<version>1.16.16</version>
172+
<scope>provided</scope>
173+
</dependency>
172174
</dependencies>
173175
<build>
174176
<plugins>
@@ -177,7 +179,7 @@
177179
<artifactId>spring-boot-maven-plugin</artifactId>
178180
</plugin>
179181

180-
<!-- PhoenixNAP RAML Code Generator plugin used to generate sources
182+
<!-- PhoenixNAP RAML Code Generator plugin used to generate sources
181183
from raml -->
182184
<plugin>
183185
<groupId>com.phoenixnap.oss</groupId>
@@ -194,13 +196,22 @@
194196
<baseUri>/</baseUri>
195197
<seperateMethodsByContentType>false</seperateMethodsByContentType>
196198
<useJackson1xCompatibility>false</useJackson1xCompatibility>
199+
<rule>com.phoenixnap.oss.ramlapisync.generation.rules.Spring4ControllerInterfaceRule</rule>
200+
<generationConfig>
201+
<useCommonsLang3>true</useCommonsLang3>
202+
</generationConfig>
197203
</configuration>
204+
<executions>
205+
<execution>
206+
<id>generate-springmvc-controllers</id>
207+
<phase>generate-sources</phase>
208+
<goals>
209+
<goal>generate-springmvc-endpoints</goal>
210+
</goals>
211+
</execution>
212+
</executions>
198213
</plugin>
199-
<!-- Required to build the executable jar file -->
200-
<plugin>
201-
<groupId>org.springframework.boot</groupId>
202-
<artifactId>spring-boot-maven-plugin</artifactId>
203-
</plugin>
214+
204215
<!-- required for adding generated sources -->
205216
<plugin>
206217
<groupId>org.codehaus.mojo</groupId>
@@ -220,22 +231,6 @@
220231
</execution>
221232
</executions>
222233
</plugin>
223-
<plugin>
224-
<groupId>com.phoenixnap.oss</groupId>
225-
<artifactId>springmvc-raml-plugin</artifactId>
226-
<configuration>
227-
<rule>com.phoenixnap.oss.ramlapisync.generation.rules.Spring4ControllerInterfaceRule</rule>
228-
</configuration>
229-
<executions>
230-
<execution>
231-
<id>generate-springmvc-controllers</id>
232-
<phase>generate-sources</phase>
233-
<goals>
234-
<goal>generate-springmvc-endpoints</goal>
235-
</goals>
236-
</execution>
237-
</executions>
238-
</plugin>
239234

240235
<plugin>
241236
<groupId>org.apache.maven.plugins</groupId>
@@ -253,4 +248,4 @@
253248

254249
</plugins>
255250
</build>
256-
</project>
251+
</project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
package com.ericsson.ei.controller;
3+
4+
import com.ericsson.ei.controller.model.QueryResponse;
5+
import org.springframework.http.ResponseEntity;
6+
import org.springframework.web.bind.annotation.RequestMapping;
7+
import org.springframework.web.bind.annotation.RequestMethod;
8+
import org.springframework.web.bind.annotation.RequestParam;
9+
import org.springframework.web.bind.annotation.RestController;
10+
11+
12+
/**
13+
* No description
14+
* (Generated with springmvc-raml-parser v.0.10.11)
15+
*
16+
*/
17+
@RestController
18+
@RequestMapping(value = "/query/aggregatedObject", produces = "application/json")
19+
public interface AggregatedObjectController {
20+
21+
22+
/**
23+
* No description
24+
*
25+
*/
26+
@RequestMapping(value = "", method = RequestMethod.GET)
27+
public ResponseEntity<QueryResponse> getQueryAggregatedObject(
28+
@RequestParam
29+
String id);
30+
31+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Copyright 2017 Ericsson AB.
3+
For a full list of individual contributors, please see the commit history.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
*/
14+
package com.ericsson.ei.controller;
15+
16+
import java.util.ArrayList;
17+
18+
import org.slf4j.Logger;
19+
import org.slf4j.LoggerFactory;
20+
import org.springframework.beans.factory.annotation.Autowired;
21+
import org.springframework.http.HttpStatus;
22+
import org.springframework.http.ResponseEntity;
23+
import org.springframework.stereotype.Component;
24+
import org.springframework.web.bind.annotation.CrossOrigin;
25+
import org.springframework.web.bind.annotation.RequestParam;
26+
27+
import com.ericsson.ei.controller.model.QueryResponse;
28+
import com.ericsson.ei.queryservice.ProcessAggregatedObject;
29+
30+
/**
31+
* This class represents the REST GET mechanism to extract the aggregated data
32+
* on the basis of the ID from the aggregatedObject.
33+
*
34+
*/
35+
@Component
36+
@CrossOrigin
37+
public class AggregatedObjectControllerImpl implements AggregatedObjectController {
38+
39+
static Logger log = (Logger) LoggerFactory.getLogger(AggregatedObjectControllerImpl.class);
40+
41+
@Autowired
42+
private ProcessAggregatedObject processAggregatedObject;
43+
44+
/**
45+
* This method is responsible for the REST Get mechanism to extract the
46+
* aggregated data on the basis of the ID from the aggregatedObject.
47+
*
48+
* @param id
49+
* @return ResponseEntity
50+
*/
51+
public ResponseEntity<QueryResponse> getQueryAggregatedObject(@RequestParam("ID") final String id) {
52+
ArrayList<String> response = processAggregatedObject.processQueryAggregatedObject(id);
53+
log.info("The response is : " + response.toString());
54+
return new ResponseEntity(response.toString(), HttpStatus.OK);
55+
}
56+
57+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
package com.ericsson.ei.controller;
3+
4+
import com.ericsson.ei.controller.model.QueryResponse;
5+
import org.springframework.http.ResponseEntity;
6+
import org.springframework.web.bind.annotation.RequestMapping;
7+
import org.springframework.web.bind.annotation.RequestMethod;
8+
import org.springframework.web.bind.annotation.RequestParam;
9+
import org.springframework.web.bind.annotation.RestController;
10+
11+
12+
/**
13+
* No description
14+
* (Generated with springmvc-raml-parser v.0.10.11)
15+
*
16+
*/
17+
@RestController
18+
@RequestMapping(value = "/query/missedNotifications", produces = "application/json")
19+
public interface MissedNotificationController {
20+
21+
22+
/**
23+
* List the missed notification based on the subscriptionName in the query parameter.
24+
*
25+
*/
26+
@RequestMapping(value = "", method = RequestMethod.GET)
27+
public ResponseEntity<QueryResponse> getQueryMissedNotifications(
28+
@RequestParam
29+
String subscriptionName);
30+
31+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
Copyright 2017 Ericsson AB.
3+
For a full list of individual contributors, please see the commit history.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
*/
14+
package com.ericsson.ei.controller;
15+
16+
import java.util.ArrayList;
17+
18+
import org.slf4j.Logger;
19+
import org.slf4j.LoggerFactory;
20+
import org.springframework.beans.factory.annotation.Autowired;
21+
import org.springframework.http.HttpStatus;
22+
import org.springframework.http.ResponseEntity;
23+
import org.springframework.stereotype.Component;
24+
import org.springframework.web.bind.annotation.CrossOrigin;
25+
import org.springframework.web.bind.annotation.RequestParam;
26+
27+
import com.ericsson.ei.controller.model.QueryResponse;
28+
import com.ericsson.ei.queryservice.ProcessMissedNotification;
29+
30+
/**
31+
* This class represents the REST GET mechanism to extract the aggregated data
32+
* on the basis of the SubscriptionName from the Missed Notification Object.
33+
*
34+
*/
35+
@Component
36+
@CrossOrigin
37+
public class MissedNotificationControllerImpl implements MissedNotificationController {
38+
39+
static Logger log = (Logger) LoggerFactory.getLogger(MissedNotificationControllerImpl.class);
40+
41+
@Autowired
42+
private ProcessMissedNotification processMissedNotification;
43+
44+
/**
45+
* This method is responsible for the REST GET mechanism to extract the data on
46+
* the basis of the SubscriptionName from the Missed Notification Object.
47+
*
48+
* @param subscriptionName
49+
* @return ResponseEntity
50+
*/
51+
public ResponseEntity<QueryResponse> getQueryMissedNotifications(
52+
@RequestParam("SubscriptionName") final String subscriptionName) {
53+
ArrayList response = processMissedNotification.processQueryMissedNotification(subscriptionName);
54+
log.info("The response is : " + response.toString());
55+
return new ResponseEntity(response.toString(), HttpStatus.OK);
56+
}
57+
58+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
package com.ericsson.ei.controller;
3+
4+
import org.springframework.http.ResponseEntity;
5+
import org.springframework.web.bind.annotation.RequestMapping;
6+
import org.springframework.web.bind.annotation.RequestMethod;
7+
import org.springframework.web.bind.annotation.RequestParam;
8+
import org.springframework.web.bind.annotation.RestController;
9+
10+
11+
/**
12+
* No description
13+
* (Generated with springmvc-raml-parser v.0.10.11)
14+
*
15+
*/
16+
@RestController
17+
@RequestMapping(value = "/jmespathrule/ruleCheck", produces = "application/json")
18+
public interface RuleCheckController {
19+
20+
21+
/**
22+
* No description
23+
*
24+
*/
25+
@RequestMapping(value = "", method = RequestMethod.POST)
26+
public ResponseEntity<?> updateJmespathruleRuleCheck(
27+
@RequestParam
28+
String rule,
29+
@RequestParam
30+
String jsonContent);
31+
32+
}

0 commit comments

Comments
 (0)