Interface IFileItemFactory

  • All Known Implementing Classes:
    DiskFileItemFactory, GlobalDiskFileItemFactory

    public interface IFileItemFactory

    A factory interface for creating IFileItem instances. 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 Detail

      • setRepository

        void setRepository​(@Nullable
                           File aRepository)
        Define where to store files
        Parameters:
        aRepository - The directory to use. May be null.
      • createItem

        @Nonnull
        IFileItem createItem​(@Nullable
                             String sFieldName,
                             @Nullable
                             String sContentType,
                             boolean bIsFormField,
                             @Nullable
                             String sFileName)
        Create a new IFileItem instance 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 - 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.
        Returns:
        The newly created file item.
      • getAllTemporaryFiles

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsList<File> getAllTemporaryFiles()