package org.apache.wicket.security.web; import org.apache.wicket.PageParameters; import org.apache.wicket.security.actions.WaspAction; import org.apache.wicket.security.checks.ISecurityCheck; import org.apache.wicket.security.components.ISecurePage; import org.apache.wicket.security.components.SecureComponentHelper; /** * Secure page. all other secure pages extend this page. It uses the same layout as * {@link BasePage}. Wicket will automatically check if the user is allowed to instantiate * this page. Feel free to use other super constructors as required by your pages. All * secure pages or components should be granted permissions in the application.hive */ public class SecurePage extends BasePage implements ISecurePage { private static final long serialVersionUID = 1L; /** * Constructor that is invoked when page is invoked without a session. * * @param parameters * Page parameters */ public SecurePage(final PageParameters parameters) { super(parameters); } /** * @see org.apache.wicket.security.components.ISecureComponent#getSecurityCheck() */ public ISecurityCheck getSecurityCheck() { return SecureComponentHelper.getSecurityCheck(this); } /** * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(java.lang.String) */ public boolean isActionAuthorized(String waspAction) { return SecureComponentHelper.isActionAuthorized(this, waspAction); } /** * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(org.apache.wicket.security.actions.WaspAction) */ public boolean isActionAuthorized(WaspAction action) { return SecureComponentHelper.isActionAuthorized(this, action); } /** * @see org.apache.wicket.security.components.ISecureComponent#isAuthenticated() */ public boolean isAuthenticated() { return SecureComponentHelper.isAuthenticated(this); } /** * @see org.apache.wicket.security.components.ISecureComponent#setSecurityCheck(org.apache.wicket.security.checks.ISecurityCheck) */ public void setSecurityCheck(ISecurityCheck check) { SecureComponentHelper.setSecurityCheck(this, check); } }