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 languageId, String xmlRequest) {
47  
48          return getJournalContent().getContent(
49              groupId, articleId, languageId, xmlRequest);
50      }
51  
52      public static String getContent(
53          long groupId, String articleId, String languageId,
54          ThemeDisplay themeDisplay) {
55  
56          return getJournalContent().getContent(
57              groupId, articleId, languageId, themeDisplay);
58      }
59  
60      public static String getContent(
61          long groupId, String articleId, String templateId, String languageId,
62          String xmlRequest) {
63  
64          return getJournalContent().getContent(
65              groupId, articleId, templateId, languageId, xmlRequest);
66      }
67  
68      public static String getContent(
69          long groupId, String articleId, String templateId, String languageId,
70          ThemeDisplay themeDisplay) {
71  
72          return getJournalContent().getContent(
73              groupId, articleId, templateId, languageId, themeDisplay);
74      }
75  
76      public static String getContent(
77          long groupId, String articleId, String templateId, String languageId,
78          ThemeDisplay themeDisplay, String xmlRequest) {
79  
80          return getJournalContent().getContent(
81              groupId, articleId, templateId, languageId, themeDisplay,
82              xmlRequest);
83      }
84  
85      public static JournalArticleDisplay getDisplay(
86          long groupId, String articleId, String languageId, String xmlRequest) {
87  
88          return getJournalContent().getDisplay(
89              groupId, articleId, languageId, xmlRequest);
90      }
91  
92      public static JournalArticleDisplay getDisplay(
93          long groupId, String articleId, String languageId,
94          ThemeDisplay themeDisplay) {
95  
96          return getJournalContent().getDisplay(
97              groupId, articleId, languageId, themeDisplay);
98      }
99  
100     public static JournalArticleDisplay getDisplay(
101         long groupId, String articleId, String templateId, String languageId,
102         String xmlRequest) {
103 
104         return getJournalContent().getDisplay(
105             groupId, articleId, templateId, languageId, xmlRequest);
106     }
107 
108     public static JournalArticleDisplay getDisplay(
109         long groupId, String articleId, String templateId, String languageId,
110         ThemeDisplay themeDisplay) {
111 
112         return getJournalContent().getDisplay(
113             groupId, articleId, templateId, languageId, themeDisplay);
114     }
115 
116     public static JournalArticleDisplay getDisplay(
117         long groupId, String articleId, String templateId, String languageId,
118         ThemeDisplay themeDisplay, int page, String xmlRequest) {
119 
120         return getJournalContent().getDisplay(
121             groupId, articleId, templateId, languageId, themeDisplay, page,
122             xmlRequest);
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 }