/** * Determine if this request URL is mapped by PrettyFaces */ public boolean isPrettyRequest() { return getCurrentMapping() != null; }
private void ensurePopulatedContext(final ServletRequest request) { PrettyContext.getCurrentInstance((HttpServletRequest) request); }
/** * Package private -- only {@link PrettyFilter} should be calling this method * -- it does not overwrite existing contexts in Request object */ static PrettyContext newDetachedInstance(final HttpServletRequest request) { Assert.notNull(request, "HttpServletRequest argument was null"); PrettyContext prettyContext = new PrettyContext(request); return prettyContext; }
/** * @return True if the current mapping and request should trigger DynaView * capabilities. */ public boolean shouldProcessDynaview() { if (isPrettyRequest()) { return getCurrentMapping().isDynaView() && !isDynaviewProcessed(); } return false; }
/** * Return the current viewId to which the current request will be forwarded * to JSF. */ public String getCurrentViewId() { if (getCurrentMapping() != null) { return currentMapping.getViewId(); } return ""; }
/** * Return true if the given URL corresponds to one or more mappings in the * current configuration. Strips context path information if necessary. */ public boolean isURLMapped(final String url) { return getConfig().isURLMapped(stripContextPath(url)); }
@Override public void afterInboundLifecycle(final HttpServletRewrite event) { PrettyContext.setCurrentContext(event.getRequest(), null); }
/** * @return True if the current mapping and request should trigger DynaView * capabilities. */ public boolean shouldProcessDynaview() { if (isPrettyRequest()) { return getCurrentMapping().isDynaView() && !isDynaviewProcessed(); } return false; }
/** * Package private -- only {@link PrettyFilter} should be calling this method * -- it does not overwrite existing contexts in Request object */ public static PrettyContext newDetachedInstance(final HttpServletRequest request) { Assert.notNull(request, "HttpServletRequest argument was null"); PrettyContext prettyContext = new PrettyContext(request); return prettyContext; }
/** * Return the current viewId to which the current request will be forwarded * to JSF. */ public String getCurrentViewId() { if (getCurrentMapping() != null) { return currentMapping.getViewId(); } return ""; }
/** * Determine if this request URL is mapped by PrettyFaces */ public boolean isPrettyRequest() { return getConfig().isURLMapped(stripContextPath(originalUri)); }
/** * Determine if this request URL is mapped by PrettyFaces */ public boolean isPrettyRequest() { return getCurrentMapping() != null; }
/** * Get the current PrettyFaces context object, or construct a new one if it * does not yet exist for this request. (Delegates to * {@link FacesContext#getCurrentInstance()} to retrieve the current * {@link HttpServletRequest} object) * * @return current context instance */ public static PrettyContext getCurrentInstance() { FacesContext context = FacesContext.getCurrentInstance(); return getCurrentInstance(context); }
/** * @return True if the current mapping and request should trigger DynaView * capabilities. */ public boolean shouldProcessDynaview() { if (isPrettyRequest()) { return getCurrentMapping().isDynaView() && !isDynaviewProcessed(); } return false; }
/** * Package private -- only {@link PrettyFilter} should be calling this method * -- it does not overwrite existing contexts in Request object */ static PrettyContext newDetachedInstance(final HttpServletRequest request) { Assert.notNull(request, "HttpServletRequest argument was null"); PrettyContext prettyContext = new PrettyContext(request); return prettyContext; }
/** * Return the current viewId to which the current request will be forwarded * to JSF. */ public String getCurrentViewId() { if (getCurrentMapping() != null) { return currentMapping.getViewId(); } return ""; }
/** * Determine if this request URL is mapped by PrettyFaces */ public boolean isPrettyRequest() { return getCurrentMapping() != null; }
/** * @return True if the current mapping and request should trigger DynaView * capabilities. */ public boolean shouldProcessDynaview() { if (isPrettyRequest()) { return getCurrentMapping().isDynaView() && !isDynaviewProcessed(); } return false; }
/** * Package private -- only {@link PrettyFilter} should be calling this method * -- it does not overwrite existing contexts in Request object */ static PrettyContext newDetachedInstance(final HttpServletRequest request) { Assert.notNull(request, "HttpServletRequest argument was null"); PrettyContext prettyContext = new PrettyContext(request); return prettyContext; }
/** * Determine if this request URL is mapped by PrettyFaces */ public boolean isPrettyRequest() { return getCurrentMapping() != null; }