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