Package com.helger.web.fileupload
Interface IFileItemFactory
-
- All Known Implementing Classes:
DiskFileItemFactory,GlobalDiskFileItemFactory
public interface IFileItemFactoryA factory interface for creating
IFileIteminstances. Factories can provide their own custom configuration, over and above that provided by the default file upload implementation.- Version:
- $Id: FileItemFactory.java 479262 2006-11-26 03:09:24Z niallp $
- Author:
- Martin Cooper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFileItemcreateItem(String sFieldName, String sContentType, boolean bIsFormField, String sFileName)Create a newIFileIteminstance from the supplied parameters and any local factory configuration.com.helger.commons.collection.impl.ICommonsList<File>getAllTemporaryFiles()voidsetRepository(File aRepository)Define where to store files
-
-
-
Method Detail
-
setRepository
void setRepository(@Nullable File aRepository)
Define where to store files- Parameters:
aRepository- The directory to use. May benull.
-
createItem
@Nonnull IFileItem createItem(@Nullable String sFieldName, @Nullable String sContentType, boolean bIsFormField, @Nullable String sFileName)
Create a newIFileIteminstance from the supplied parameters and any local factory configuration.- Parameters:
sFieldName- The name of the form field.sContentType- The content type of the form field.bIsFormField-trueif this is a plain form field;falseotherwise.sFileName- The name of the uploaded file, if any, as supplied by the browser or other client.- Returns:
- The newly created file item.
-
-