public boolean variablesAvailable ( Map < String , Object > model , String ... vars ) { final TemplateContext context = new TemplateContext ( null , null , null , new ScopedMap ( model ) , modelAdaptor , this , new SilentErrorHandler ( ) , null ) ; for ( String var : vars ) { final IfToken token = new IfToken ( var , false ) ; if ( ! ( Boolean ) token . evaluate ( context ) ) { return false ; } } return true ; }
Checks if all given variables are there and if so that they evaluate to true inside an if .