@Controller
@RequestMapping(value="{domain}/i18n")
public class I18nController
extends Object
| Constructor and Description |
|---|
I18nController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.servlet.view.RedirectView |
addTranslation(javax.servlet.http.HttpServletRequest request,
org.springframework.web.util.UriComponentsBuilder uriBuilder,
String domain,
String parent,
String locale,
String string,
String imageUrl,
String linkUrl)
Add a localized translation.
|
org.springframework.http.ResponseEntity<Ji18nTranslation> |
deleteTranslation(javax.servlet.http.HttpServletRequest request,
String id)
Delete a localized translation by id
|
org.springframework.http.ResponseEntity<Ji18nTranslation> |
deleteTranslation(javax.servlet.http.HttpServletRequest request,
String parent,
String locale)
Delete a localized translation for a specific local and parent
|
org.springframework.http.ResponseEntity<Collection<Ji18nTranslation>> |
deleteTranslationsForParent(javax.servlet.http.HttpServletRequest request,
String parent)
Delete all localized translation for a specific parent
|
org.springframework.http.ResponseEntity<Ji18nTranslation> |
getTranslation(javax.servlet.http.HttpServletRequest request,
String id)
Get a localized translation by id as KeyString
|
org.springframework.http.ResponseEntity<Ji18nTranslation> |
getTranslation(javax.servlet.http.HttpServletRequest request,
String parent,
String locale)
Get a localized translation for a specific locale and parent.
|
org.springframework.http.ResponseEntity<Map<String,Ji18nTranslation>> |
getTranslationsForLocaleForParents(javax.servlet.http.HttpServletRequest request,
String[] parents,
String locale)
Get localized translation in a specific locale for a list fo parents.
|
org.springframework.http.ResponseEntity<Collection<Ji18nTranslation>> |
getTranslationsForParent(javax.servlet.http.HttpServletRequest request,
String parent)
Get all localized translation for a specific parent.
|
org.springframework.http.ResponseEntity<Map<String,Collection<Ji18nTranslation>>> |
getTranslationsForParents(javax.servlet.http.HttpServletRequest request,
String[] parents)
Get all localized translation for a list fo parents.
|
void |
setTranslationService(TranslationService translationService) |
@RequestMapping(value="",
method=POST)
public org.springframework.web.servlet.view.RedirectView addTranslation(javax.servlet.http.HttpServletRequest request,
org.springframework.web.util.UriComponentsBuilder uriBuilder,
@PathVariable
String domain,
@RequestParam(required=true)
String parent,
@RequestParam(required=true)
String locale,
@RequestParam(required=false)
String string,
@RequestParam(required=false)
String imageUrl,
@RequestParam(required=false)
String linkUrl)
parent - the parent resource being translatedlocale - the localestring - localized string valueimageUrl - localized imagelinkUrl - localized url@RequestMapping(value="{id}",
method=GET)
public org.springframework.http.ResponseEntity<Ji18nTranslation> getTranslation(javax.servlet.http.HttpServletRequest request,
@PathVariable
String id)
id - the id of the translation@RequestMapping(value="",
method=GET,
params={"parent","locale"})
public org.springframework.http.ResponseEntity<Ji18nTranslation> getTranslation(javax.servlet.http.HttpServletRequest request,
@RequestParam(required=true)
String parent,
@RequestParam(required=true)
String locale)
parent - the parent key resource being translatedlocale - the locale@RequestMapping(value="",
method=GET,
params="parent")
public org.springframework.http.ResponseEntity<Collection<Ji18nTranslation>> getTranslationsForParent(javax.servlet.http.HttpServletRequest request,
@RequestParam(required=true)
String parent)
parent - the parent key resource being translated@RequestMapping(value="",
method=GET,
params="parents")
public org.springframework.http.ResponseEntity<Map<String,Collection<Ji18nTranslation>>> getTranslationsForParents(javax.servlet.http.HttpServletRequest request,
@RequestParam(required=true)
String[] parents)
parents - a list of parents@RequestMapping(value="",
method=GET,
params={"parents","locale"})
public org.springframework.http.ResponseEntity<Map<String,Ji18nTranslation>> getTranslationsForLocaleForParents(javax.servlet.http.HttpServletRequest request,
@RequestParam(required=true)
String[] parents,
@RequestParam(required=true)
String locale)
parents - a listlocale - the locale@RequestMapping(value="{id}",
method=DELETE)
public org.springframework.http.ResponseEntity<Ji18nTranslation> deleteTranslation(javax.servlet.http.HttpServletRequest request,
@PathVariable
String id)
id - the id of the translation@RequestMapping(value="",
method=DELETE,
params="locale")
public org.springframework.http.ResponseEntity<Ji18nTranslation> deleteTranslation(javax.servlet.http.HttpServletRequest request,
@RequestParam(required=true)
String parent,
@RequestParam(required=true)
String locale)
parent - the parent resource being translatedlocale - the locale@RequestMapping(value="",
method=DELETE,
params="parent")
public org.springframework.http.ResponseEntity<Collection<Ji18nTranslation>> deleteTranslationsForParent(javax.servlet.http.HttpServletRequest request,
@RequestParam(required=true)
String parent)
parent - the parent resource being deletedpublic void setTranslationService(TranslationService translationService)
Copyright © 2013. All Rights Reserved.