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.bean;

import java.util.List;

import org.springframework.web.multipart.MultipartFile;

/**
* Instance of this class is used as the input argument into the "api/v1/fileupload"
* RESTFul Web Service.
*
* Instance of a FileUploadRequest is fed into the Request Body in "multipart/*" format
* of the "api/v1/fileupload" RESTFul Web Service.
*
* @author
DNS
*
*/
public class FileUploadRequest {

/**
* List of MultipartFile instance objects. It is this list that has the information
* that will be used by the "api/v1/fileupload" RESTFul Web Service
*/
private List<MultipartFile> multipartFiles;

/**
* List of ArchivedPdfReference objects.
*/
private List<ArchivedPdfReference> archivedPdfReferences;

private String myfield;

/**
* Gets the list of MultipartFile instance objects.
*
* @return - the list of MultipartFile instance objects
*/
public List<MultipartFile> getMultipartFiles() {
return multipartFiles;
}

/**
* Sets the list of MultipartFile instance objects.
*
* @param multipartFiles - the list of MultipartFile instance objects
*/
public void setMultipartFiles(List<MultipartFile> multipartFiles) {
this.multipartFiles = multipartFiles;
}

/**
* Gets the list of ArchivedPdfReference objects.
*
* @return - the list of ArchivedPdfReference objects
*/
public List<ArchivedPdfReference> getArchivedPdfReferences() {
return archivedPdfReferences;
}

/**
* Sets the list of ArchivedPdfReference objects.
*
* @param archivedPdfReferences - the list of ArchivedPdfReference objects
*/
public void setArchivedPdfReferences(List<ArchivedPdfReference> archivedPdfReferences) {
this.archivedPdfReferences = archivedPdfReferences;
}

/**
* Gets the "myfield" data member value.
*
* @return - the "myfield" data member value
*/
public String getMyfield() {
return myfield;
}

/**
* Sets the "myfield" data member value.
*
* @param myfield - the "myfield" data member value
*/
public void setMyfield(String myfield) {

System.out.println("Setting myfield = " + myfield);
this.myfield = myfield;
}

/**
* Returns a string representation of this object. In general, the toString method
* returns a string that "textually represents" this object. The result should be
* a concise but informative representation that is easy for a person to read.
* It is recommended that all subclasses override this method.
*
* See the https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--
* web page for details.
*
* @return - a string representation of an instance of this class
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("FileUploadRequest [multipartFiles=");
builder.append(multipartFiles);
builder.append(", archivedPdfReferences=");
builder.append(archivedPdfReferences);
builder.append(", myfield=");
builder.append(myfield);
builder.append("]");
return builder.toString();
}

/**
* Gets a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.
* See the https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode-- web page for details.
*
* @return - a hash code value for the object
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((archivedPdfReferences == null) ? 0 : archivedPdfReferences.hashCode());
result = prime * result + ((multipartFiles == null) ? 0 : multipartFiles.hashCode());
result = prime * result + ((myfield == null) ? 0 : myfield.hashCode());
return result;
}

/**
* Indicates whether some other object is "equal to" this one.
* See the https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object- web page for details.
*
* @return - 1) boolean true if some other object is "equal to" this one
* 2) boolean false if some other object is not "equal to" this one
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
FileUploadRequest other = (FileUploadRequest) obj;
if (archivedPdfReferences == null) {
if (other.archivedPdfReferences != null)
return false;
} else if (!archivedPdfReferences.equals(other.archivedPdfReferences))
return false;
if (multipartFiles == null) {
if (other.multipartFiles != null)
return false;
} else if (!multipartFiles.equals(other.multipartFiles))
return false;
if (myfield == null) {
if (other.myfield != null)
return false;
} else if (!myfield.equals(other.myfield))
return false;
return true;
}

}