List of usage examples for org.apache.wicket Session getAuthorizationStrategy
public IAuthorizationStrategy getAuthorizationStrategy()
From source file:org.wicketstuff.security.components.SecureComponentHelper.java
License:Apache License
/** * Gets the {@link WaspAuthorizationStrategy}. * //www.j a va 2 s.co m * @return the strategy * @throws WicketRuntimeException * if a {@link WaspSession} is not found * @throws ClassCastException * if the session does not contain a {@link WaspAuthorizationStrategy} */ private static WaspAuthorizationStrategy getStrategy() { Session session = Session.get(); if (session instanceof WaspSession) return (WaspAuthorizationStrategy) session.getAuthorizationStrategy(); throw new WicketRuntimeException(session + " is not a " + WaspSession.class); }