Inherit from this class to define a gatekeeper that locks access to your
Place in specific situation. For example:
public class AdminGatekeeper implements Gatekeeper {
private final CurrentUser currentUser;
@Inject
public AdminGatekeeper( CurrentUser currentUser ) {
this.currentUser = currentUser;
}
@Override
public boolean canReveal() {
return currentUser.isAdministrator();
}
}
You must also make sure that your custom Ginjector provides a
getmethod returning this
Gatekeeper if you want to use it with the
com.gwtplatform.mvp.client.annotations.UseGatekeeper annotation.
You should usually bind your
Gatekeeper as a singleton.