@Override public Source resolve(String href, String base) { try { String content = null; Matcher matcher = _templateIdPattern.matcher(href); if (matcher.matches()) { long articleGroupId = GetterUtil.getLong( _tokens.get("article_group_id")); String templateId = matcher.group(1); content = JournalHelperUtil.getTemplateScript( articleGroupId, templateId, _tokens, _languageId); } else { content = HttpUtil.URLtoString(href); } return new StreamSource(new UnsyncStringReader(content)); } catch (Exception e) { _log.error(href + " does not reference a valid template"); return null; } }
content = HttpUtil.URLtoString(options);