/** * Reads value from the request parameters, * will return <code>null</code> if the value is not available or only white space.<p> * * The value of the request will also be decoded using <code>{@link CmsEncoder#decode(String)}</code> * and also trimmed using <code>{@link String#trim()}</code>.<p> * * @param request the request to read the parameter from * @param paramName the parameter name to read * * @return the request parameter value for the given parameter */ public static String getNotEmptyDecodedParameter(HttpServletRequest request, String paramName) { String result = getNotEmptyParameter(request, paramName); if (result != null) { result = CmsEncoder.decode(result.trim()); } return result; }
/** * Reads value from the request parameters, * will return <code>null</code> if the value is not available or only white space.<p> * * The value of the request will also be decoded using <code>{@link CmsEncoder#decode(String)}</code> * and also trimmed using <code>{@link String#trim()}</code>.<p> * * @param request the request to read the parameter from * @param paramName the parameter name to read * * @return the request parameter value for the given parameter */ public static String getNotEmptyDecodedParameter(HttpServletRequest request, String paramName) { String result = getNotEmptyParameter(request, paramName); if (result != null) { result = CmsEncoder.decode(result.trim()); } return result; }
/** * Returns the pc type of the current request.<p> * * @param request the request * * @return the pc type */ private static String getPcType(HttpServletRequest request) { String pcType = null; if (!OpenCms.getLoginManager().isEnableSecurity()) { // if security option is disabled, just set PC type to "private" to get common login dialog pcType = PCTYPE_PRIVATE; } else { // security option is enabled, try to get PC type from request parameter pcType = CmsRequestUtil.getNotEmptyParameter(request, PARAM_PCTYPE); if (pcType == null) { Cookie pcTypeCookie = getCookie(request, COOKIE_PCTYPE); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(pcTypeCookie.getValue()) && !"null".equals(pcTypeCookie.getValue())) { pcType = pcTypeCookie.getValue(); } } } return pcType; }
String actionLogout = CmsRequestUtil.getNotEmptyParameter(request, PARAM_ACTION_LOGOUT); boolean logout = Boolean.valueOf(actionLogout).booleanValue(); String oufqn = request.getParameter(PARAM_OUFQN); String username = CmsRequestUtil.getNotEmptyParameter(request, PARAM_USERNAME); if (username != null) { String requestedResource = CmsRequestUtil.getNotEmptyParameter( request, CmsWorkplaceManager.PARAM_LOGIN_REQUESTED_RESOURCE);
m_username = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_USERNAME); if (m_username != null) { m_password = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_PASSWORD); m_actionLogin = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_ACTION_LOGIN); m_oufqn = getRequest().getParameter(PARAM_OUFQN); if (m_oufqn == null) { m_pcType = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_PCTYPE); } else { m_actionLogout = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_ACTION_LOGOUT); String actionGetOus = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_ACTION_GETOULIST); if (Boolean.TRUE.toString().equals(actionGetOus)) { return getJsonOrgUnitList(); m_requestedResource = CmsRequestUtil.getNotEmptyParameter( getRequest(), CmsWorkplaceManager.PARAM_LOGIN_REQUESTED_RESOURCE); String wpData = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_WPDATA); if (wpData != null) { wpData = CmsEncoder.escapeXml(wpData);
m_username = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_USERNAME); if (m_username != null) { m_password = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_PASSWORD); m_actionLogin = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_ACTION_LOGIN); m_oufqn = getRequest().getParameter(PARAM_OUFQN); if (m_oufqn == null) { m_actionLogout = CmsRequestUtil.getNotEmptyParameter(getRequest(), PARAM_ACTION_LOGOUT); m_requestedResource = CmsRequestUtil.getNotEmptyParameter( getRequest(), CmsWorkplaceManager.PARAM_LOGIN_REQUESTED_RESOURCE);