Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSCSCI-1718 #1708

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package uk.gov.hmcts.reform.sscs.ccd.domain;

import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum DocumentTabChoice {
REGULAR("document"),
INTERNAL("internalDocument");

private final String value;

DocumentTabChoice(String value) {
this.value = value;
}

@Override
@JsonValue
public String toString() {
return value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class ScannedDocumentDetails {
private String includeInBundle;
private String originalSenderOtherPartyId;
private String originalSenderOtherPartyName;
@JsonInclude(JsonInclude.Include.NON_NULL)
private DocumentTabChoice documentTabChoice;

@JsonCreator
public ScannedDocumentDetails(@JsonProperty("type") String type,
Expand All @@ -38,7 +40,8 @@ public ScannedDocumentDetails(@JsonProperty("type") String type,
@JsonProperty("subtype") String subtype,
@JsonProperty("includeInBundle") String includeInBundle,
@JsonProperty("originalSenderOtherPartyId") String originalSenderOtherPartyId,
@JsonProperty("originalSenderOtherPartyName") String originalSenderOtherPartyName) {
@JsonProperty("originalSenderOtherPartyName") String originalSenderOtherPartyName,
@JsonProperty("documentTabChoice") DocumentTabChoice documentTabChoice) {
this.type = type;
this.url = url;
this.editedUrl = editedUrl;
Expand All @@ -50,6 +53,7 @@ public ScannedDocumentDetails(@JsonProperty("type") String type,
this.includeInBundle = includeInBundle;
this.originalSenderOtherPartyId = originalSenderOtherPartyId;
this.originalSenderOtherPartyName = originalSenderOtherPartyName;
this.documentTabChoice = documentTabChoice;
}

@JsonIgnore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public class SscsCaseData implements CaseData {
private List<Bundle> caseBundles;
private List<Bundle> historicalBundles;
private List<SscsDocument> sscsDocument;
@JsonInclude(JsonInclude.Include.NON_NULL)
private List<SscsDocument> sscsInternalDocument;
private List<SscsDocument> draftSscsDocument;
private List<SscsFurtherEvidenceDoc> draftSscsFurtherEvidenceDocument;
private SscsInterlocDecisionDocument sscsInterlocDecisionDocument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class SscsDocumentDetails extends AbstractDocumentDetails {
private UploadParty partyUploaded;
private String originalPartySender;
private String dateApproved;
@JsonInclude(JsonInclude.Include.NON_NULL)
private DocumentTabChoice documentTabChoice;

@JsonCreator
public SscsDocumentDetails(@JsonProperty("documentType") String documentType,
Expand All @@ -36,12 +38,14 @@ public SscsDocumentDetails(@JsonProperty("documentType") String documentType,
@JsonProperty("originalPartySender") String originalPartySender,
@JsonProperty("originalSenderOtherPartyId") String originalSenderOtherPartyId,
@JsonProperty("originalSenderOtherPartyName") String originalSenderOtherPartyName,
@JsonProperty("controlNumber") String controlNumber) {
@JsonProperty("controlNumber") String controlNumber,
@JsonProperty("documentTabChoice") DocumentTabChoice documentTabChoice) {
super(documentType, documentFileName, documentDateAdded, documentLink, editedDocumentLink, documentComment, evidenceIssued, bundleAddition, documentTranslationStatus, partyUploaded, dateApproved, resizedDocumentLink, avDocumentLink, originalPartySender, originalSenderOtherPartyId, originalSenderOtherPartyName, controlNumber);
this.documentEmailContent = documentEmailContent;
this.editedDocumentLink = editedDocumentLink;
this.partyUploaded = partyUploaded;
this.dateApproved = dateApproved;
this.originalPartySender = originalPartySender;
this.documentTabChoice = documentTabChoice;
}
}