public interface Gatekeeper
Place
in specific situation. For example:
public class AdminGatekeeper implements Gatekeeper { private final CurrentUser currentUser;You must also make sure that your custom Ginjector provides a@
Inject public AdminGatekeeper( CurrentUser currentUser ) { this.currentUser = currentUser; }@
Override public boolean canReveal() { return currentUser.isAdministrator(); } }
get
method returning this Gatekeeper
if you want to use it with the
UseGatekeeper
annotation.
You should usually bind your Gatekeeper
as a singleton.Copyright © 2010-2014 ArcBees. All Rights Reserved.