// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.speech.tools.voxetta.services;

import com.google.speech.tools.voxetta.data.Utterance; 

/** 
 * Functionality necessary to successfully upload Utterances to an external database.   
 */
public interface UtteranceService {

  /** 
   * Saves an Utterance to an external database.  
   */
  public void saveUtterance(Utterance utterance);
}

@@ -656,43 +656,266 @@
 gle.
-speech.tools.voxetta.data.Utterance
+appengine.api.blobstore.BlobstoreService;%0Aimport com.google.appengine.api.datastore.DatastoreService;%0Aimport com.google.common.annotations.VisibleForTesting; %0Aimport com.google.speech.tools.voxetta.data.Utterance;%0Aimport javax.servlet.http.HttpServletRequest
 ; %0A%0A
@@ -1162,11 +1162,257 @@
 erance);
+%0A%0A  /** %0A   * Returns a reference to the just-uploaded audio file. %0A   */%0A  public String getAudio(HttpServletRequest request);%0A%0A  /** %0A   * Return an upload URL that redirects to the Utterance Upload Servlet.%0A   */%0A  public String getFormUrl(); 
 %0A%7D%0A

generalize UtteranceService part two