=Context-Awareness=
{{Mark|Updated with Version 7.8}}: {{Code|context}} variable has been split into {{Code|queryContext}} and {{Code|staticContext}}.
Java classes can be coupled more closely to the BaseX core library.
If an instantiated a class inherits the abstract [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/query/QueryModule.java QueryModule] class of BaseX, it will get access to the {{Code|context}} variable, which is an instance of the two variables [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/query/QueryContext.java QueryContextqueryContext] classand [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/query/StaticContext. It provides java staticContext] variables are available, which can be used to access to all the global and static and dynamic properties context of the current a query. Additionally, the default properties of functions can be changed via annotations:
* Java functions can only be executed by users with [[User_Management|Admin permissions]]. You may annotate a function with {{Code|@Requires(<Permission>)}} to also make it accessible to users with less privileges.
=Changelog=
; Version 7.8
* Updated: {{Code|context}} variable has been split into {{Code|queryContext}} and {{Code|staticContext}}.
; Version 7.2.1