001    /**
002     * Copyright (c) 2000-2010 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.portlet.journalcontent.util;
016    
017    import com.liferay.portal.theme.ThemeDisplay;
018    import com.liferay.portlet.journal.model.JournalArticleDisplay;
019    
020    /**
021     * @author Raymond Augé
022     */
023    public class JournalContentUtil {
024    
025            public static void clearCache() {
026                    getJournalContent().clearCache();
027            }
028    
029            public static void clearCache(
030                    long groupId, String articleId, String templateId) {
031    
032                    getJournalContent().clearCache(groupId, articleId, templateId);
033            }
034    
035            public static String getContent(
036                    long groupId, String articleId, String templateId, String viewMode,
037                    String languageId, String xmlRequest) {
038    
039                    return getJournalContent().getContent(
040                            groupId, articleId, templateId, viewMode, languageId, xmlRequest);
041            }
042    
043            public static String getContent(
044                    long groupId, String articleId, String templateId, String viewMode,
045                    String languageId, ThemeDisplay themeDisplay, String xmlRequest) {
046    
047                    return getJournalContent().getContent(
048                            groupId, articleId, templateId, viewMode, languageId, themeDisplay);
049            }
050    
051            public static String getContent(
052                    long groupId, String articleId, String templateId, String viewMode,
053                    String languageId, ThemeDisplay themeDisplay) {
054    
055                    return getJournalContent().getContent(
056                            groupId, articleId, templateId, viewMode, languageId, themeDisplay);
057            }
058    
059            public static String getContent(
060                    long groupId, String articleId, String viewMode, String languageId,
061                    String xmlRequest) {
062    
063                    return getJournalContent().getContent(
064                            groupId, articleId, viewMode, languageId, xmlRequest);
065            }
066    
067            public static String getContent(
068                    long groupId, String articleId, String viewMode, String languageId,
069                    ThemeDisplay themeDisplay) {
070    
071                    return getJournalContent().getContent(
072                            groupId, articleId, viewMode, languageId, themeDisplay);
073            }
074    
075            public static JournalArticleDisplay getDisplay(
076                    long groupId, String articleId, String templateId, String viewMode,
077                    String languageId, String xmlRequest) {
078    
079                    return getJournalContent().getDisplay(
080                            groupId, articleId, templateId, viewMode, languageId, xmlRequest);
081            }
082    
083            public static JournalArticleDisplay getDisplay(
084                    long groupId, String articleId, String templateId, String viewMode,
085                    String languageId, ThemeDisplay themeDisplay, int page,
086                    String xmlRequest) {
087    
088                    return getJournalContent().getDisplay(
089                            groupId, articleId, templateId, viewMode, languageId, themeDisplay,
090                            page, xmlRequest);
091            }
092    
093            public static JournalArticleDisplay getDisplay(
094                    long groupId, String articleId, String templateId, String viewMode,
095                    String languageId, ThemeDisplay themeDisplay) {
096    
097                    return getJournalContent().getDisplay(
098                            groupId, articleId, templateId, viewMode, languageId, themeDisplay);
099            }
100    
101            public static JournalArticleDisplay getDisplay(
102                    long groupId, String articleId, String viewMode, String languageId,
103                    String xmlRequest) {
104    
105                    return getJournalContent().getDisplay(
106                            groupId, articleId, viewMode, languageId, xmlRequest);
107            }
108    
109            public static JournalArticleDisplay getDisplay(
110                    long groupId, String articleId, String viewMode, String languageId,
111                    ThemeDisplay themeDisplay, int page) {
112    
113                    return getJournalContent().getDisplay(
114                            groupId, articleId, viewMode, languageId, themeDisplay, page);
115            }
116    
117            public static JournalArticleDisplay getDisplay(
118                    long groupId, String articleId, String viewMode, String languageId,
119                    ThemeDisplay themeDisplay) {
120    
121                    return getJournalContent().getDisplay(
122                            groupId, articleId, viewMode, languageId, themeDisplay);
123            }
124    
125            public static JournalContent getJournalContent() {
126                    return _journalContent;
127            }
128    
129            public void setJournalContent(JournalContent journalContent) {
130                    _journalContent = journalContent;
131            }
132    
133            private static JournalContent _journalContent;
134    
135    }