Skip to content

Commit ae9f5cc

Browse files
author
Derek Wasinger
committed
working create engagement
1 parent d62d367 commit ae9f5cc

File tree

3 files changed

+42
-17
lines changed

3 files changed

+42
-17
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.redhat.labs.omp.models;
2+
3+
import javax.json.bind.annotation.JsonbProperty;
4+
import javax.json.bind.annotation.JsonbTransient;
5+
import javax.validation.constraints.NotBlank;
6+
7+
import lombok.AllArgsConstructor;
8+
import lombok.Builder;
9+
import lombok.Data;
10+
import lombok.NoArgsConstructor;
11+
12+
@Data
13+
@Builder
14+
@NoArgsConstructor
15+
@AllArgsConstructor
16+
public class EngagementUser {
17+
18+
@NotBlank
19+
@JsonbProperty("first_name")
20+
private String firstName;
21+
@NotBlank
22+
@JsonbProperty("last_name")
23+
private String lastName;
24+
@NotBlank
25+
@JsonbProperty("email")
26+
private String email;
27+
@NotBlank
28+
@JsonbProperty("role")
29+
private String role;
30+
@JsonbTransient
31+
private String username;
32+
@JsonbTransient
33+
private String group;
34+
@JsonbTransient
35+
private String expirationDate;
36+
37+
public String getUsername() {
38+
return email.substring(email.indexOf("@"));
39+
}
40+
41+
}

src/main/java/com/redhat/labs/omp/resources/LegacyFileResource.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ public Response getFileFromGitByName(@QueryParam("name") String fileName, @Query
3838
return Response.status(HttpStatus.SC_NOT_FOUND).build();
3939
}
4040

41-
// decode the file
42-
File file = optional.get();
43-
file.decodeFileAttributes();
44-
45-
return Response.status(HttpStatus.SC_OK).entity(file).build();
41+
return Response.status(HttpStatus.SC_OK).entity(optional.get()).build();
4642

4743
}
4844

src/main/java/com/redhat/labs/omp/service/EngagementService.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,6 @@ public class EngagementService {
4646
@Inject
4747
FileService fileService;
4848

49-
/*
50-
*
51-
*
52-
* Start here: Not all files are being generated
53-
*
54-
* looks like they are being read and are in the templatesFiles. just never make to to the commit
55-
*
56-
*
57-
*
58-
*/
59-
60-
6149
// create an engagement
6250
public Project createEngagement(Engagement engagement) {
6351

0 commit comments

Comments
 (0)