Class GoogleSpeechTranscriptionServiceStorage
java.lang.Object
org.opencastproject.transcription.googlespeech.GoogleSpeechTranscriptionServiceStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteGoogleStorageFile(org.apache.http.impl.client.CloseableHttpClient httpClient, String bucket, String objectName, String accessToken) Delete file from Google Cloud Storage using json API.intstartUpload(org.apache.http.impl.client.CloseableHttpClient httpClient, String bucket, String mpId, String fileExtension, File file, String byteSize, String contentType, String accessToken) Upload to Google Cloud Storage using Json API.
-
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 namempId- mediapackage IDfileExtension-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
-