final ResourceAccessSecurityTracker tracker = ctx.getResourceAccessSecurityTracker();
String returnValue = query;
if (useResourceAccessSecurity) {
final ResourceAccessSecurity resourceAccessSecurity = tracker
.getProviderResourceAccessSecurity();
if (resourceAccessSecurity != null) {
try {
returnValue = resourceAccessSecurity.transformQuery(
returnValue, language, resolver);
} catch (AccessSecurityException e) {
logger.error(
"AccessSecurityException occurred while trying to transform the query {} (language {}).",
new Object[] { query, language }, e);
}
}
}
final ResourceAccessSecurity resourceAccessSecurity = tracker
.getApplicationResourceAccessSecurity();
if (resourceAccessSecurity != null) {
try {
returnValue = resourceAccessSecurity.transformQuery(
returnValue, language, resolver);
} catch (AccessSecurityException e) {
logger.error(
"AccessSecurityException occurred while trying to transform the query {} (language {}).",
new Object[] { query, language }, e);