resourceWatcher.check(retrieveCacheKey(request));
updateAuthorizationKey();
}
private CacheKey retrieveCacheKey(final HttpServletRequest request) {
CacheKey cacheKey = null;
final String resourceTypeAsString = request.getParameter(PARAM_RESOURCE_TYPE);
final String groupName = request.getParameter(PARAM_GROUP_NAME);
try {
final ResourceType resourceType = ResourceType.get(resourceTypeAsString);
isTrue(groupName != null);
if (groupName != null) {
LOG.debug("groupName={}, resourceType={}", groupName, resourceType);
cacheKey = new CacheKey(groupName, resourceType);
}
} catch (final IllegalArgumentException e) {
LOG.debug("groupName={}, resourceType={}", groupName, resourceTypeAsString);
throw WroRuntimeException.wrap(e, "Cannot retrieve cacheKey from the request");
}