001package jmri.web.servlet.roster;
002
003import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
004import java.io.InputStream;
005
006/**
007 * object type for storing uploaded file data based on examples at
008 * http://hmkcode.com/java-servlet-jquery-file-upload/ 
009 *
010 */
011@JsonIgnoreProperties({"content"}) //this prevents serializer error when mapping to send back
012public class FileMeta {
013
014    private String fileName;
015    private String fileSize;
016    private String fileType;
017    private boolean fileReplace;
018    private String rosterGroup;
019    private InputStream fileContent;
020
021    public String getFileName() {
022        return fileName;
023    }
024
025    public void setFileName(String fileName) {
026        this.fileName = fileName;
027    }
028
029    public String getFileSize() {
030        return fileSize;
031    }
032
033    public void setFileSize(String fileSize) {
034        this.fileSize = fileSize;
035    }
036
037    public String getFileType() {
038        return fileType;
039    }
040
041    public void setFileType(String fileType) {
042        this.fileType = fileType;
043    }
044
045    public boolean getFileReplace() {
046        return fileReplace;
047    }
048
049    public void setFileReplace(boolean fileReplace) {
050        this.fileReplace = fileReplace;
051    }
052
053    public InputStream getContent() {
054        return this.fileContent;
055    }
056
057    public void setContent(InputStream content) {
058        this.fileContent = content;
059    }
060
061    public String getRosterGroup() {
062        return rosterGroup;
063    }
064
065    public void setRosterGroup(String rosterGroup) {
066        this.rosterGroup = rosterGroup;
067    }
068
069    @Override
070    public String toString() {
071        return "FileMeta [fileName=" + fileName + ", fileSize=" + fileSize
072                + ", fileType=" + fileType + "]";
073    }
074
075}