@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]+)?}/r") 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 |
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 |
putTranslations(String idNoSlash,
LocaleId locale,
TranslationsResource messageBody,
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.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.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.Copyright © 2017 Zanata Project. All rights reserved.