Record Class DocumentUploadModel

java.lang.Object
java.lang.Record
org.exoplatform.documents.mcp.model.DocumentUploadModel
Record Components:
uploadId - the upload's id, to send the pieces with
parentFolderId - the folder the file is filed into
name - the file name it is filed under
size - the file's size, in bytes
receivedBytes - the bytes received so far
nextIndex - the number of the next piece to send, from 0
maxBytes - the largest file uploaded
chunkChars - the base64 characters of one piece to send, the last one holding the rest
expiresInMinutes - how long the upload is kept without a piece
document - the document the file was filed as, once its last piece came

public record DocumentUploadModel(String uploadId, String parentFolderId, String name, long size, long receivedBytes, int nextIndex, long maxBytes, int chunkChars, long expiresInMinutes, DocumentModel document) extends Record
An upload in pieces, as start_document_upload and append_document_upload_chunk return it.
  • Constructor Details

    • DocumentUploadModel

      public DocumentUploadModel(String uploadId, String parentFolderId, String name, long size, long receivedBytes, int nextIndex, long maxBytes, int chunkChars, long expiresInMinutes, DocumentModel document)
      Creates an instance of a DocumentUploadModel record class.
      Parameters:
      uploadId - the value for the uploadId record component
      parentFolderId - the value for the parentFolderId record component
      name - the value for the name record component
      size - the value for the size record component
      receivedBytes - the value for the receivedBytes record component
      nextIndex - the value for the nextIndex record component
      maxBytes - the value for the maxBytes record component
      chunkChars - the value for the chunkChars record component
      expiresInMinutes - the value for the expiresInMinutes record component
      document - the value for the document record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • uploadId

      public String uploadId()
      Returns the value of the uploadId record component.
      Returns:
      the value of the uploadId record component
    • parentFolderId

      public String parentFolderId()
      Returns the value of the parentFolderId record component.
      Returns:
      the value of the parentFolderId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • size

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • receivedBytes

      public long receivedBytes()
      Returns the value of the receivedBytes record component.
      Returns:
      the value of the receivedBytes record component
    • nextIndex

      public int nextIndex()
      Returns the value of the nextIndex record component.
      Returns:
      the value of the nextIndex record component
    • maxBytes

      public long maxBytes()
      Returns the value of the maxBytes record component.
      Returns:
      the value of the maxBytes record component
    • chunkChars

      public int chunkChars()
      Returns the value of the chunkChars record component.
      Returns:
      the value of the chunkChars record component
    • expiresInMinutes

      public long expiresInMinutes()
      Returns the value of the expiresInMinutes record component.
      Returns:
      the value of the expiresInMinutes record component
    • document

      public DocumentModel document()
      Returns the value of the document record component.
      Returns:
      the value of the document record component