public final class GlobalDiskFileItemFactory extends AbstractGlobalWebSingleton implements IFileItemFactory
DiskFileItemFactory, that is correctly cleaning up,
when the servlet context is destroyed.| Constructor and Description |
|---|
GlobalDiskFileItemFactory()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DiskFileItem |
createItem(String sFieldName,
String sContentType,
boolean bIsFormField,
String sFileName)
Create a new
IFileItem instance from the supplied parameters and
any local factory configuration. |
com.helger.commons.collection.impl.ICommonsList<File> |
getAllTemporaryFiles() |
static GlobalDiskFileItemFactory |
getInstance() |
protected void |
onDestroy(com.helger.scope.IScope aScopeInDestruction) |
void |
setRepository(File aRepository)
Define where to store files
|
String |
toString() |
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiatedgetAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInPreDestruction, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onBeforeDestroy, onBeforeScopeDestruction, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInPreDestruction, setInstantiated, writeAbstractSingletonFields@UsedViaReflection @Deprecated public GlobalDiskFileItemFactory()
@Nonnull public static GlobalDiskFileItemFactory getInstance()
protected void onDestroy(@Nonnull com.helger.scope.IScope aScopeInDestruction)
onDestroy in class com.helger.scope.singleton.AbstractSingletonpublic void setRepository(@Nullable File aRepository)
IFileItemFactorysetRepository in interface IFileItemFactoryaRepository - The directory to use. May be null.@Nonnull public DiskFileItem createItem(String sFieldName, @Nullable String sContentType, boolean bIsFormField, @Nullable String sFileName)
IFileItemFactoryIFileItem instance from the supplied parameters and
any local factory configuration.createItem in interface IFileItemFactorysFieldName - The name of the form field.sContentType - The content type of the form field.bIsFormField - true if this is a plain form field; false
otherwise.sFileName - The name of the uploaded file, if any, as supplied by the browser or
other client.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<File> getAllTemporaryFiles()
getAllTemporaryFiles in interface IFileItemFactorypublic String toString()
toString in class com.helger.scope.singleton.AbstractSingletonCopyright © 2014–2019 Philip Helger. All rights reserved.