Checks if the selected template context is "templatemapper".

@param request the current request
@return true if the selected template context is "templatemapper"
333217
public static String getTemplateMapperConfig(ServletRequest request) {

        String result = null;
        CmsTemplateContext templateContext = (CmsTemplateContext)request.getAttribute(
            CmsTemplateContextManager.ATTR_TEMPLATE_CONTEXT);
        if (templateContext != null) {
            I_CmsTemplateContextProvider provider = templateContext.getProvider();
            if (provider instanceof I_CmsTemplateMappingContextProvider) {
                result = ((I_CmsTemplateMappingContextProvider)provider).getMappingConfigurationPath(
                    templateContext.getKey());
            }
        }
        return result;
    }
450379
public static boolean isFormMultipartPost(HttpServletRequest request) {
        if (!isHttpPostRequest(request)) {
            return false;
        }

        String contentType = request.getContentType();
        if (contentType == null) {
            return false;
        }

        if (contentType.toLowerCase().startsWith("multipart/form-data")) {
            return true;
        }

        return false;
    }
478540
private boolean isValid(String request) {

        String tmp = decodePercent(request);
        if(tmp.indexOf('<') != -1 ||
           tmp.indexOf('>') != -1 ) {
            return false;
        }

        return true;
    }
1120973
public static boolean isJsonRequest(ServletRequest request) {

        HttpServletRequest sr = (HttpServletRequest)request;
        return (sr.getQueryString() != null) && (sr.getQueryString().contains("__json=true"));
    }
1325050
public static boolean isTemplateExist(RestClient client, String template) throws IOException {
		Response response = client.performRequest(new Request("HEAD", "/_template/" + template));
		return response.getStatusLine().getStatusCode() == 200;
	}
814366
protected boolean isTraceEnabled(ServerRequest request) {
		String parameter = request.queryParam("trace").orElse("false");
		return !"false".equalsIgnoreCase(parameter);
	}
723013
public static Map<String, List<StringValue>> getPageParametersMap(final Request request)
	{
		final Map<String, List<StringValue>> map = new HashMap<>();
		addToParameters(request.getRequestParameters(), map);
		addToParameters(request.getQueryParameters(), map);
		addToParameters(request.getPostParameters(), map);
		return map;
	}
683537
protected void checkTemplate() {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_simpleFieldFolderName.getValue())) {
            return;
        }
        if (!m_clonedCms.existsResource(getSiteRoot())) {
            return;
        }
        try {
            String templateValue = m_clonedCms.readPropertyObject(
                getSiteRoot(),
                CmsPropertyDefinition.PROPERTY_TEMPLATE,
                false).getValue();
            m_simpleFieldTemplate.addItem(templateValue);
            m_simpleFieldTemplate.setValue(templateValue);
        } catch (CmsException e) {
            //
        }
    }
1243152
protected StringBuffer getHeaderSection(HttpServletRequest request) {
		StringBuffer sb = new StringBuffer(mainScriptTemplate.toString());
		sb.append("JAWR.app_context_path='").append(request.getContextPath()).append("';\n");
		return sb;
	}
53095
public void checkSkinName(final HttpServletRequest request) {
    String reqpar = request.getParameter(getSkinNameRequestName());

    if (reqpar != null) {
      if (reqpar.equals("!")) {
        // Go back to unsticky SkinName
        setSkinNameSticky(false);
      } else {
        setSkinName(reqpar);
        setSkinNameSticky(false);
      }
    }

    reqpar = request.getParameter(getSkinNameStickyRequestName());
    if (reqpar != null) {
      if (reqpar.equals("!")) {
        // Go back to unsticky SkinName
        setSkinNameSticky(false);
      } else {
        setSkinName(reqpar);
        setSkinNameSticky(true);
      }
    }
  }
229718
def get_template_from_request(request, page=None):
    
    page_templates = settings.get_page_templates()
    if len(page_templates) == 0:
        return settings.PAGE_DEFAULT_TEMPLATE
    template = request.POST.get('template', request.GET.get('template', None))
    if template is not None and \
            (template in list(dict(page_templates).keys()) or
            template == settings.PAGE_DEFAULT_TEMPLATE):
        return template
    if page is not None:
        return page.get_template()
    return settings.PAGE_DEFAULT_TEMPLATE
984053
public static boolean useXhtmlContentType(HttpServletRequest request) {
		// Some test accept headers:
		//   Firefox: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
		//   IE 6: */*
		//   IE 8: */*
		//   IE 8 Compat: */*
		@SuppressWarnings("unchecked")
		Enumeration<String> acceptValues = request.getHeaders("Accept");

		boolean hasAcceptHeader = false;
		boolean hasAcceptApplicationXhtmlXml = false;
		boolean hasAcceptHtmlHtml = false;
		boolean hasAcceptStarStar = false;
		if(acceptValues!=null) {
			while(acceptValues.hasMoreElements()) {
				hasAcceptHeader = true;
				for(String value : StringUtility.splitString(acceptValues.nextElement(), ',')) {
					value = value.trim();
					final List<String> params = StringUtility.splitString(value, ';');
					final int paramsSize = params.size();
					if(paramsSize>0) {
						String acceptType = params.get(0).trim();
						if(acceptType.equals("*/*")) {
							// No q parameter parsing for */*
							hasAcceptStarStar = true;
						} else if(
							// Parse and check the q for these two types
							acceptType.equalsIgnoreCase(CONTENT_TYPE_XHTML)
							|| acceptType.equalsIgnoreCase(CONTENT_TYPE_HTML)
						) {
							// Find any q value
							boolean hasNegativeQ = false;
							for(int paramNum = 1; paramNum<paramsSize; paramNum++) {
								String paramSet = params.get(paramNum).trim();
								if(paramSet.startsWith("q=") || paramSet.startsWith("Q=")) {
									try {
										float q = Float.parseFloat(paramSet.substring(2).trim());
										if(q<0) {
											hasNegativeQ = true;
											break;
										}
									} catch(NumberFormatException err) {
										// Intentionally ignored
									}
								}
							}
							if(!hasNegativeQ) {
								if(acceptType.equalsIgnoreCase(CONTENT_TYPE_XHTML)) hasAcceptApplicationXhtmlXml = true;
								else if(acceptType.equalsIgnoreCase(CONTENT_TYPE_HTML)) hasAcceptHtmlHtml = true;
								else throw new AssertionError("Unexpected value for acceptType: "+acceptType);
							}
						}
					}
				}
			}
		}
		// If the Accept header explicitly contains application/xhtml+xml  (with either no "q" parameter or a positive "q" value) deliver the document using that media type.
		if(hasAcceptApplicationXhtmlXml) return true;
		// If the Accept header explicitly contains text/html  (with either no "q" parameter or a positive "q" value) deliver the document using that media type.
		if(hasAcceptHtmlHtml) return false;
		// If the accept header contains "*/*" (a convention some user agents use to indicate that they will accept anything), deliver the document using text/html.
		if(hasAcceptStarStar) return false;
		// If has no accept headers
		if(!hasAcceptHeader) return true;
		// This choice is not clear from either of the cited documents.  If there is an accept line,
		// and it doesn't have */* or application/xhtml+xml or text/html, we'll serve as text/html
		// since it is a fairly broken client anyway and would be even less likely to know xhtml.
		return false;

	}
648621
public boolean actionInternalUse(HttpServletRequest request) {

        String internal = request.getParameter(PARAM_INTERNAL);

        CmsResource resource;
        boolean internalValue = false;
        if (internal != null) {
            internalValue = true;
        }
        try {
            resource = getCms().readResource(getParamResource(), CmsResourceFilter.ALL);

            int flags = resource.getFlags();

            if (internalValue) {
                flags |= CmsResource.FLAG_INTERNAL;
            } else {
                flags &= ~CmsResource.FLAG_INTERNAL;
            }

            getCms().lockResource(getParamResource());
            getCms().chflags(getParamResource(), flags);

        } catch (CmsException e) {
            m_errorMessages.add(key(Messages.ERR_MODIFY_INTERNAL_FLAG_0));
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            return false;
        }
        return true;
    }
117029
protected boolean includeRequest(HttpServletRequest request) {
        if (ArrayUtils.isNotEmpty(urlsToInclude)) {
            for (String pathPattern : urlsToInclude) {
                if (pathMatcher.match(pathPattern, HttpUtils.getRequestUriWithoutContextPath(request))) {
                    return true;
                }
            }
        }

        return false;
    }
1279427
private boolean isTemplateParent(String templateType, TemplateItem... items) {
        for (TemplateItem item : items) {
            if (templateType.equals(item.templateExtension)) {
                return true;
            }
        }

        return false;
    }
1212030
public static boolean isSourceMapRequest(HttpServletRequest request) {
		String pathInfo = request.getPathInfo();
		boolean result = false;
		if (pathInfo != null && isSourceMapsEnabled(request)) {
			if (pathInfo.endsWith(ILayer.SOURCEMAP_RESOURCE_PATH)) {
				result = true;
			}
		}
		return result;
	}
775806
public boolean acceptTemplate(String tpl)
	{

		if (isInWhiteList(tpl) && !isInBlackList(tpl)) {
			if (containsAllowedPrefix(tpl) && !containsRestrictedPrefix(tpl)) {
				return true;
			}
			else {
				return false;
			}
		}
		else {
			return false;
		}

	}