Record Class TranscriptionStateEntity

java.lang.Object
java.lang.Record
org.exoplatform.documents.rest.model.TranscriptionStateEntity
Record Components:
available - whether a transcription engine is installed; when false, the other fields are empty and no transcript affordance is shown
status - QUEUED, PROCESSING, DONE or FAILED, or null when the file was never sent to transcription
progress - the pieces transcribed out of the pieces to transcribe ("3/9")
error - the message code of the last failure
language - the ISO-639-1 language of the transcript
durationSeconds - the duration of the media
updated - when the state last changed, in milliseconds since the epoch
hasSegments - whether the transcript has timed segments
hasChapters - whether the transcript is grouped into chapters (EXO-92122)
canRetry - whether the caller may ask to transcribe the file again: anyone who can edit it

public record TranscriptionStateEntity(boolean available, String status, String progress, String error, String language, Long durationSeconds, Long updated, boolean hasSegments, boolean hasChapters, boolean canRetry) extends Record
The transcription state of a media file as the REST answers it (EXO-92097).
  • Constructor Details

    • TranscriptionStateEntity

      public TranscriptionStateEntity(boolean available, String status, String progress, String error, String language, Long durationSeconds, Long updated, boolean hasSegments, boolean hasChapters, boolean canRetry)
      Creates an instance of a TranscriptionStateEntity record class.
      Parameters:
      available - the value for the available record component
      status - the value for the status record component
      progress - the value for the progress record component
      error - the value for the error record component
      language - the value for the language record component
      durationSeconds - the value for the durationSeconds record component
      updated - the value for the updated record component
      hasSegments - the value for the hasSegments record component
      hasChapters - the value for the hasChapters record component
      canRetry - the value for the canRetry 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.
    • available

      public boolean available()
      Returns the value of the available record component.
      Returns:
      the value of the available record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • progress

      public String progress()
      Returns the value of the progress record component.
      Returns:
      the value of the progress record component
    • error

      public String error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • durationSeconds

      public Long durationSeconds()
      Returns the value of the durationSeconds record component.
      Returns:
      the value of the durationSeconds record component
    • updated

      public Long updated()
      Returns the value of the updated record component.
      Returns:
      the value of the updated record component
    • hasSegments

      public boolean hasSegments()
      Returns the value of the hasSegments record component.
      Returns:
      the value of the hasSegments record component
    • hasChapters

      public boolean hasChapters()
      Returns the value of the hasChapters record component.
      Returns:
      the value of the hasChapters record component
    • canRetry

      public boolean canRetry()
      Returns the value of the canRetry record component.
      Returns:
      the value of the canRetry record component