class UploadService extends ComponentSupport {

  public String upload(final String repositoryName, final HttpServletRequest request) throws IOException {
    checkNotNull(repositoryName);
    checkNotNull(request);

    Repository repository = checkNotNull(repositoryManager.get(repositoryName), "Specified repository is missing");

    UploadResponse uploadResponse = uploadManager.handle(repository, request);

    return createSearchTerm(uploadResponse.getAssetPaths());
  }

  @Inject public  UploadService(final RepositoryManager repositoryManager,
                       final UploadManager uploadManager);

}