Package me.desair.tus.server.upload
Class UuidUploadIdFactory
java.lang.Object
me.desair.tus.server.upload.UploadIdFactory
me.desair.tus.server.upload.UuidUploadIdFactory
Factory to create unique upload IDs. This factory can also parse the upload identifier from a
given upload URL.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateId()
Create a new unique upload ID.protected Serializable
getIdValueIfValid
(String extractedUrlId) Transform the extracted path ID value to a value to use for the upload ID object.Methods inherited from class me.desair.tus.server.upload.UploadIdFactory
getUploadUri, getUploadUriPattern, readUploadId, setUploadUri
-
Constructor Details
-
UuidUploadIdFactory
public UuidUploadIdFactory()
-
-
Method Details
-
getIdValueIfValid
Description copied from class:UploadIdFactory
Transform the extracted path ID value to a value to use for the upload ID object. If the extracted value is not valid, null is returned- Specified by:
getIdValueIfValid
in classUploadIdFactory
- Parameters:
extractedUrlId
- The ID extracted from the URL- Returns:
- Value to use in the UploadId object, null if the extracted URL value was not valid
-
createId
Description copied from class:UploadIdFactory
Create a new unique upload ID.- Specified by:
createId
in classUploadIdFactory
- Returns:
- A new unique upload ID
-