Class SessionMultipartItem

java.lang.Object
fr.paris.lutece.plugins.workflow.modules.upload.services.SessionMultipartItem
All Implemented Interfaces:
fr.paris.lutece.portal.service.upload.MultipartItem, Serializable

public class SessionMultipartItem extends Object implements fr.paris.lutece.portal.service.upload.MultipartItem, Serializable
Uploaded file kept in the HTTP session. The file stays where the upload put it (usually a temporary file) and its content is only copied when the session is serialized: nothing is copied while the session stays in memory (one instance), and the file follows the session when it is replicated to another instance.
See Also:
  • Constructor Details

    • SessionMultipartItem

      public SessionMultipartItem(fr.paris.lutece.portal.service.upload.MultipartItem item)
      Constructor
      Parameters:
      item - the uploaded item
  • Method Details

    • of

      public static fr.paris.lutece.portal.service.upload.MultipartItem of(fr.paris.lutece.portal.service.upload.MultipartItem item)
      Wraps an item unless it is already kept in the session
      Parameters:
      item - the item
      Returns:
      the item to keep in the session
    • getFieldName

      public String getFieldName()
      Specified by:
      getFieldName in interface fr.paris.lutece.portal.service.upload.MultipartItem
    • getName

      public String getName()
      Specified by:
      getName in interface fr.paris.lutece.portal.service.upload.MultipartItem
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface fr.paris.lutece.portal.service.upload.MultipartItem
    • getSize

      public long getSize()
      Specified by:
      getSize in interface fr.paris.lutece.portal.service.upload.MultipartItem
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface fr.paris.lutece.portal.service.upload.MultipartItem
      Throws:
      IOException
    • get

      public byte[] get() throws UncheckedIOException
      Specified by:
      get in interface fr.paris.lutece.portal.service.upload.MultipartItem
      Throws:
      UncheckedIOException
    • delete

      public void delete() throws IOException
      Specified by:
      delete in interface fr.paris.lutece.portal.service.upload.MultipartItem
      Throws:
      IOException