001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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    /**
024     * @author         Alexander Chow
025     * @author         Brian Wing Shun Chan
026     * @author         Raymond Augé
027     * @deprecated
028     */
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    }