Skip to content

Commit 8130121

Browse files
committed
upgrade weaver
1 parent 0126bf8 commit 8130121

3 files changed

Lines changed: 72 additions & 71 deletions

File tree

pom.xml

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
<project
2-
xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
53

6-
<modelVersion>4.0.0</modelVersion>
7-
<groupId>edu.tamu</groupId>
8-
<artifactId>status-system</artifactId>
9-
<version>0.0.1</version>
10-
<name>Library-Service-Status-System</name>
11-
<description>A System for monitoring and reporting the status of Library Services</description>
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>edu.tamu</groupId>
6+
<artifactId>status-system</artifactId>
7+
<version>0.0.1</version>
8+
<name>Library-Service-Status-System</name>
9+
<description>A System for monitoring and reporting the status of Library Services</description>
1210

13-
<parent>
14-
<groupId>edu.tamu.weaverframework</groupId>
15-
<artifactId>weaver-webservice-parent</artifactId>
16-
<version>1.2.0-RC2-SNAPSHOT</version>
17-
</parent>
11+
<parent>
12+
<groupId>edu.tamu.weaverframework</groupId>
13+
<artifactId>weaver-webservice-parent</artifactId>
14+
<version>1.2.0-RC-SNAPSHOT</version>
15+
</parent>
1816

19-
<properties>
20-
<start-class>edu.tamu.app.WebServerInit</start-class>
21-
</properties>
17+
<properties>
18+
<start-class>edu.tamu.app.WebServerInit</start-class>
19+
</properties>
2220

23-
<packaging>war</packaging>
21+
<packaging>war</packaging>
2422

25-
<repositories>
26-
<repository>
27-
<id>tamu-releases</id>
28-
<url>https://maven.library.tamu.edu/content/repositories/releases</url>
29-
</repository>
30-
<repository>
31-
<id>tamu-snapshots</id>
32-
<url>https://maven.library.tamu.edu/content/repositories/snapshots</url>
33-
</repository>
34-
</repositories>
23+
<repositories>
24+
<repository>
25+
<id>tamu-releases</id>
26+
<url>https://maven.library.tamu.edu/content/repositories/releases</url>
27+
</repository>
28+
<repository>
29+
<id>tamu-snapshots</id>
30+
<url>https://maven.library.tamu.edu/content/repositories/snapshots</url>
31+
</repository>
32+
</repositories>
3533

36-
<dependencies>
37-
<dependency>
38-
<groupId>edu.tamu.weaverframework</groupId>
39-
<artifactId>weaver-webservice-core</artifactId>
40-
<version>1.2.0-RC2-SNAPSHOT</version>
41-
</dependency>
42-
<dependency>
43-
<groupId>org.postgresql</groupId>
44-
<artifactId>postgresql</artifactId>
45-
<version>9.4.1211</version>
46-
</dependency>
47-
</dependencies>
34+
<dependencies>
35+
<dependency>
36+
<groupId>edu.tamu.weaverframework</groupId>
37+
<artifactId>weaver-webservice-core</artifactId>
38+
<version>1.2.0-RC-SNAPSHOT</version>
39+
</dependency>
4840

49-
<build>
50-
<finalName>ROOT</finalName>
51-
<plugins>
52-
<plugin>
53-
<groupId>org.apache.maven.plugins</groupId>
54-
<artifactId>maven-compiler-plugin</artifactId>
55-
<configuration>
56-
<source>1.8</source>
57-
<target>1.8</target>
58-
</configuration>
59-
</plugin>
60-
<plugin>
61-
<groupId>org.springframework.boot</groupId>
62-
<artifactId>spring-boot-maven-plugin</artifactId>
63-
</plugin>
64-
<plugin>
65-
<groupId>org.apache.maven.plugins</groupId>
66-
<artifactId>maven-war-plugin</artifactId>
67-
<configuration>
68-
<failOnMissingWebXml>false</failOnMissingWebXml>
69-
</configuration>
70-
</plugin>
71-
</plugins>
72-
</build>
41+
<dependency>
42+
<groupId>org.postgresql</groupId>
43+
<artifactId>postgresql</artifactId>
44+
<version>9.4.1211</version>
45+
</dependency>
46+
47+
</dependencies>
48+
49+
<build>
50+
<finalName>ROOT</finalName>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.apache.maven.plugins</groupId>
54+
<artifactId>maven-compiler-plugin</artifactId>
55+
<configuration>
56+
<source>1.8</source>
57+
<target>1.8</target>
58+
</configuration>
59+
</plugin>
60+
<plugin>
61+
<groupId>org.springframework.boot</groupId>
62+
<artifactId>spring-boot-maven-plugin</artifactId>
63+
</plugin>
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-war-plugin</artifactId>
67+
<configuration>
68+
<failOnMissingWebXml>false</failOnMissingWebXml>
69+
</configuration>
70+
</plugin>
71+
</plugins>
72+
</build>
7373

7474
</project>

src/main/java/edu/tamu/app/controller/NoteController.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class NoteController {
3939

4040
@Autowired
4141
private NoteRepo noteRepo;
42-
42+
4343
@Autowired
4444
private ServiceRepo serviceRepo;
4545

@@ -72,7 +72,7 @@ public ApiResponse create(@ApiValidatedModel Note note, @ApiCredentials Credenti
7272
@Auth(role = "ROLE_SERVICE_MANAGER")
7373
public ApiResponse update(@ApiValidatedModel Note note) {
7474
note = noteRepo.save(note);
75-
ApiResponse response = new ApiResponse(SUCCESS, noteRepo.getOne(note.getId()));
75+
ApiResponse response = new ApiResponse(SUCCESS, noteRepo.getOne(note.getId()));
7676
simpMessagingTemplate.convertAndSend("/channel/note/" + note.getId(), response);
7777
return response;
7878
}
@@ -85,24 +85,24 @@ public ApiResponse remove(@ApiValidatedModel Note note) {
8585
simpMessagingTemplate.convertAndSend("/channel/service" + note.getService().getId(), new ApiResponse(SUCCESS, serviceRepo.getOne(note.getService().getId())));
8686
return new ApiResponse(SUCCESS);
8787
}
88-
88+
8989
@ApiMapping("/page")
90-
@Auth(role="ROLE_ANONYMOUS")
90+
@Auth(role = "ROLE_ANONYMOUS")
9191
public ApiResponse page(@ApiData JsonNode dataNode) {
9292
Direction sortDirection;
9393
if (dataNode.get("direction").get("direction").asText().equals("ASC")) {
9494
sortDirection = Sort.Direction.ASC;
9595
} else {
9696
sortDirection = Sort.Direction.DESC;
9797
}
98-
98+
9999
Map<String, String[]> filters = new HashMap<String, String[]>();
100100
filters.put("title", arrayNodeToStringArray((ArrayNode) dataNode.get("filters").get("title")));
101101
FilteredPageRequest filteredPageRequest = new FilteredPageRequest(dataNode.get("page").get("number").asInt(), dataNode.get("page").get("size").asInt(), sortDirection, dataNode.get("direction").get("properties").asText(), filters);
102102
Page<Note> notes = noteRepo.findAll(filteredPageRequest);
103103
return new ApiResponse(SUCCESS, notes);
104104
}
105-
105+
106106
private String[] arrayNodeToStringArray(ArrayNode arrayNode) {
107107
String[] array = new String[arrayNode.size()];
108108
Iterator<JsonNode> arrayIterator = arrayNode.elements();

src/main/java/edu/tamu/app/model/AppUser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public AppUser(String uin) {
9191
*/
9292
public AppUser(String email, String firstName, String lastName, String role) {
9393
super();
94+
setUin(email);
9495
setEmail(email);
9596
setFirstName(firstName);
9697
setLastName(lastName);

0 commit comments

Comments
 (0)