Record Class ChunkedUpload
java.lang.Object
java.lang.Record
org.exoplatform.documents.mcp.model.ChunkedUpload
- Record Components:
id- its iduserName- the user who started itfolderId- the folder it is filed intoname- the file name it is filed undersize- the file's size, in bytes, announced at its startconflictAction- what to do when the folder holds a file of that namefile- the temporary file holding the pieces receivedreceived- the bytes receivednextIndex- the number of the next piece expectedlastPieceDigest- the SHA-256 of the last piece received, hex-encoded, to acknowledge it sent again and refuse another piece under its numbertouched- when it was last usedfiling- whether its last piece came and its file is being fileddocument- the document it was filed as, once filed
public record ChunkedUpload(String id, String userName, String folderId, String name, long size, org.exoplatform.documents.constant.UploadConflictAction conflictAction, Path file, long received, int nextIndex, String lastPieceDigest, Instant touched, boolean filing, DocumentModel document)
extends Record
An upload in pieces as the store of the uploads in progress holds it: who
started it, where and how it is filed, the temporary file holding its
pieces, and, once filed, the document it became.
-
Constructor Summary
ConstructorsConstructorDescriptionChunkedUpload(String id, String userName, String folderId, String name, long size, org.exoplatform.documents.constant.UploadConflictAction conflictAction, Path file, long received, int nextIndex, String lastPieceDigest, Instant touched, boolean filing, DocumentModel document) Creates an instance of aChunkedUploadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.documents.constant.UploadConflictActionReturns the value of theconflictActionrecord component.document()Returns the value of thedocumentrecord component.final booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.filedAs(DocumentModel filed, Instant now) The upload filed.booleanfiling()Returns the value of thefilingrecord component.folderId()Returns the value of thefolderIdrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thelastPieceDigestrecord component.name()Returns the value of thenamerecord component.intReturns the value of thenextIndexrecord component.longreceived()Returns the value of thereceivedrecord component.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.touched()Returns the value of thetouchedrecord component.The upload used at another time.userName()Returns the value of theuserNamerecord component.The upload with a piece more.
-
Constructor Details
-
ChunkedUpload
public ChunkedUpload(String id, String userName, String folderId, String name, long size, org.exoplatform.documents.constant.UploadConflictAction conflictAction, Path file, long received, int nextIndex, String lastPieceDigest, Instant touched, boolean filing, DocumentModel document) Creates an instance of aChunkedUploadrecord class.- Parameters:
id- the value for theidrecord componentuserName- the value for theuserNamerecord componentfolderId- the value for thefolderIdrecord componentname- the value for thenamerecord componentsize- the value for thesizerecord componentconflictAction- the value for theconflictActionrecord componentfile- the value for thefilerecord componentreceived- the value for thereceivedrecord componentnextIndex- the value for thenextIndexrecord componentlastPieceDigest- the value for thelastPieceDigestrecord componenttouched- the value for thetouchedrecord componentfiling- the value for thefilingrecord componentdocument- the value for thedocumentrecord component
-
-
Method Details
-
withPiece
The upload with a piece more.- Parameters:
length- the piece's lengthdigest- the piece's SHA-256, hex-encodednow- when it came- Returns:
- the upload, filing once all its bytes came
-
touchedAt
The upload used at another time.- Parameters:
now- when it was used- Returns:
- the upload, marked
-
filedAs
The upload filed.- Parameters:
filed- the document it was filed asnow- when it was filed- Returns:
- the upload, filed
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
userName
-
folderId
-
name
-
size
-
conflictAction
public org.exoplatform.documents.constant.UploadConflictAction conflictAction()Returns the value of theconflictActionrecord component.- Returns:
- the value of the
conflictActionrecord component
-
file
-
received
-
nextIndex
-
lastPieceDigest
Returns the value of thelastPieceDigestrecord component.- Returns:
- the value of the
lastPieceDigestrecord component
-
touched
-
filing
-
document
-