Class GoogleSpeechTranscriptionServiceStorage

java.lang.Object
org.opencastproject.transcription.googlespeech.GoogleSpeechTranscriptionServiceStorage

public class GoogleSpeechTranscriptionServiceStorage extends Object
  • Constructor Details

    • GoogleSpeechTranscriptionServiceStorage

      public GoogleSpeechTranscriptionServiceStorage()
  • Method Details

    • startUpload

      public int startUpload(org.apache.http.impl.client.CloseableHttpClient httpClient, String bucket, String mpId, String fileExtension, File file, String byteSize, String contentType, String accessToken) throws IOException
      Upload to Google Cloud Storage using Json API. https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload
      Parameters:
      httpClient -
      bucket - Google storage bucket name
      mpId - mediapackage ID
      fileExtension -
      file -
      byteSize -
      contentType -
      accessToken -
      Returns:
      response code
      Throws:
      IOException
    • deleteGoogleStorageFile

      public void deleteGoogleStorageFile(org.apache.http.impl.client.CloseableHttpClient httpClient, String bucket, String objectName, String accessToken) throws IOException
      Delete file from Google Cloud Storage using json API. https://cloud.google.com/storage/docs/deleting-objects
      Parameters:
      httpClient -
      bucket -
      objectName -
      accessToken -
      Throws:
      IOException