public String getResourceID() { return this.requestContext.getBaseURL().getResourceId(); }
public String getResourceID() { return this.requestContext.getBaseURL().getResourceId(); }
public HstServletResponseState(HttpServletRequest request, HttpServletResponse response) { super(request, response); this.response = response; HstRequestContext requestContext = HstRequestUtils.getHstRequestContext(request); isActionResponse = (requestContext.getBaseURL().getActionWindowReferenceNamespace() != null); isResourceResponse = (requestContext.getBaseURL().getResourceWindowReferenceNamespace() != null); isRenderResponse = (!this.isActionResponse && !this.isResourceResponse); isStateAwareResponse = isActionResponse; isMimeResponse = isRenderResponse || isResourceResponse; }
public HstURL createURL(String type, String referenceNamespace, HstContainerURL containerURL, HstRequestContext requestContext, String contextPath) { // if container url == null, use the requestContext baseUrl HstContainerURL baseContainerURL = (containerURL == null ? requestContext.getBaseURL() : containerURL); if (referenceNamespaceIgnored && HstURL.RENDER_TYPE.equals(type)) { referenceNamespace = ""; } return new HstURLImpl(type, baseContainerURL, referenceNamespace, getContainerURLProvider(), requestContext, contextPath); } }
public HstURL createURL(String type, String referenceNamespace, HstContainerURL containerURL, HstRequestContext requestContext) { // if container url == null, use the requestContext baseUrl HstContainerURL baseContainerURL = (containerURL == null ? requestContext.getBaseURL() : containerURL); if (referenceNamespaceIgnored && HstURL.RENDER_TYPE.equals(type)) { referenceNamespace = ""; } return new HstURLImpl(type, baseContainerURL, referenceNamespace, getContainerURLProvider(), requestContext); } }
public Serializable create(final HstRequestContext requestContext) { HttpServletRequest request = requestContext.getServletRequest(); StringBuilder requestInfo = new StringBuilder(256); final char delim = '\uFFFF'; Optional<String> antiCacheValue = webFilesAntiCacheValue; if (antiCacheValue == null) { antiCacheValue = populateAntiCacheValue(requestContext); } if (antiCacheValue.isPresent()) { requestInfo.append(antiCacheValue.get()).append(delim); } // Implementers should differentiate between GET and HEAD requests otherwise blank pages // can result. requestInfo.append(request.getMethod()).append(delim); requestInfo.append(HstRequestUtils.getFarthestRequestScheme(request)).append(delim); requestInfo.append(HstRequestUtils.getFarthestRequestHost(request)).append(delim); requestInfo.append(request.getRequestURI()).append(delim); requestInfo.append(StringUtils.defaultString(request.getQueryString())).append(delim); // AFter an internal HST FORWARD, all the above parts are the same because same http request, // but the base URL pathInfo has been changed. Hence, we need to account for pathInfo // to make sure that in a FORWARDED request we do not get the same cached entry requestInfo.append(requestContext.getBaseURL().getPathInfo()).append(delim); return requestInfo.toString(); }
public HstURL createNavigationalURL(String pathInfo) { HstContainerURL navURL = requestContext.getContainerURLProvider().createURL(requestContext.getBaseURL(), pathInfo); return requestContext.getURLFactory().createURL(HstURL.RENDER_TYPE, null, navURL, requestContext); }
public HstURL createNavigationalURL(String pathInfo) { HstContainerURL navURL = this.requestContext.getContainerURLProvider().createURL(requestContext.getBaseURL(), pathInfo); return this.requestContext.getURLFactory().createURL(HstURL.RENDER_TYPE, null, navURL, this.requestContext); }
public HstURL createNavigationalURL(String pathInfo) { HstContainerURL navURL = this.requestContext.getContainerURLProvider().createURL(requestContext.getBaseURL(), pathInfo); return this.requestContext.getURLFactory().createURL(HstURL.RENDER_TYPE, null, navURL, this.requestContext); }
windowName = window.getName(); HstRequestContext hstRequestContext = hstRequest.getRequestContext(); HstContainerURL url = hstRequestContext.getBaseURL(); pathInfo = url.getPathInfo(); refNamespace = hstRequest.getReferenceNamespace();
final boolean isComponentRenderingRequest = (request.getRequestContext().getBaseURL().getComponentRenderingWindowReferenceNamespace() != null); if (isComponentRenderingRequest) { log.debug("No auto-reload head element will be added for component rendering request");
@Override protected HttpServletRequest getJaxrsRequest(HstRequestContext requestContext, HttpServletRequest request) throws ContainerException { String uuid = PathUtils.normalizePath(requestContext.getBaseURL().getPathInfo()); if (uuid == null) { throw new ContainerException("CXFJaxrsHstConfigService expects a 'uuid' as pathInfo but pathInfo was null. Cannot process REST call");
public HstContainerURL parseURL(HstRequestContext requestContext, ResolvedSiteMount mount, String requestPath) { HstContainerURLImpl url = new HstContainerURLImpl(); HstContainerURL baseURL = requestContext.getBaseURL(); url.setContextPath(baseURL.getContextPath()); url.setHostName(baseURL.getHostName()); url.setPortNumber(baseURL.getPortNumber()); url.setResolvedMountPath(mount.getResolvedMountPath()); url.setRequestPath(requestPath); String [] namespacedPartAndPathInfo = splitPathInfo(requestPath.substring(mount.getResolvedMountPath().length()), baseURL.getCharacterEncoding()); url.setPathInfo(namespacedPartAndPathInfo[1]); parseRequestInfo(url,namespacedPartAndPathInfo[0]); url.setCharacterEncoding(baseURL.getCharacterEncoding()); return url; }
HstContainerURL baseURL = requestContext.getBaseURL(); String actionWindowReferenceNamespace = baseURL.getActionWindowReferenceNamespace();
public HstContainerURL parseURL(HstRequestContext requestContext, ResolvedMount mount, String requestPath, Map<String, String []> queryParams) { HstContainerURLImpl url = new HstContainerURLImpl(); HstContainerURL baseURL = requestContext.getBaseURL(); url.setContextPath(baseURL.getContextPath()); url.setHostName(baseURL.getHostName()); url.setPortNumber(baseURL.getPortNumber()); url.setResolvedMountPath(mount.getResolvedMountPath()); url.setRequestPath(requestPath); url.setPathInfo(requestPath.substring(mount.getResolvedMountPath().length())); url.setCharacterEncoding(baseURL.getCharacterEncoding()); url.setURIEncoding(baseURL.getURIEncoding()); url.setParameters(queryParams); parseRequestInfo(url); return url; }
String componentRenderingWindowReferenceNamespace = context.getRequestContext().getBaseURL() .getComponentRenderingWindowReferenceNamespace(); if (componentRenderingWindowReferenceNamespace != null) {
/** * returns <code>true</code> when the component window is marked as async. When the component is async due to a * ancestor is async, we also set <code>{@link #ASYNC_RENDERED_BY_ANCESTOR_FLAG_ATTR_NAME}</code> is * <code>true</code> on the HstRequest to indicate async due to ancestor * * @param window * @param request * @return */ private boolean isAsync(final HstComponentWindow window, final HstRequest request) { // in cms request context, we never load asynchronous if (request.getRequestContext().isCmsRequest()) { return false; } if (request.getRequestContext().getBaseURL().getComponentRenderingWindowReferenceNamespace() != null) { return false; } // check if there is already an async parent. HstComponentWindow parent = window.getParentWindow(); while (parent != null) { if (parent.getComponentInfo().isAsync()) { request.setAttribute(ASYNC_RENDERED_BY_ANCESTOR_FLAG_ATTR_NAME, Boolean.TRUE); return true; } parent = parent.getParentWindow(); } // check whether the component itself is asyn return window.getComponentInfo().isAsync(); }
HstRequestContext requestContext = context.getRequestContext(); if (!context.getServletResponse().isCommitted() && requestContext.getBaseURL().getResourceWindowReferenceNamespace() != null) { HstContainerURL baseURL = requestContext.getBaseURL(); String resourceWindowRef = baseURL.getResourceWindowReferenceNamespace(); HstComponentWindow window = null;
@Override public void invoke(ValveContext context) throws ContainerException { HstRequestContext requestContext = context.getRequestContext(); HstContainerURL baseURL = requestContext.getBaseURL(); String resourceWindowRef = baseURL.getResourceWindowReferenceNamespace();
@Override public void invoke(ValveContext context) throws ContainerException { final HstRequestContext requestContext = context.getRequestContext(); final String componentRenderingWindowReferenceNamespace = requestContext.getBaseURL().getComponentRenderingWindowReferenceNamespace(); if (componentRenderingWindowReferenceNamespace == null) { // not a compoment rendering request, so skip it.. context.invokeNext(); return; } final HstComponentWindow window = context.getRootComponentWindow(); final HttpServletResponse servletResponse = requestContext.getServletResponse(); if (requestContext.isCmsRequest() || requestContext.isPreview()) { setNoCacheHeaders(servletResponse); } if (!window.getComponentInfo().isStandalone()) { // set the rendering window firsst context.setRootComponentRenderingWindow(window); // set the sitemap item root window as the root window because the backing componentInfo is standalone HstComponentWindow root = window; while(root.getParentWindow() != null) { root = root.getParentWindow(); } context.setRootComponentWindow(root); } context.invokeNext(); }