@Path(value="/file") public class MockFileResource extends Object implements FileResource
ACCEPTED_TYPE_LIST_RESOURCE, ACCEPTED_TYPES_RESOURCE, DOWNLOAD_TEMPLATE, FILE_DOWNLOAD_TEMPLATE, FILE_RESOURCE, FILE_TYPE_INFO_RESOURCE, FILETYPE_RAW_SOURCE_DOCUMENT, FILETYPE_TRANSLATED_APPROVED, FILETYPE_TRANSLATED_APPROVED_AND_FUZZY, SERVICE_PATH, SOURCE_DOWNLOAD_TEMPLATE, SOURCE_UPLOAD_TEMPLATE, TRANSLATION_UPLOAD_TEMPLATE| Constructor and Description |
|---|
MockFileResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
acceptedFileTypeList()
Deprecated.
|
javax.ws.rs.core.Response |
acceptedFileTypes()
Deprecated.
|
javax.ws.rs.core.Response |
download(String downloadId)
Downloads a previously generated file.
|
javax.ws.rs.core.Response |
downloadSourceFile(String projectSlug,
String iterationSlug,
String fileType,
String docId)
Downloads a single source file.
|
javax.ws.rs.core.Response |
downloadTranslationFile(String projectSlug,
String iterationSlug,
String locale,
String fileExtension,
String docId)
Downloads a single translation file.
|
javax.ws.rs.core.Response |
fileTypeInfoList()
A list of document types supported by the server, along with their
default file extensions.
|
javax.ws.rs.core.Response |
uploadSourceFile(String projectSlug,
String iterationSlug,
String docId,
DocumentFileUploadForm uploadForm)
Upload a source file (or file chunk) to Zanata.
|
javax.ws.rs.core.Response |
uploadTranslationFile(String projectSlug,
String iterationSlug,
String localeId,
String docId,
String merge,
DocumentFileUploadForm uploadForm)
Upload a translation file (or file chunk) to Zanata.
|
@Deprecated public javax.ws.rs.core.Response acceptedFileTypes()
FileResourceacceptedFileTypes in interface FileResourceDocumentType#getSourceExtensions(),
FileResource.fileTypeInfoList()@Deprecated public javax.ws.rs.core.Response acceptedFileTypeList()
FileResourceacceptedFileTypeList in interface FileResourceDocumentType,
FileResource.fileTypeInfoList()public javax.ws.rs.core.Response fileTypeInfoList()
FileResourcefileTypeInfoList in interface FileResourceFileTypeInfopublic javax.ws.rs.core.Response uploadSourceFile(String projectSlug, String iterationSlug, String docId, DocumentFileUploadForm uploadForm)
FileResourceuploadSourceFile in interface FileResourceprojectSlug - The project slug where to store the document.iterationSlug - The project version slug where to store the document.docId - The full Document identifieruploadForm - The multi-part form body for the file or chunk.public javax.ws.rs.core.Response uploadTranslationFile(String projectSlug, String iterationSlug, String localeId, String docId, String merge, DocumentFileUploadForm uploadForm)
FileResourceuploadTranslationFile in interface FileResourceprojectSlug - The project slug where to store the document.iterationSlug - The project version slug where to store the document.localeId - The locale (language) for the translation file.docId - The full Document identifier.merge - Indicates whether to merge translations or overwrite all
translations with the contents of the uploaded file.uploadForm - The multi-part form body for the file or chunk.public javax.ws.rs.core.Response downloadSourceFile(String projectSlug, String iterationSlug, String fileType, String docId)
FileResourcedownloadSourceFile in interface FileResourcefileType - use 'raw' for original source if available, or 'pot' to
generate pot from source stringspublic javax.ws.rs.core.Response downloadTranslationFile(String projectSlug, String iterationSlug, String locale, String fileExtension, String docId)
FileResourcedownloadTranslationFile in interface FileResourceprojectSlug - Project identifier.iterationSlug - Project iteration identifier.locale - Translations for this locale will be contained in the
downloaded document.fileExtension - File type to be downloaded. (Options: 'po', 'half_baked',
'baked')docId - Document identifier to fetch translations for.public javax.ws.rs.core.Response download(String downloadId)
FileResourcedownload in interface FileResourcedownloadId - The Zanata generated download id.Copyright © 2017 Zanata Project. All rights reserved.