use of org.apache.sling.api.security.AccessSecurityException in project sling by apache.
the class AuthenticatedResourceProvider method transformQuery.
/**
* applies resource access security if configured
*/
private String transformQuery(final String query, final String language) {
String returnValue = query;
if (this.useRAS) {
final ResourceAccessSecurity resourceAccessSecurity = tracker.getProviderResourceAccessSecurity();
if (resourceAccessSecurity != null) {
try {
returnValue = resourceAccessSecurity.transformQuery(returnValue, language, this.resolveContext.getResourceResolver());
} 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, this.resolveContext.getResourceResolver());
} catch (AccessSecurityException e) {
logger.error("AccessSecurityException occurred while trying to transform the query {} (language {}).", new Object[] { query, language }, e);
}
}
return returnValue;
}
Aggregations