1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.journalcontent.util;
16  
17  import com.liferay.portal.theme.ThemeDisplay;
18  import com.liferay.portlet.journal.model.JournalArticleDisplay;
19  
20  /**
21   * <a href="JournalContentUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Raymond Augé
24   */
25  public class JournalContentUtil {
26  
27      public static void clearCache() {
28          getJournalContent().clearCache();
29      }
30  
31      public static void clearCache(
32          long groupId, String articleId, String templateId) {
33  
34          getJournalContent().clearCache(groupId, articleId, templateId);
35      }
36  
37      public static String getContent(
38          long groupId, String articleId, String templateId, String viewMode,
39          String languageId, String xmlRequest) {
40  
41          return getJournalContent().getContent(
42              groupId, articleId, templateId, viewMode, languageId, xmlRequest);
43      }
44  
45      public static String getContent(
46          long groupId, String articleId, String templateId, String viewMode,
47          String languageId, ThemeDisplay themeDisplay, String xmlRequest) {
48  
49          return getJournalContent().getContent(
50              groupId, articleId, templateId, viewMode, languageId, themeDisplay);
51      }
52  
53      public static String getContent(
54          long groupId, String articleId, String templateId, String viewMode,
55          String languageId, ThemeDisplay themeDisplay) {
56  
57          return getJournalContent().getContent(
58              groupId, articleId, templateId, viewMode, languageId, themeDisplay);
59      }
60  
61      public static String getContent(
62          long groupId, String articleId, String viewMode, String languageId,
63          String xmlRequest) {
64  
65          return getJournalContent().getContent(
66              groupId, articleId, viewMode, languageId, xmlRequest);
67      }
68  
69      public static String getContent(
70          long groupId, String articleId, String viewMode, String languageId,
71          ThemeDisplay themeDisplay) {
72  
73          return getJournalContent().getContent(
74              groupId, articleId, viewMode, languageId, themeDisplay);
75      }
76  
77      public static JournalArticleDisplay getDisplay(
78          long groupId, String articleId, String templateId, String viewMode,
79          String languageId, String xmlRequest) {
80  
81          return getJournalContent().getDisplay(
82              groupId, articleId, templateId, viewMode, languageId, xmlRequest);
83      }
84  
85      public static JournalArticleDisplay getDisplay(
86          long groupId, String articleId, String templateId, String viewMode,
87          String languageId, ThemeDisplay themeDisplay, int page,
88          String xmlRequest) {
89  
90          return getJournalContent().getDisplay(
91              groupId, articleId, templateId, viewMode, languageId, themeDisplay,
92              page, xmlRequest);
93      }
94  
95      public static JournalArticleDisplay getDisplay(
96          long groupId, String articleId, String templateId, String viewMode,
97          String languageId, ThemeDisplay themeDisplay) {
98  
99          return getJournalContent().getDisplay(
100             groupId, articleId, templateId, viewMode, languageId, themeDisplay);
101     }
102 
103     public static JournalArticleDisplay getDisplay(
104         long groupId, String articleId, String viewMode, String languageId,
105         String xmlRequest) {
106 
107         return getJournalContent().getDisplay(
108             groupId, articleId, viewMode, languageId, xmlRequest);
109     }
110 
111     public static JournalArticleDisplay getDisplay(
112         long groupId, String articleId, String viewMode, String languageId,
113         ThemeDisplay themeDisplay, int page) {
114 
115         return getJournalContent().getDisplay(
116             groupId, articleId, viewMode, languageId, themeDisplay, page);
117     }
118 
119     public static JournalArticleDisplay getDisplay(
120         long groupId, String articleId, String viewMode, String languageId,
121         ThemeDisplay themeDisplay) {
122 
123         return getJournalContent().getDisplay(
124             groupId, articleId, viewMode, languageId, themeDisplay);
125     }
126 
127     public static JournalContent getJournalContent() {
128         return _journalContent;
129     }
130 
131     public void setJournalContent(JournalContent journalContent) {
132         _journalContent = journalContent;
133     }
134 
135     private static JournalContent _journalContent;
136 
137 }