1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journalcontent.util;
24  
25  import com.liferay.portal.theme.ThemeDisplay;
26  import com.liferay.portlet.journal.model.JournalArticleDisplay;
27  
28  /**
29   * <a href="JournalContentUtil.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Raymond Augé
32   */
33  public class JournalContentUtil {
34  
35      public static void clearCache() {
36          getJournalContent().clearCache();
37      }
38  
39      public static void clearCache(
40          long groupId, String articleId, String templateId) {
41  
42          getJournalContent().clearCache(groupId, articleId, templateId);
43      }
44  
45      public static String getContent(
46          long groupId, String articleId, String templateId, String viewMode,
47          String languageId, String xmlRequest) {
48  
49          return getJournalContent().getContent(
50              groupId, articleId, templateId, viewMode, languageId, xmlRequest);
51      }
52  
53      public static String getContent(
54          long groupId, String articleId, String templateId, String viewMode,
55          String languageId, ThemeDisplay themeDisplay, String xmlRequest) {
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 templateId, String viewMode,
63          String languageId, ThemeDisplay themeDisplay) {
64  
65          return getJournalContent().getContent(
66              groupId, articleId, templateId, viewMode, languageId, themeDisplay);
67      }
68  
69      public static String getContent(
70          long groupId, String articleId, String viewMode, String languageId,
71          String xmlRequest) {
72  
73          return getJournalContent().getContent(
74              groupId, articleId, viewMode, languageId, xmlRequest);
75      }
76  
77      public static String getContent(
78          long groupId, String articleId, String viewMode, String languageId,
79          ThemeDisplay themeDisplay) {
80  
81          return getJournalContent().getContent(
82              groupId, articleId, viewMode, languageId, themeDisplay);
83      }
84  
85      public static JournalArticleDisplay getDisplay(
86          long groupId, String articleId, String templateId, String viewMode,
87          String languageId, String xmlRequest) {
88  
89          return getJournalContent().getDisplay(
90              groupId, articleId, templateId, viewMode, languageId, xmlRequest);
91      }
92  
93      public static JournalArticleDisplay getDisplay(
94          long groupId, String articleId, String templateId, String viewMode,
95          String languageId, ThemeDisplay themeDisplay, int page,
96          String xmlRequest) {
97  
98          return getJournalContent().getDisplay(
99              groupId, articleId, templateId, viewMode, languageId, themeDisplay,
100             page, xmlRequest);
101     }
102 
103     public static JournalArticleDisplay getDisplay(
104         long groupId, String articleId, String templateId, String viewMode,
105         String languageId, ThemeDisplay themeDisplay) {
106 
107         return getJournalContent().getDisplay(
108             groupId, articleId, templateId, viewMode, languageId, themeDisplay);
109     }
110 
111     public static JournalArticleDisplay getDisplay(
112         long groupId, String articleId, String viewMode, String languageId,
113         String xmlRequest) {
114 
115         return getJournalContent().getDisplay(
116             groupId, articleId, viewMode, languageId, xmlRequest);
117     }
118 
119     public static JournalArticleDisplay getDisplay(
120         long groupId, String articleId, String viewMode, String languageId,
121         ThemeDisplay themeDisplay, int page) {
122 
123         return getJournalContent().getDisplay(
124             groupId, articleId, viewMode, languageId, themeDisplay, page);
125     }
126 
127     public static JournalArticleDisplay getDisplay(
128         long groupId, String articleId, String viewMode, String languageId,
129         ThemeDisplay themeDisplay) {
130 
131         return getJournalContent().getDisplay(
132             groupId, articleId, viewMode, languageId, themeDisplay);
133     }
134 
135     public static JournalContent getJournalContent() {
136         return _journalContent;
137     }
138 
139     public void setJournalContent(JournalContent journalContent) {
140         _journalContent = journalContent;
141     }
142 
143     private static JournalContent _journalContent;
144 
145 }