@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]+)?}")
@Produces(value={"application/xml","application/json"})
@Consumes(value={"application/xml","application/json"})
public interface TranslatedDocResource
FileResource
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_PATH |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
deleteTranslations(String idNoSlash,
LocaleId locale)
Deprecated.
|
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 skeletons,
boolean markTranslatedAsApproved,
String eTag)
Deprecated.
|
javax.ws.rs.core.Response |
getTranslationsWithDocId(LocaleId locale,
String docId,
Set<String> extensions,
boolean createSkeletons,
boolean markTranslatedAsApproved,
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)
Deprecated.
|
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.
|
static final String SERVICE_PATH
@GET @Path(value="/r/{id:[\\-_a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}/translations/{locale}") @Deprecated javax.ws.rs.core.Response getTranslations(@PathParam(value="id") String idNoSlash, @PathParam(value="locale") LocaleId locale, @QueryParam(value="ext") Set<String> extensions, @QueryParam(value="skeletons") boolean skeletons, @DefaultValue(value="true") @QueryParam(value="markTranslatedAsApproved") boolean markTranslatedAsApproved, @HeaderParam(value="If-None-Match") String eTag)
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.skeletons
- 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 getTranslationsWithDocId(org.zanata.common.LocaleId, java.lang.String, java.util.Set<java.lang.String>, boolean, boolean, java.lang.String)
@GET @Path(value="/resource/translations/{locale}") javax.ws.rs.core.Response getTranslationsWithDocId(@PathParam(value="locale") LocaleId locale, @QueryParam(value="docId") @DefaultValue(value="") String docId, @QueryParam(value="ext") Set<String> extensions, @QueryParam(value="skeletons") boolean createSkeletons, @DefaultValue(value="true") @QueryParam(value="markTranslatedAsApproved") boolean markTranslatedAsApproved, @HeaderParam(value="If-None-Match") String eTag)
docId
- The document identifier.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 @DELETE @Path(value="/r/{id:[\\-_a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}/translations/{locale}") javax.ws.rs.core.Response deleteTranslations(@PathParam(value="id") String idNoSlash, @PathParam(value="locale") LocaleId locale)
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 deleteTranslationsWithDocId(org.zanata.common.LocaleId, java.lang.String)
@DELETE @Path(value="/resource/translations/{locale}") javax.ws.rs.core.Response deleteTranslationsWithDocId(@PathParam(value="locale") LocaleId locale, @QueryParam(value="docId") @DefaultValue(value="") String docId)
docId
- The document identifier.locale
- The locale for which to get translations.@Deprecated @PUT @Path(value="/r/{id:[\\-_a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}/translations/{locale}") javax.ws.rs.core.Response putTranslations(@PathParam(value="id") String idNoSlash, @PathParam(value="locale") LocaleId locale, TranslationsResource messageBody, @QueryParam(value="ext") Set<String> extensions, @QueryParam(value="merge") @DefaultValue(value="auto") String merge)
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 putTranslationsWithDocId(org.zanata.common.LocaleId, org.zanata.rest.dto.resource.TranslationsResource, java.lang.String, java.util.Set<java.lang.String>, java.lang.String)
@PUT @Path(value="/resource/translations/{locale}") javax.ws.rs.core.Response putTranslationsWithDocId(@PathParam(value="locale") LocaleId locale, TranslationsResource messageBody, @QueryParam(value="docId") @DefaultValue(value="") String docId, @QueryParam(value="ext") Set<String> extensions, @QueryParam(value="merge") @DefaultValue(value="auto") String merge)
docId
- The document identifier.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 © 2018 Zanata Project. All rights reserved.