@Override public Set<String> getProtectedViewsUnmodifiable() { return delegate.getProtectedViewsUnmodifiable(); }
@Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#getProtectedViewsUnmodifiable} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#getProtectedViewsUnmodifiable} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#getProtectedViewsUnmodifiable} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#getProtectedViewsUnmodifiable} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#getProtectedViewsUnmodifiable} on the wrapped {@link ViewHandler} object. * </p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#getProtectedViewsUnmodifiable} on the wrapped {@link ViewHandler} object. * </p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#getProtectedViewsUnmodifiable} on the wrapped {@link ViewHandler} object. * </p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#getProtectedViewsUnmodifiable} on the wrapped {@link ViewHandler} object. * </p> * * @see ViewHandler#getProtectedViewsUnmodifiable * @since 2.2 */ @Override public Set<String> getProtectedViewsUnmodifiable() { return getWrapped().getProtectedViewsUnmodifiable(); }
public static boolean isViewProtected(FacesContext context, String viewId) { Set<String> protectedViews = context.getApplication().getViewHandler().getProtectedViewsUnmodifiable(); if (!protectedViews.isEmpty()) { boolean matchFound = false; for (String urlPattern : protectedViews) { if (ViewProtectionUtils.matchPattern(viewId, urlPattern)) { matchFound = true; break; } } return matchFound; } else { return false; } } }
public static boolean isViewProtected(FacesContext context, String viewId) { Set<String> protectedViews = context.getApplication().getViewHandler().getProtectedViewsUnmodifiable(); if (!protectedViews.isEmpty()) { boolean matchFound = false; for (String urlPattern : protectedViews) { if (ViewProtectionUtils.matchPattern(viewId, urlPattern)) { matchFound = true; break; } } return matchFound; } else { return false; } } }
/** * Notfication that a session has been created. * @param event the notification event */ public void sessionCreated(HttpSessionEvent event) { ApplicationAssociate associate = getAssociate(); // PENDING this should only create a new list if in dev mode if (associate != null && associate.isDevModeEnabled()) { if (activeSessions == null) { activeSessions = new ArrayList<HttpSession>(); } activeSessions.add(event.getSession()); } boolean doCreateToken = true; // Try to avoid creating the token unless we actually have protected views if (null != associate) { Application application = associate.getApplication(); ViewHandler viewHandler = application.getViewHandler(); doCreateToken = !viewHandler.getProtectedViewsUnmodifiable().isEmpty(); } if (doCreateToken) { StateHelper.createAndStoreCryptographicallyStrongTokenInSession(event.getSession()); } }
Set<String> urlPatterns = viewHandler.getProtectedViewsUnmodifiable();
Set<String> urlPatterns = viewHandler.getProtectedViewsUnmodifiable();
Set<String> urlPatterns = viewHandler.getProtectedViewsUnmodifiable();
Set<String> urlPatterns = viewHandler.getProtectedViewsUnmodifiable();
/** * Notfication that a session has been created. * * @param event the notification event */ public void sessionCreated(HttpSessionEvent event) { ApplicationAssociate associate = getAssociate(); // PENDING this should only create a new list if in dev mode if (associate != null && associate.isDevModeEnabled()) { activeSessions.add(event.getSession()); } boolean doCreateToken = true; // Try to avoid creating the token unless we actually have protected views if (null != associate) { Application application = associate.getApplication(); ViewHandler viewHandler = application.getViewHandler(); doCreateToken = !viewHandler.getProtectedViewsUnmodifiable().isEmpty(); } if (doCreateToken) { StateHelper.createAndStoreCryptographicallyStrongTokenInSession(event.getSession()); } }
/** * Notfication that a session has been created. * * @param event the notification event */ public void sessionCreated(HttpSessionEvent event) { ApplicationAssociate associate = getAssociate(); // PENDING this should only create a new list if in dev mode if (associate != null && associate.isDevModeEnabled()) { activeSessions.add(event.getSession()); } boolean doCreateToken = true; // Try to avoid creating the token unless we actually have protected views if (null != associate) { Application application = associate.getApplication(); ViewHandler viewHandler = application.getViewHandler(); doCreateToken = !viewHandler.getProtectedViewsUnmodifiable().isEmpty(); } if (doCreateToken) { StateHelper.createAndStoreCryptographicallyStrongTokenInSession(event.getSession()); } }
/** * Notfication that a session has been created. * * @param event the notification event */ public void sessionCreated(HttpSessionEvent event) { ApplicationAssociate associate = getAssociate(); // PENDING this should only create a new list if in dev mode if (associate != null && associate.isDevModeEnabled()) { activeSessions.add(event.getSession()); } boolean doCreateToken = true; // Try to avoid creating the token unless we actually have protected views if (null != associate) { Application application = associate.getApplication(); ViewHandler viewHandler = application.getViewHandler(); doCreateToken = !viewHandler.getProtectedViewsUnmodifiable().isEmpty(); } if (doCreateToken) { StateHelper.createAndStoreCryptographicallyStrongTokenInSession(event.getSession()); } }