} catch (ContentRepositoryException e) {
logger.error("Error trying to look up video resource {} from {}", videoId, repository);
return SKIP_BODY;
}
MovieResource video = null;
MovieContent videoContent = null;
// Store the result in the jsp page context
try {
video = (MovieResource) repository.get(uri);
video.switchTo(language);
videoContent = video.getContent(language);
if (videoContent == null)
videoContent = video.getOriginalContent();
} catch (ContentRepositoryException e) {
logger.warn("Error trying to load video resource " + uri + ": " + e.getMessage(), e);
return SKIP_BODY;
}
// TODO: Check the permissions
// Store the resource and the resource content in the request
stashAndSetAttribute(VideoResourceTagExtraInfo.VIDEO, video);
stashAndSetAttribute(VideoResourceTagExtraInfo.VIDEO_CONTENT, videoContent);
// Add cache tags to the response
response.addTag(CacheTag.Resource, video.getURI().getIdentifier());
response.addTag(CacheTag.Url, video.getURI().getPath());
return EVAL_BODY_INCLUDE;
}