throws ResourceCreationException, ResourceLoadingException
{
if (data instanceof CachingResourceBundleData)
{
// todo: Friggin' cheap hack
final CachingResourceBundleData cachingResourceBundleData = (CachingResourceBundleData) data;
data = cachingResourceBundleData.getBackend();
}
if (data instanceof RepositoryResourceBundleData == false)
{
data = manager.loadResourceBundle(data.getKey());
if (data instanceof CachingResourceBundleData)
{
// todo: Friggin' cheap hack 2
final CachingResourceBundleData cachingResourceBundleData = (CachingResourceBundleData) data;
data = cachingResourceBundleData.getBackend();
}
}
if (data instanceof RepositoryResourceBundleData == false)
{
throw new ContentNotRecognizedException("No valid handler for the given content.");