Class UuidUploadIdFactory

java.lang.Object
me.desair.tus.server.upload.UploadIdFactory
me.desair.tus.server.upload.UuidUploadIdFactory

public class UuidUploadIdFactory extends UploadIdFactory
Factory to create unique upload IDs. This factory can also parse the upload identifier from a given upload URL.
  • Constructor Details

    • UuidUploadIdFactory

      public UuidUploadIdFactory()
  • Method Details

    • getIdValueIfValid

      protected Serializable getIdValueIfValid(String extractedUrlId)
      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 class UploadIdFactory
      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

      public UploadId createId()
      Description copied from class: UploadIdFactory
      Create a new unique upload ID.
      Specified by:
      createId in class UploadIdFactory
      Returns:
      A new unique upload ID