001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.parsers.bbcode;
016    
017    /**
018     * @author Iliyan Peychev
019     * @author Miguel Pastor
020     */
021    public class BBCodeTranslatorUtil {
022    
023            public static final String NEW_THREAD_URL = "${newThreadURL}";
024    
025            public static BBCodeTranslator getBBCodeTranslator() {
026                    return _bbCodeTranslator;
027            }
028    
029            public static String[] getEmoticonDescriptions() {
030                    return getBBCodeTranslator().getEmoticonDescriptions();
031            }
032    
033            public static String[] getEmoticonFiles() {
034                    return getBBCodeTranslator().getEmoticonFiles();
035            }
036    
037            public static String[][] getEmoticons() {
038                    return getBBCodeTranslator().getEmoticons();
039            }
040    
041            public static String[] getEmoticonSymbols() {
042                    return getBBCodeTranslator().getEmoticonSymbols();
043            }
044    
045            public static String getHTML(String bbcode) {
046                    return getBBCodeTranslator().getHTML(bbcode);
047            }
048    
049            public static String parse(String message) {
050                    return getBBCodeTranslator().parse(message);
051            }
052    
053            public void setBBCodeTranslator(BBCodeTranslator bbCodeTranslator) {
054                    _bbCodeTranslator = bbCodeTranslator;
055            }
056    
057            private static BBCodeTranslator _bbCodeTranslator;
058    
059    }