/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.demo.rbac;

/**
 * @author Shen Li
 */
public abstract class AuthenticationLogInterceptor implements AuthenticationManager {
    public void authenticate(String permissionName) {
        System.out.println("Checking permission...");
        System.out.println("To invoke the method needs \"" + permissionName + "\" permission.");
        getAuthenticationManager().authenticate(permissionName);
    }

    protected abstract AuthenticationManager getAuthenticationManager();
}
