@Controller(value="blAdminTranslationController") @RequestMapping(value="/translation") public class AdminTranslationController extends AdminAbstractController
Modifier and Type | Field and Description |
---|---|
protected SecurityVerifier |
adminRemoteSecurityService |
protected AdminTranslationControllerExtensionManager |
extensionManager |
protected TranslationFormBuilderService |
formService |
protected PersistenceThreadManager |
persistenceThreadManager |
protected TranslationService |
translationService |
adminNavigationService, CURRENT_ADMIN_MODULE_ATTRIBUTE_NAME, CURRENT_ADMIN_SECTION_ATTRIBUTE_NAME, customCriteriaService, DEFAULT_CONTAINER_VIEW, entityConfiguration, entityFormValidator, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, filterProductTypeExtensionManager, LOG, MODAL_CONTAINER_VIEW, service, validationService
Constructor and Description |
---|
AdminTranslationController() |
Modifier and Type | Method and Description |
---|---|
String |
addTranslation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Saves a new translation to the database.
|
String |
deleteTranslation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
TranslationForm form,
org.springframework.validation.BindingResult result)
Deletes the translation specified by the translation id
|
protected String |
getClassNameForSection(String sectionKey)
Gets the fully qualified ceiling entity classname for this section.
|
protected TranslationForm |
getTranslationForm(EntityForm entityForm)
Converts an EntityForm into a TranslationForm
|
String |
showAddTranslation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
TranslationForm form,
org.springframework.validation.BindingResult result)
Renders a modal dialog that has a list grid of translations for the specified field
|
String |
showUpdateTranslation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
Map<String,String> pathVars,
TranslationForm form,
org.springframework.validation.BindingResult result) |
String |
updateTranslation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Updates the given translation id to the new locale code and translated value
|
String |
viewTranslation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
TranslationForm form,
org.springframework.validation.BindingResult result)
Invoked when the translation button is clicked on a given translatable field
|
attachSectionSpecificInfo, attachSectionSpecificInfo, createSectionCrumb, extractDynamicFormFields, getAddEntityTypes, getCollectionListGrid, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getEntityForm, getEntityForm, getEntityForm, getFirstId, getLastId, getLowerCount, getMaxIndex, getMaxResults, getPageSize, getPersistencePackageRequest, getSectionCrumbs, getSectionCustomCriteria, getSectionKey, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, getUpperCount, modifyAddEntityForm, modifyCriteria, modifyEntityForm, populateJsonValidationErrors, setModelAttributes, setSpecializedNameForFields, translateErrorMessage
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
protected TranslationService translationService
protected TranslationFormBuilderService formService
protected SecurityVerifier adminRemoteSecurityService
protected AdminTranslationControllerExtensionManager extensionManager
protected PersistenceThreadManager persistenceThreadManager
@RequestMapping(value="", method=GET) public String viewTranslation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @ModelAttribute(value="form") TranslationForm form, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- form
- result
- Exception
@RequestMapping(value="/add", method=GET) public String showAddTranslation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @ModelAttribute(value="form") TranslationForm form, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- form
- result
- Exception
@RequestMapping(value="/add", method=POST) public String addTranslation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- entityForm
- result
- viewTranslation(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.springframework.ui.Model, org.broadleafcommerce.openadmin.web.form.TranslationForm, org.springframework.validation.BindingResult)
, which renders the list gridException
@RequestMapping(value="/update", method=GET) public String showUpdateTranslation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @ModelAttribute(value="form") TranslationForm form, org.springframework.validation.BindingResult result) throws Exception
Exception
@RequestMapping(value="/update", method=POST) public String updateTranslation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @ModelAttribute(value="entityForm") EntityForm entityForm, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- entityForm
- result
- viewTranslation(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.springframework.ui.Model, org.broadleafcommerce.openadmin.web.form.TranslationForm, org.springframework.validation.BindingResult)
, which renders the list gridException
@RequestMapping(value="/delete", method=POST) public String deleteTranslation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @ModelAttribute(value="form") TranslationForm form, org.springframework.validation.BindingResult result) throws Exception
request
- response
- model
- id
- form
- result
- viewTranslation(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.springframework.ui.Model, org.broadleafcommerce.openadmin.web.form.TranslationForm, org.springframework.validation.BindingResult)
, which renders the list gridException
protected TranslationForm getTranslationForm(EntityForm entityForm)
entityForm
- protected String getClassNameForSection(String sectionKey)
AdminAbstractController
getClassNameForSection
in class AdminAbstractController
Copyright © 2020. All rights reserved.