generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from hmcts/PUB-2249
PUB-2249 - Add models for MI reporting
- Loading branch information
Showing
5 changed files
with
227 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ publishing { | |
} | ||
|
||
group = 'com.github.hmcts' | ||
version = '2.1.32' | ||
version = '2.1.33' | ||
|
||
java { | ||
toolchain { | ||
|
68 changes: 68 additions & 0 deletions
68
src/main/java/uk/gov/hmcts/reform/pip/model/report/AccountMiData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package uk.gov.hmcts.reform.pip.model.report; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import uk.gov.hmcts.reform.pip.model.account.Roles; | ||
import uk.gov.hmcts.reform.pip.model.account.UserProvenances; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class AccountMiData { | ||
|
||
/** | ||
* The ID of the user as they exist in P&I. | ||
*/ | ||
private UUID userId; | ||
|
||
/** | ||
* The user id of the user as per their provenance system. | ||
*/ | ||
private String provenanceUserId; | ||
|
||
/** | ||
* The Sign in entry system the user was added with. (CFT IDAM, Crime IDAM, P&I AAD). | ||
*/ | ||
private UserProvenances userProvenance; | ||
|
||
/** | ||
* Role of the user, Verified, Internal or Technical. | ||
*/ | ||
private Roles roles; | ||
|
||
/** | ||
* The timestamp of when the user was created. | ||
*/ | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime createdDate; | ||
|
||
/** | ||
* The timestamp when the user was last signed in. | ||
*/ | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime lastSignedInDate; | ||
|
||
@JsonCreator | ||
public AccountMiData( | ||
@JsonProperty("userId") UUID userId, | ||
@JsonProperty("provenanceUserId") String provenanceUserId, | ||
@JsonProperty("userProvenance") UserProvenances userProvenance, | ||
@JsonProperty("roles") Roles roles, | ||
@JsonProperty("createdDate") LocalDateTime createdDate, | ||
@JsonProperty("lastSignedInDate") LocalDateTime lastSignedInDate | ||
) { | ||
this.userId = userId; | ||
this.provenanceUserId = provenanceUserId; | ||
this.userProvenance = userProvenance; | ||
this.roles = roles; | ||
this.createdDate = createdDate; | ||
this.lastSignedInDate = lastSignedInDate; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/uk/gov/hmcts/reform/pip/model/report/AllSubscriptionMiData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package uk.gov.hmcts.reform.pip.model.report; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import uk.gov.hmcts.reform.pip.model.subscription.Channel; | ||
import uk.gov.hmcts.reform.pip.model.subscription.SearchType; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class AllSubscriptionMiData { | ||
|
||
private UUID id; | ||
private Channel channel; | ||
private SearchType searchType; | ||
private String userId; | ||
private String locationName; | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime createdDate; | ||
|
||
@JsonCreator | ||
public AllSubscriptionMiData( | ||
@JsonProperty("id") UUID id, | ||
@JsonProperty("channel") Channel channel, | ||
@JsonProperty("searchType") SearchType searchType, | ||
@JsonProperty("userId") String userId, | ||
@JsonProperty("locationName") String locationName, | ||
@JsonProperty("createdDate") LocalDateTime createdDate | ||
) { | ||
this.id = id; | ||
this.channel = channel; | ||
this.searchType = searchType; | ||
this.userId = userId; | ||
this.locationName = locationName; | ||
this.createdDate = createdDate; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/main/java/uk/gov/hmcts/reform/pip/model/report/LocalSubscriptionMiData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package uk.gov.hmcts.reform.pip.model.report; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import uk.gov.hmcts.reform.pip.model.subscription.Channel; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class LocalSubscriptionMiData { | ||
|
||
private UUID id; | ||
private String searchValue; | ||
private Channel channel; | ||
private String userId; | ||
private String locationName; | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime createdDate; | ||
|
||
@JsonCreator | ||
public LocalSubscriptionMiData( | ||
@JsonProperty("id") UUID id, | ||
@JsonProperty("searchValue") String searchValue, | ||
@JsonProperty("channel") Channel channel, | ||
@JsonProperty("userId") String userId, | ||
@JsonProperty("locationName") String locationName, | ||
@JsonProperty("createdDate") LocalDateTime createdDate | ||
) { | ||
this.id = id; | ||
this.searchValue = searchValue; | ||
this.channel = channel; | ||
this.userId = userId; | ||
this.locationName = locationName; | ||
this.createdDate = createdDate; | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
src/main/java/uk/gov/hmcts/reform/pip/model/report/PublicationMiData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package uk.gov.hmcts.reform.pip.model.report; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import uk.gov.hmcts.reform.pip.model.publication.ArtefactType; | ||
import uk.gov.hmcts.reform.pip.model.publication.Language; | ||
import uk.gov.hmcts.reform.pip.model.publication.ListType; | ||
import uk.gov.hmcts.reform.pip.model.publication.Sensitivity; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@Setter | ||
@SuppressWarnings("PMD.ExcessiveParameterList") | ||
@NoArgsConstructor | ||
public class PublicationMiData { | ||
|
||
private UUID artefactId; | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime displayFrom; | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime displayTo; | ||
private Language language; | ||
private String provenance; | ||
private Sensitivity sensitivity; | ||
private String sourceArtefactId; | ||
private Integer supersededCount; | ||
private ArtefactType type; | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
private LocalDateTime contentDate; | ||
private String locationId; | ||
private String locationName; | ||
private ListType listType; | ||
|
||
@JsonCreator | ||
public PublicationMiData( | ||
@JsonProperty("artefactId") UUID artefactId, | ||
@JsonProperty("displayFrom") LocalDateTime displayFrom, | ||
@JsonProperty("displayTo") LocalDateTime displayTo, | ||
@JsonProperty("language") Language language, | ||
@JsonProperty("provenance") String provenance, | ||
@JsonProperty("sensitivity") Sensitivity sensitivity, | ||
@JsonProperty("sourceArtefactId") String sourceArtefactId, | ||
@JsonProperty("supersededCount") Integer supersededCount, | ||
@JsonProperty("type") ArtefactType type, | ||
@JsonProperty("contentDate") LocalDateTime contentDate, | ||
@JsonProperty("locationId") String locationId, | ||
@JsonProperty("locationName") String locationName, | ||
@JsonProperty("listType") ListType listType | ||
) { | ||
this.artefactId = artefactId; | ||
this.displayFrom = displayFrom; | ||
this.displayTo = displayTo; | ||
this.language = language; | ||
this.provenance = provenance; | ||
this.sensitivity = sensitivity; | ||
this.sourceArtefactId = sourceArtefactId; | ||
this.supersededCount = supersededCount; | ||
this.type = type; | ||
this.contentDate = contentDate; | ||
this.locationId = locationId; | ||
this.locationName = locationName; | ||
this.listType = listType; | ||
} | ||
|
||
} |