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.service;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
import gov.va.med.ars.exceptions.GenericException;
import gov.va.med.domain.ewv.EwvReferences;
import gov.va.med.ewv.bean.ArchivedPdfReference;
import gov.va.med.ewv.model.response.EwdPdfReferencesFileArchiveResponse;
import gov.va.med.ewv.model.response.EwdPdfReferencesFileUploadResponse;
import gov.va.med.ewv.model.response.EwvPdfReferencesResponse;
/**
* Interface for various methods pertaining to the PDF References that
* are stored in the database.
*
* @author
DNS
*
*/
public interface IEwvPdfReferenceService {
/**
* Gets all the PDF References that are in the database.
*
* @return - the RESTFul Web Service Response for all the PDF References that are in the database
* @throws GenericException - thrown if any type of Exception occurs
*/
EwvPdfReferencesResponse getAllPdfReferences() throws GenericException;
/**
* Inserts a PDF Reference into the database having the information as in the given
* "ewvReferences" input parameter.
*
* The method will do the following:
* 1) Check for valid inputs. The following constitutes invalid inputs and an Exception will be thrown
* for any of the following invalid inputs:
* a) "ewvReferences" is null
* b) Reference Name of "ewvReferences" is null
* c) Reference Name of "ewvReferences" is an empty string or is composed of spaces
* d) Reference File Name of "ewvReferences" is null
* e) Reference File Name of "ewvReferences" is an empty string or is composed of spaces
* f) An un-archived PDF Reference exists in the database that has the same Reference Name (Trimmed)
* value of "ewvReferences"
* g) An un-archived PDF Reference exists in the database that has the same Reference File Name (Trimmed)
* value of "ewvReferences" input
* 2) Sets the "guid" value of "ewvReferences" to null
* 3) Sets the "archive" value to "false", since only un-archived PDF References will be permitted to be
* inserted into the database
* 4) Trims the Reference Name and Reference File Name values of the "ewvReferences" input
* 5) Inserts a PDF Reference into the database from the information in the "ewvReference" input parameter
*
* @param ewvReferences - the input parameter that contains the PDF References information to be inserted
* into the database
* @param commitToDatabase - boolean flag to indicate if the insert should be committed to the database;
* boolean "true" means to commit to the database;
* boolean "false" means to NOT commit to the database
*
* @return - a reference to the EwvRefernces object inserted into the database; it will have the information that
* was stored in the database including the unique non-null "guid" value.
*
* @throws Exception - an Exception is throws in one of the following scenarios:
* 1) The "ewvReferences" input parameter has invalid input value(s)
* 2) Insert of PDF Reference into the database was not successful
*/
//public EwvReferences insertPdfReference(EwvReferences ewvReferences) throws Exception;
/**
* Uploads (i.e., saves the contents into the server file system) a list of "files" into the server file system as
* well as insert PDF References of those files into the database.
*
* @param files - a list of MultipartFile objects; each such object contains the appropriate information for one
* file that will be used to save its contents into the server file system as well as its PDF
* Reference information in the database
*
* @return - instance of EwdPdfReferencesFileUploadResponse Java class; it will show which Files
* have had their contents stored successfully into the server file system as well as their PDF Reference
* information in the database and which have not. In those instances that are unsuccessful, the reason
* for not being successful will be included in the response
*/
public EwdPdfReferencesFileUploadResponse saveUploadedFiles(List<MultipartFile> files);
/**
* Marks one or more PDF References to the Archived state.
*
* @param archivedPdfReferences - a list of ArchivedPdfReference objects; each such object contains the appropriate
* information to identify which PDF Reference in the database will be marked as archived
*
* @return - EwvClaimDetailResponse Java class instance; it will show which PDF References have been placed
* successfully in the Archived state and which have not. In those instances that are unsuccessful, the
* reason for not being successful will be included in the response
*/
public EwdPdfReferencesFileArchiveResponse updateUploadedFiles(List<ArchivedPdfReference> archivedPdfReferences);
/**
* Gets the Reference File Name of an EWV_REFERENCE record given it's GUID Id.
*
* @param fileId - the GUID that uniquely identifies a record in the EWV_REFERENCES table
*
* @return - the Reference File Name associated with the EWV_REFERENCE table record
*
* @throws GenericException - thrown if some error occurs
*/
public String getPathForTheAttachment(String fileId) throws GenericException;
}