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