java.lang.Object
fr.paris.lutece.plugins.genericattributes.business.GenAttFileItem
All Implemented Interfaces:
fr.paris.lutece.portal.service.upload.MultipartItem

public class GenAttFileItem extends Object implements fr.paris.lutece.portal.service.upload.MultipartItem
GenAttFileItem : builds a new multipartItem
  • Constructor Details

    • GenAttFileItem

      public GenAttFileItem(byte[] bValue, String strFileName)
      Creates a new file item
      Parameters:
      bValue - the byte value
      strFileName - the file name
    • GenAttFileItem

      public GenAttFileItem(byte[] bValue, String strFileName, int nIdResponse, String strOrigin)
      Creates a new file item
      Parameters:
      bValue - the byte value
      strFileName - the file name
      nIdResponse - The id of the response associated with this file item if any
    • GenAttFileItem

      public GenAttFileItem(byte[] bValue, String strFileName, String strFieldName, int nIdResponse, String strOrigin)
      Creates a new file item
      Parameters:
      bValue - the byte value
      strFileName - the file name
      strFieldName - The name of the HTML field associated with this file, if any
      nIdResponse - The id of the response associated with this file item if any
  • Method Details

    • delete

      public void delete()
      Specified by:
      delete in interface fr.paris.lutece.portal.service.upload.MultipartItem
    • get

      public byte[] get()
      Specified by:
      get 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
    • getFieldName

      public String getFieldName()
      Specified by:
      getFieldName 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
    • getName

      public String getName()
      Specified by:
      getName 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
    • getOrigin

      public String getOrigin()
    • getString

      public String getString()
    • getString

      public String getString(String encoding) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • getIdResponse

      public int getIdResponse()
      Get the id of the associated response, if any
      Returns:
      The id of the associated response, if any
    • setFieldName

      public void setFieldName(String strName)
    • setIdResponse

      public void setIdResponse(int nIdResponse)
      Set the id of the associated response, if any
      Parameters:
      nIdResponse - The id of the associated response, if any
    • setOrigin

      public void setOrigin(String strOrigin)