es.prodevelop.pui9.file.AttachmentDefinition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of es.prodevelop.pui9.utils Show documentation
Show all versions of es.prodevelop.pui9.utils Show documentation
Multiple utilities for PUI9 (Gson, CSV, Exceptions...)
The newest version!
package es.prodevelop.pui9.file;
import java.io.InputStream;
import java.io.Serializable;
public class AttachmentDefinition implements Serializable {
private static final long serialVersionUID = 1L;
private InputStream inputStream;
private String originalFileName;
private String fileName;
private String fileExtension;
private long fileSize;
private String uniqueFileName;
public InputStream getInputStream() {
return inputStream;
}
public void setInputStream(InputStream inputStream) {
this.inputStream = inputStream;
}
public String getOriginalFileName() {
return originalFileName;
}
public void setOriginalFileName(String originalFileName) {
this.originalFileName = originalFileName;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileExtension() {
return fileExtension;
}
public void setFileExtension(String fileExtension) {
this.fileExtension = fileExtension;
}
public long getFileSize() {
return fileSize;
}
public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}
public String getFullFileName() {
return getFileName() + "." + getFileExtension();
}
public String getUniqueFullFileName() {
if (uniqueFileName == null) {
uniqueFileName = getFileName() + "_" + System.currentTimeMillis() + "." + getFileExtension();
}
return uniqueFileName;
}
}