@Path(value="/projects/p/{projectSlug:[a-zA-Z0-9]+([a-zA-Z0-9_\\-{.}]*[a-zA-Z0-9]+)?}/iterations/i/{iterationSlug:[a-zA-Z0-9]+([a-zA-Z0-9_\\-{.}]*[a-zA-Z0-9]+)?}") public class MockTranslatedDocResource extends Object implements TranslatedDocResource
SERVICE_PATH
Constructor and Description |
---|
MockTranslatedDocResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
deleteTranslations(String idNoSlash,
LocaleId locale)
Deletes a set of translations for a given locale.
|
javax.ws.rs.core.Response |
deleteTranslationsWithDocId(LocaleId locale,
String docId)
Deletes a set of translations for a given locale.
|
javax.ws.rs.core.Response |
getTranslations(String idNoSlash,
LocaleId locale,
Set<String> extensions,
boolean createSkeletons,
String eTag)
Retrieves a set of translations for a given locale.
|
javax.ws.rs.core.Response |
getTranslationsWithDocId(LocaleId locale,
String docId,
Set<String> extensions,
boolean createSkeletons,
String eTag)
Retrieves a set of translations for a given locale.
|
javax.ws.rs.core.Response |
putTranslations(String idNoSlash,
LocaleId locale,
TranslationsResource messageBody,
Set<String> extensions,
String merge)
Updates the translations for a document and a locale.
|
javax.ws.rs.core.Response |
putTranslationsWithDocId(LocaleId locale,
TranslationsResource messageBody,
String docId,
Set<String> extensions,
String merge)
Updates the translations for a document and a locale.
|
public javax.ws.rs.core.Response getTranslations(String idNoSlash, LocaleId locale, Set<String> extensions, boolean createSkeletons, @HeaderParam(value="If-None-Match") String eTag)
TranslatedDocResource
getTranslations
in interface TranslatedDocResource
idNoSlash
- The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').locale
- The locale for which to get translations.extensions
- The translation extensions to retrieve (e.g. "comment"). This
parameter allows multiple values.createSkeletons
- Indicates whether to generate untranslated entries or not.eTag
- An Entity tag identifier. Based on this identifier (if
provided), the server will decide if it needs to send a
response to the client or not (See return section).
Deprecated. Use TranslatedDocResource.getTranslationsWithDocId(org.zanata.common.LocaleId, java.lang.String, java.util.Set<java.lang.String>, boolean, java.lang.String)
public javax.ws.rs.core.Response getTranslationsWithDocId(LocaleId locale, String docId, Set<String> extensions, boolean createSkeletons, String eTag)
TranslatedDocResource
getTranslationsWithDocId
in interface TranslatedDocResource
locale
- The locale for which to get translations.docId
- The document identifier.extensions
- The translation extensions to retrieve (e.g. "comment"). This
parameter allows multiple values.createSkeletons
- Indicates whether to generate untranslated entries or not.eTag
- An Entity tag identifier. Based on this identifier (if
provided), the server will decide if it needs to send a
response to the client or not (See return section).public javax.ws.rs.core.Response deleteTranslations(String idNoSlash, LocaleId locale)
TranslatedDocResource
deleteTranslations
in interface TranslatedDocResource
idNoSlash
- The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').locale
- The locale for which to get translations.
Deprecated. Use TranslatedDocResource.deleteTranslationsWithDocId(org.zanata.common.LocaleId, java.lang.String)
public javax.ws.rs.core.Response deleteTranslationsWithDocId(LocaleId locale, String docId)
TranslatedDocResource
deleteTranslationsWithDocId
in interface TranslatedDocResource
locale
- The locale for which to get translations.docId
- The document identifier.public javax.ws.rs.core.Response putTranslations(String idNoSlash, LocaleId locale, TranslationsResource messageBody, Set<String> extensions, @DefaultValue(value="auto") String merge)
TranslatedDocResource
putTranslations
in interface TranslatedDocResource
idNoSlash
- The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').locale
- The locale for which to get translations.messageBody
- The translations to modify.extensions
- The translation extension types to modify (e.g. "comment").
This parameter allows multiple values.merge
- Indicates how to deal with existing translations (valid
options: 'auto', 'import'). Import will overwrite all current
values with the values being pushed (even empty ones), while
Auto will check the history of your translations and will not
overwrite any translations for which it detects a previous
value is being pushed.
Deprecated. Use TranslatedDocResource.putTranslationsWithDocId(org.zanata.common.LocaleId, org.zanata.rest.dto.resource.TranslationsResource, java.lang.String, java.util.Set<java.lang.String>, java.lang.String)
public javax.ws.rs.core.Response putTranslationsWithDocId(LocaleId locale, TranslationsResource messageBody, String docId, Set<String> extensions, String merge)
TranslatedDocResource
putTranslationsWithDocId
in interface TranslatedDocResource
locale
- The locale for which to get translations.messageBody
- The translations to modify.docId
- The document identifier.extensions
- The translation extension types to modify (e.g. "comment").
This parameter allows multiple values.merge
- Indicates how to deal with existing translations (valid
options: 'auto', 'import'). Import will overwrite all current
values with the values being pushed (even empty ones), while
Auto will check the history of your translations and will not
overwrite any translations for which it detects a previous
value is being pushed.Copyright © 2017 Zanata Project. All rights reserved.