/** * @see javax.portlet.PortletRequest#getLocale() */ public Locale getLocale() { return request.getLocale(); }
public Locale getLocale() { return request.getLocale(); }
public void processResults(ActionRequest request, ActionResponse response) throws IOException, PortletException, ConfigurationException { this.validateRequest(request); final String portAppName = StringUtils.trimToNull(request.getParameter(APP_NAME)); final String portAppDepIdStr = StringUtils.trimToNull(request.getParameter(BASE_APP_ID)); final String portAppDesc = StringUtils.trimToNull(request.getParameter(APP_DESC)); final PortletApplicationDeploymentId portAppDepId = new PortletApplicationDeploymentId(portAppDepIdStr); final PortletSession session = request.getPortletSession(); IPortletApplicationDefinitionControl portAppDefControl = (IPortletApplicationDefinitionControl)session.getAttribute(PortletApplicationDefinitionWizard.PARAM_PORT_APP_DEF); if (session.getAttribute(PortletApplicationDefinitionWizard.PARAM_PORT_APP_DEF_ID) == null && (portAppDefControl == null || !portAppDefControl.getPortletApplicationDeploymentId().equals(portAppDepId))) { final IPortletApplicationDeployment portAppDep = this.portletApplicationDeploymentRegistry.getPortletApplicationDeployment(portAppDepId); portAppDefControl = this.transientPortletApplicationDefinitionRegistry.createTransientPortletApplicationDefinitionControl(portAppDep.getPortletApplicationDeploymentId()); session.setAttribute(PortletApplicationDefinitionWizard.PARAM_PORT_APP_DEF, new LocalizedPortletApplicationDefinitionControlImpl(portAppDefControl, this.localeManager)); } final Map<Locale, IDisplayName> displayNames = portAppDefControl.getDisplayNames(); final DisplayNameImpl newDisplayName = new DisplayNameImpl(portAppName, request.getLocale()); displayNames.put(newDisplayName.getLocale(), newDisplayName); final Map<Locale, IDescription> descriptions = portAppDefControl.getDescriptions(); final DescriptionImpl newDescription = new DescriptionImpl(portAppDesc, request.getLocale()); descriptions.put(newDescription.getLocale(), newDescription); }