001
014
015 package com.liferay.portlet.journal.util;
016
017 import com.liferay.portal.kernel.portlet.PortletRequestModel;
018 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
019 import com.liferay.portal.theme.ThemeDisplay;
020 import com.liferay.portlet.journal.model.JournalArticleDisplay;
021
022
025 public class JournalContentUtil {
026
027 public static void clearCache() {
028 getJournalContent().clearCache();
029 }
030
031 public static void clearCache(
032 long groupId, String articleId, String ddmTemplateKey) {
033
034 getJournalContent().clearCache(groupId, articleId, ddmTemplateKey);
035 }
036
037 public static String getContent(
038 long groupId, String articleId, String viewMode, String languageId,
039 PortletRequestModel portletRequestModel) {
040
041 return getJournalContent().getContent(
042 groupId, articleId, viewMode, languageId, portletRequestModel);
043 }
044
045 public static String getContent(
046 long groupId, String articleId, String ddmTemplateKey, String viewMode,
047 String languageId, PortletRequestModel portletRequestModel) {
048
049 return getJournalContent().getContent(
050 groupId, articleId, ddmTemplateKey, viewMode, languageId,
051 portletRequestModel);
052 }
053
054 public static String getContent(
055 long groupId, String articleId, String ddmTemplateKey, String viewMode,
056 String languageId, PortletRequestModel portletRequestModel,
057 ThemeDisplay themeDisplay) {
058
059 return getJournalContent().getContent(
060 groupId, articleId, ddmTemplateKey, viewMode, languageId,
061 portletRequestModel, themeDisplay);
062 }
063
064 public static String getContent(
065 long groupId, String articleId, String ddmTemplateKey, String viewMode,
066 String languageId, ThemeDisplay themeDisplay) {
067
068 return getJournalContent().getContent(
069 groupId, articleId, ddmTemplateKey, viewMode, languageId,
070 themeDisplay);
071 }
072
073 public static String getContent(
074 long groupId, String articleId, String viewMode, String languageId,
075 ThemeDisplay themeDisplay) {
076
077 return getJournalContent().getContent(
078 groupId, articleId, viewMode, languageId, themeDisplay);
079 }
080
081 public static JournalArticleDisplay getDisplay(
082 long groupId, String articleId, double version, String ddmTemplateKey,
083 String viewMode, String languageId, int page,
084 PortletRequestModel portletRequestModel, ThemeDisplay themeDisplay) {
085
086 return getJournalContent().getDisplay(
087 groupId, articleId, version, ddmTemplateKey, viewMode, languageId,
088 page, portletRequestModel, themeDisplay);
089 }
090
091 public static JournalArticleDisplay getDisplay(
092 long groupId, String articleId, String viewMode, String languageId,
093 int page, ThemeDisplay themeDisplay) {
094
095 return getJournalContent().getDisplay(
096 groupId, articleId, viewMode, languageId, page, themeDisplay);
097 }
098
099 public static JournalArticleDisplay getDisplay(
100 long groupId, String articleId, String viewMode, String languageId,
101 PortletRequestModel portletRequestModel) {
102
103 return getJournalContent().getDisplay(
104 groupId, articleId, viewMode, languageId, portletRequestModel);
105 }
106
107 public static JournalArticleDisplay getDisplay(
108 long groupId, String articleId, String ddmTemplateKey, String viewMode,
109 String languageId, int page, PortletRequestModel portletRequestModel,
110 ThemeDisplay themeDisplay) {
111
112 return getJournalContent().getDisplay(
113 groupId, articleId, ddmTemplateKey, viewMode, languageId, page,
114 portletRequestModel, themeDisplay);
115 }
116
117 public static JournalArticleDisplay getDisplay(
118 long groupId, String articleId, String ddmTemplateKey, String viewMode,
119 String languageId, PortletRequestModel portletRequestModel) {
120
121 return getJournalContent().getDisplay(
122 groupId, articleId, ddmTemplateKey, viewMode, languageId,
123 portletRequestModel);
124 }
125
126 public static JournalArticleDisplay getDisplay(
127 long groupId, String articleId, String ddmTemplateKey, String viewMode,
128 String languageId, ThemeDisplay themeDisplay) {
129
130 return getJournalContent().getDisplay(
131 groupId, articleId, ddmTemplateKey, viewMode, languageId,
132 themeDisplay);
133 }
134
135 public static JournalArticleDisplay getDisplay(
136 long groupId, String articleId, String viewMode, String languageId,
137 ThemeDisplay themeDisplay) {
138
139 return getJournalContent().getDisplay(
140 groupId, articleId, viewMode, languageId, themeDisplay);
141 }
142
143 public static JournalContent getJournalContent() {
144 PortalRuntimePermission.checkGetBeanProperty(JournalContentUtil.class);
145
146 return _journalContent;
147 }
148
149 public void setJournalContent(JournalContent journalContent) {
150 PortalRuntimePermission.checkSetBeanProperty(getClass());
151
152 _journalContent = journalContent;
153 }
154
155 private static JournalContent _journalContent;
156
157 }