www.dextsolution.com
DEXTUPLOAD
JK
menu toggleReference > dextuploadjk > engine > MultipartCollection

dextuploadjk.engine
Class MultipartCollection

Minimum version
1.0.0
Minimum environment
Java 17, Jakarta EE 9+
Description

A collection class that stores all the field objects of a multipart data.

Constructor

MultipartCollection

  • Create an object of class MutlpartDataCollection.

  • Signatures

    public MultipartCollection() 
Methods

clear

  • Delete all registered field objects.

  • Signatures

    public void clear()
  • Uses

    collection.clear();

deleteTempFiles

  • Delete all temporary files.

  • Signatures

    public void deleteTempFiles()
  • Uses

    collection.deleteTempFiles();

addItem

  • Add a FieldItem object.

    If you try to register null, a DEXTUploadException is thrown.

  • Signatures

    public void addItem(FieldItem item)
  • Parameters

    Name Type Description
    item dextuploadjk.FieldItem FieldItem is the top-level interface for handling individual fields representing elements of multipart data.
  • Uses

    collection.addItem(new MultipartFormItem(item));

getFormItemCount

  • Returns the number of string fields.

  • Signatures

    public int getFormItemCount()
  • Return

    Number of string fields

  • Uses

    int formListCount = collection.getFormItemCount();

getFileItemCount

  • Returns the number of file fields.

  • Signatures

    public int getFileItemCount()
  • Return

    Number of file fields

  • Uses

    int fileItemCount = collection.getFileItemCount();

getFormGroupNames

  • Returns a set of string field names (java.util.Set<String>) object.

  • Signatures

    public  Set<String> getFormGroupNames()
  • Return

    Set of string field names

  • Uses

    Set<String> names = collection.getFormGroupNames();

getFileGroupNames

  • Returns a Set(java.util.Set<String>) object of the names of the file fields.

  • Signatures

    public  Set<String> getFileGroupNames()
  • Return

    Set of file field names

  • Uses

    Set<String> names = collection.getFileGroupNames();

getFormItem

  • Returns the FormItem objects that correspond to the given order or names.

    If multiple forms with the same name exist, the first item is returned.

  • Signatures

    public FormItem getFormItem(int index)
    public FormItem getFormItem(String name)
  • Parameters

    Name Type Description
    index int Order values
    name java.lang.String Name
  • Return

    FormItem object

  • Uses

    FormItem item = collection.getFormItem(index);
    // or
    FormItem item = collection.getFormItem(name);

getFormItems

  • Returns a list of fields (java.util.ArrayList<FormItem>) corresponding to all or the given name.

  • Signatures

    public ArrayList<FormItem> getFormItems()
    public ArrayList<FormItem> getFormItems(String name)
  • Parameters

    Name Type Description
    name java.lang.String Name
  • Return

    List of fields(java.util.ArrayList<FormItem>)

  • Uses

    ArrayList<FormItem> items = collection.getFormItems();
    // or
    ArrayList<FormItem> items = collection.getFormItems(name);

getFileItem

  • Returns a FileItem object corresponding to the given order or name.

  • Signatures

    public FileItem getFileItem(int index)
    public FileItem getFileItem(String name)
  • Parameters

    Name Type Description
    index int Order values
    name java.lang.String Name
  • Return

    FileItem object

  • Uses

    FileItem item = collection.getFileItem(index);
    // or
    FileItem item = collection.getFileItem(name);

getFileItems

  • Returns a list of files (java.util.ArrayList<FileItem>) corresponding to all or the given name.

  • Signatures

    public ArrayList<FileItem> getFileItems()
    public ArrayList<FileItem> getFileItems(String name)
  • Parameters

    Name Type Description
    name java.lang.String Name
  • Return

    List of fields(java.util.ArrayList<FileItem>)

  • Uses

    ArrayList<FileItem> items = collection.getFileItems();
    // or
    ArrayList<FileItem> items = collection.getFileItems(name);