Class FileMetaBlob

java.lang.Object
org.kuali.rice.krad.file.FileMetaBlob
All Implemented Interfaces:
Serializable, FileMeta

public class FileMetaBlob extends Object implements Serializable, FileMeta
Class used for interactions between the controller and form when using the multifile upload widget.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • FileMetaBlob

      public FileMetaBlob()
  • Method Details

    • init

      public void init(org.springframework.web.multipart.MultipartFile multipartFile) throws Exception
      Description copied from interface: FileMeta
      Init method called to initialize the FileMeta object
      Specified by:
      init in interface FileMeta
      Parameters:
      multipartFile - the file this object contains or represents
      Throws:
      Exception
    • getId

      public String getId()
      Unique id of the FileMeta object
      Specified by:
      getId in interface FileMeta
      Returns:
    • setId

      public void setId(String id)
      Specified by:
      setId in interface FileMeta
      See Also:
    • getName

      public String getName()
      The name of the file
      Specified by:
      getName in interface FileMeta
      Returns:
    • setName

      public void setName(String name)
      Specified by:
      setName in interface FileMeta
      See Also:
    • getContentType

      public String getContentType()
      The content type of the file
      Specified by:
      getContentType in interface FileMeta
      Returns:
    • setContentType

      public void setContentType(String contentType)
      Specified by:
      setContentType in interface FileMeta
      See Also:
    • getSize

      public Long getSize()
      The size of the file (in bytes)
      Specified by:
      getSize in interface FileMeta
      Returns:
    • setSize

      public void setSize(Long size)
      Specified by:
      setSize in interface FileMeta
      See Also:
    • getSizeFormatted

      public String getSizeFormatted()
      The size of the file formatted into a more readable format
      Specified by:
      getSizeFormatted in interface FileMeta
      Returns:
    • getDateUploaded

      public Date getDateUploaded()
      The date the file was uploaded
      Specified by:
      getDateUploaded in interface FileMeta
      Returns:
    • setDateUploaded

      public void setDateUploaded(Date dateUploaded)
      Specified by:
      setDateUploaded in interface FileMeta
      See Also:
    • getDateUploadedFormatted

      public String getDateUploadedFormatted()
      The file uploaded date formatted ina more readable String format
      Specified by:
      getDateUploadedFormatted in interface FileMeta
      Returns:
    • getUrl

      public String getUrl()
      The url to use to download the file
      Specified by:
      getUrl in interface FileMeta
      Returns:
      the url of the file download
    • setUrl

      public void setUrl(String url)
      Specified by:
      setUrl in interface FileMeta
      See Also:
    • getMultipartFile

      public org.springframework.web.multipart.MultipartFile getMultipartFile()
      Get the MultipartFile that is populated by the controller during the upload process.
      Returns:
      the MultipartFile object
    • setMultipartFile

      public void setMultipartFile(org.springframework.web.multipart.MultipartFile multipartFile)
      See Also:
    • getBlob

      public Blob getBlob()
      Get the serialized blob data representing the file
      Returns:
      the blob data
    • setBlob

      public void setBlob(Blob blob)
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object