001
014
015 package com.liferay.portlet.journal.util;
016
017 import com.liferay.portal.kernel.xml.Element;
018 import com.liferay.portlet.journal.TransformException;
019
020 import java.util.List;
021 import java.util.Map;
022
023
029 public class JournalVmUtil {
030
031 public static List<TemplateNode> extractDynamicContents(Element parent)
032 throws TransformException {
033
034 return _instance._velocityTemplateParser.extractDynamicContents(
035 null, parent);
036 }
037
038 public static String transform(
039 Map<String, String> tokens, String viewMode, String languageId,
040 String xml, String script)
041 throws TransformException {
042
043 return _instance._velocityTemplateParser.transform(
044 null, tokens, viewMode, languageId, xml, script);
045 }
046
047 private JournalVmUtil() {
048 _velocityTemplateParser = new VelocityTemplateParser();
049 }
050
051 private static JournalVmUtil _instance = new JournalVmUtil();
052
053 private VelocityTemplateParser _velocityTemplateParser;
054
055 }