br.com.jhonsapp.util.primefaces.uploaded.UploadedFileUtil Maven / Gradle / Ivy
package br.com.jhonsapp.util.primefaces.uploaded;
import java.io.Serializable;
import org.primefaces.model.UploadedFile;
/**
* Interface responsible for loading files into the repository.
*
* @author Jhonathan Camacho
*
*/
public interface UploadedFileUtil extends Serializable {
/**
* Creates the path where the file can be called inside the servlet.
*
* @param fullPath
* string containing the folder concatenated with the identifier.
*
* @return the http path.
*
*/
public String createImagePath(String fullPath);
/**
* Insert the file into the repository.
*
* @param uploadedFile
* object that contains the file.
*
* @param fullPath
* string containing the folder concatenated with the identifier.
*
* @return true if the insert or update operation was successful and false
* otherwise.
*/
public boolean insertFile(UploadedFile uploadedFile, String fullPath);
/**
* Remove the file into the repository.
*
* @param fullPath
* string containing the folder concatenated with the identifier.
*
* @return true if the removal was successful and false otherwise.
*/
public boolean removeFile(String fullPath);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy