Summary Table

Categories Total Count
PII 0
URL 0
DNS 1
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

package gov.va.med.ewv.model.response;

import java.util.ArrayList;
import java.util.List;

import gov.va.med.domain.ewv.EwvReferences;
import gov.va.med.ewv.bean.ArchivedPdfReference;

/**
* This is the Response object that is used to return back the Result of
* calling the File Archive "api/v1/filearchive" RESTFul Web Service. The
* actual RESTFul Web Service will place in its Response Body a JSON formatted
* version of an instance of this class.
*
* @author
DNS
*
*/
public class EwdPdfReferencesFileArchiveResponse {

/**
* Contains the list of Successful File Archives. Success in this context means that
* the File Archive's PDf Reference stored in the database was successfully set to the
* Archived state (i.e., Archive state set to "true").
*/
private List<ArchivedPdfReference> successfulFileArchivesList = new ArrayList<ArchivedPdfReference>();

/**
* Contains the list of EwvReferences objects whose Archive State was successfully set to "true".
*
* There is a one-to-one element correspondence between the "successfulFileArchivesList" and the
* "ewvReferencesList". For each successful File Archive in the "successfulFileUploadsList", there
* is a corresponding EwvReferences object in the "ewvReferencesList". So, the n'th element in the
* "successfulFileArchivesList" corresponds to the n'th element in the "ewvReferencesList". The n'th
* successful File Archive mentioned in the "successfulFileArchivesList" successfully had the
* corresponding PDF Reference information in the n'th element of the "ewvReferencesList"
* updated successfully into the database. Thus, each EwvReference contains the full PDF Reference
* information for that PDF Reference after its Archive state was set to "true".
*/
private List<EwvReferences> ewvReferencesList = new ArrayList<EwvReferences>();

/**
* Contains the list of Failed File Archives. Failure in this context means that
* the File Archive's PDf Reference stored in the database was NOT successfully set to the
* Archived state (i.e., Archive state NOT successfully set to "true").
*/
private List<ArchivedPdfReference> unSuccessfulFileArchivesList = new ArrayList<ArchivedPdfReference>();

/**
* Contains the list of Error Messages describing the reason why each failed File Archive in the
* "unSuccessfulFileArchivesList" failed.
*
* There is a one-to-one element correspondence between the "unSuccessfulFileArchivesList" and the
* "errorMessagesList". For each un-successful File Archive in the "successfulFileArchivesList", there
* is a corresponding Error Message string in the "errorMessagesList". So, the n'th element in the
* "unSuccessfulFileArchivesList" corresponds to the n'th element in the "errorMessagesList" describing
* why the File Archive mentioned in the n'th element of the "unSuccessfulFileArchivesList" failed.
*/
private List<String> errorMessagesList = new ArrayList<String>();

/**
* Constructor.
*/
public EwdPdfReferencesFileArchiveResponse() { }

/**
* Gets the list of Successful File Archives. Success in this context means that
* the File Archive's PDf Reference stored in the database was successfully set to the
* Archived state (i.e., Archive state set to "true").
*
* @return - the list of Successful File Archives
*/
public List<ArchivedPdfReference> getSuccessfulFileArchivesList() {
return successfulFileArchivesList;
}

/**
* Gets the list of EwvReferences objects whose Archive State was successfully set to "true".
*
* There is a one-to-one element correspondence between the "successfulFileArchivesList" and the
* "ewvReferencesList". For each successful File Archive in the "successfulFileUploadsList", there
* is a corresponding EwvReferences object in the "ewvReferencesList". So, the n'th element in the
* "successfulFileArchivesList" corresponds to the n'th element in the "ewvReferencesList". The n'th
* successful File Archive mentioned in the "successfulFileArchivesList" successfully had the
* corresponding PDF Reference information in the n'th element of the "ewvReferencesList"
* updated successfully into the database. Thus, each EwvReference contains the full PDF Reference
* information for that PDF Reference after its Archive state was set to "true".
*
* @return - the list of EwvReferences objects whose Archive State was successfully set to "true"
*/
public List<EwvReferences> getEwvReferencesList() {
return ewvReferencesList;
}

/**
* Gets the list of Failed File Archives. Failure in this context means that
* the File Archive's PDf Reference stored in the database was NOT successfully set to the
* Archived state (i.e., Archive state NOT successfully set to "true").
*
* @return - the list of Failed File Archives
*/
public List<ArchivedPdfReference> getUnSuccessfulFileArchivesList() {
return unSuccessfulFileArchivesList;
}

/**
* Gets the list of Error Messages describing the reason why each failed File Archive in the
* "unSuccessfulFileArchivesList" failed.
*
* There is a one-to-one element correspondence between the "unSuccessfulFileArchivesList" and the
* "errorMessagesList". For each un-successful File Archive in the "successfulFileArchivesList", there
* is a corresponding Error Message string in the "errorMessagesList". So, the n'th element in the
* "unSuccessfulFileArchivesList" corresponds to the n'th element in the "errorMessagesList" describing
* why the File Archive mentioned in the n'th element of the "unSuccessfulFileArchivesList" failed.
*
* @return - the list of Error Messages describing the reason why each failed File Archive in the
* "unSuccessfulFileArchivesList" failed
*/
public List<String> getErrorMessagesList() {
return errorMessagesList;
}

/**
* Sets the list of Successful File Archives. Success in this context means that
* the File Archive's PDf Reference stored in the database was successfully set to the
* Archived state (i.e., Archive state set to "true").
*
* @param successfulFileArchivesList - the list of Successful File Archives
*/
public void setSuccessfulFileArchivesList(List<ArchivedPdfReference> successfulFileArchivesList) {
if (successfulFileArchivesList != null) {
this.successfulFileArchivesList = successfulFileArchivesList;
}
}

/**
* Sets the list of EwvReferences objects whose Archive State was successfully set to "true".
*
* @param ewvReferencesList - the list of EwvReferences objects
*/
public void setEwvReferencesList(List <EwvReferences> ewvReferencesList) {
if (ewvReferencesList != null) {
this.ewvReferencesList = ewvReferencesList;
}
}

/**
* Sets the list of Failed File Archives. Failure in this context means that
* the File Archive's PDf Reference stored in the database was NOT successfully set to the
* Archived state (i.e., Archive state NOT successfully set to "true").
*
* @param unSuccessfulFileArchivesList - the list of Failed File Archives
*/
public void setUnSuccessfulFileArchivesList(List<ArchivedPdfReference> unSuccessfulFileArchivesList) {
if (unSuccessfulFileArchivesList != null) {
this.unSuccessfulFileArchivesList = unSuccessfulFileArchivesList;
}
}

/**
* Sets the list of Error Messages describing the reason why each failed File Archive in the
* "unSuccessfulFileArchivesList" failed.
*
* @param errorMessagesList - the list of Error Messages
*/
public void setErrorMessagesList(List<String> errorMessagesList) {
if (errorMessagesList != null) {
this.errorMessagesList = errorMessagesList;
}
}

/**
* Inserts a File Archive record information into the "successfulFileArchivesList"
* whose File Archive was successful.
*
* @param successfulFileArchive - the File Archive information to insert; none inserted
* if this input parameter is NULL
*/
public void addSuccessfulFileArchive(ArchivedPdfReference successfulFileArchive) {
if (successfulFileArchive != null) {
successfulFileArchivesList.add(successfulFileArchive);
}
}

/**
* Inserts an EwvReference object into the "ewvReferencesList" that was successfully
* updated to the Archived State in the database. Each EwvReference contains the
* full PDF Reference information for that PDF Reference after its Archive state
* was set to "true".
*
* @param ewvReferences - the EwvReference object to insert; none inserted if this
* input parameter is NULL
*/
public void addEwvReferences(EwvReferences ewvReferences) {
if (ewvReferences != null) {
ewvReferencesList.add(ewvReferences);
}
}

/**
* Inserts a File Archive record information into the "unSuccessfulFileArchivesList"
* whose File Archive was NOT successful.
*
* @param unSuccessfulFileArchive - the File Archive information to insert; none
* inserted if this input parameter is NULL
*/
public void addUnSuccessfulFileArchive(ArchivedPdfReference unSuccessfulFileArchive) {
if (unSuccessfulFileArchive != null) {
unSuccessfulFileArchivesList.add(unSuccessfulFileArchive);
}
}

/**
* Inserts an Error Message string into the "errorMessagesList" describing the reason
* why a failed File Archive in the "unSuccessfulFileStchivesList" failed.
*
* @param errorMessage - the Error Message string to insert; none inserted if this
* input parameter is NULL or is an empty string
*/
public void addErrorMessage(String errorMessage) {
if (errorMessage != null && !errorMessage.isEmpty()) {
errorMessagesList.add(errorMessage);
}
}
}