/** * Resolves with the help of the current resolvedSiteMapItem to a new sitemap item with path <code>pathInfo</code> * @param request * @param response * @param currentResolvedSiteMapItem * @param pathInfo * @throws MatchException when the <code>pathInfo</code> cannot be matched * @return a new ResolvedSiteMapItem */ public ResolvedSiteMapItem matchSiteMapItem(HttpServletRequest request, HttpServletResponse response, ResolvedSiteMapItem currentResolvedSiteMapItem, String pathInfo) throws MatchException { return currentResolvedSiteMapItem.getResolvedSiteMount().matchSiteMapItem(pathInfo); }
@Override public ResolvedMount matchMount(final String contextPath, final String requestPath) throws MatchException { final ResolvedMount resolvedMount = delegatee.matchMount(contextPath, requestPath); return decoratedResolvedMount(resolvedMount); } }
public Credentials getDefaultCredentials(HstRequestContext requestContext) { if (defaultCredentialsForPreviewMode != null && requestContext.isPreview()) { return defaultCredentialsForPreviewMode; } return defaultCredentials; }
/** * Get the {@link Mount} for the current */ protected Mount getMount(final HstRequest request){ return request.getRequestContext().getResolvedMount().getMount(); }
/** * See {@link #getParameter(String, HstRequest)}, but now, only resolved parameters directly on the HstComponent are taken into * acoount: in other words, no inheritance of parameters is applied * @param name * @param request * @return the resolved parameter value for this name, or <code>null</null> if not present */ public String getLocalParameter(String name, HstRequest request) { return (String)this.getComponentConfiguration().getLocalParameter(name, request.getRequestContext().getResolvedSiteMapItem()); }
/** * See {@link #getParameters(HstRequest)}, but now, only resolved parameter map of parameters is returned that is directly on * the HstComponenConfiguration, thus, no inheritance is applied * @param request * @return Map of all parameters, and when no parameters present, return empty map. */ public Map<String,String> getLocalParameters(HstRequest request){ return this.getComponentConfiguration().getLocalParameters(request.getRequestContext().getResolvedSiteMapItem()); }
protected String getParameter(String name, HstRequest request, String defaultValue) { String value = (String) this.getComponentConfiguration().getParameter(name, request.getRequestContext().getResolvedSiteMapItem()); return (value != null ? value : defaultValue); } }
/** * @param resolvedSiteMapItem * @return the HstURLFactory */ public HstURLFactory getURLFactory(ResolvedSiteMapItem resolvedSiteMapItem) { HstURLFactory factory = resolvedSiteMapItem.getResolvedSiteMount().getResolvedVirtualHost().getVirtualHost().getVirtualHosts().getVirtualHostsManager().getUrlFactory(); return factory; } }
private String getVersion(final HstRequestContext requestContext) throws WebFileException { final String version = requestContext.getResolvedSiteMapItem().getParameter("version"); if (version == null) { log.info("Version is null. Serving latest WebFile version and don't set any cache headers on the response"); } return version; }
/** * See {@link #getComponentParameter(String)}, where we now return all resolved parameters (thus with inheritance of * ancestor components) * @return Map of all parameters, and when no parameters present, return empty map. */ public Map<String,String> getComponentParameters(){ return this.getComponentConfiguration().getParameters(RequestContextProvider.get().getResolvedSiteMapItem()); }
public HttpServletRequest getServletRequest() { return requestContext.getServletRequest(); }
protected String getSiteContentPath(HttpServletRequest servletRequest) { HstRequestContext requestContext = getHstRequestContext(servletRequest); ResolvedSiteMount resolvedSiteMount = requestContext.getResolvedSiteMount(); return resolvedSiteMount.getSiteMount().getMountPoint() + "/" + HstNodeTypes.NODENAME_HST_CONTENTNODE; }
private Map<DelegateSessionKey, Session> getSessionMap(final HstRequestContext requestContext) { return (Map<DelegateSessionKey, Session>)requestContext.getAttribute(SESSIONS_KEY_MAP_ATTR_NAME); }
@Override /* * temporarily splitting off and saving suffix from pathInfo until this is generally handled with HSTTWO-1189 */ protected String getJaxrsPathInfo(HstRequestContext requestContext, HttpServletRequest request) throws ContainerException { return requestContext.getPathSuffix(); }
public HttpServletResponse getServletResponse() { return requestContext.getServletResponse(); }
private boolean schemeCannotBeDifferent() { final Mount requestMount = requestContext.getResolvedMount().getMount(); if (!mount.containsMultipleSchemes() && !requestMount.containsMultipleSchemes() && mount.getScheme().equals(requestMount.getScheme())) { return true; } return false; }
/** * See {@link #getComponentParameter(String)}, but now, only resolved parameters directly on the HstComponent are taken into * account: in other words, no inheritance of parameters is applied * @param name * @return the resolved parameter value for this name, or <code>null</null> if not present */ public String getComponentLocalParameter(String name) { return (String)this.getComponentConfiguration().getLocalParameter(name, RequestContextProvider.get().getResolvedSiteMapItem()); }
/** * See {@link #getComponentParameters()}, but now, only resolved parameter map of parameters is returned that is directly on * the HstComponenConfiguration, thus, no inheritance is applied * @return Map of all parameters, and when no parameters present, return empty map. */ public Map<String,String> getComponentLocalParameters(){ return this.getComponentConfiguration().getLocalParameters(RequestContextProvider.get().getResolvedSiteMapItem()); }
public Credentials getDefaultCredentials(HstRequestContext requestContext) { if (defaultCredentialsForPreviewMode != null && requestContext.isPreview()) { return defaultCredentialsForPreviewMode; } return defaultCredentials; }
private List<Session> getSessionList(final HstRequestContext requestContext) { return (List<Session>)requestContext.getAttribute(SESSIONS_KEY_LIST_ATTR_NAME); }