001
014
015 package com.liferay.portlet.blogs.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class BlogsEntryServiceUtil {
035
040 public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
041 java.lang.String title, java.lang.String description,
042 java.lang.String content, int displayDateMonth, int displayDateDay,
043 int displayDateYear, int displayDateHour, int displayDateMinute,
044 boolean allowPingbacks, boolean allowTrackbacks,
045 java.lang.String[] trackbacks, boolean smallImage,
046 java.lang.String smallImageURL, java.lang.String smallImageFileName,
047 java.io.InputStream smallImageInputStream,
048 com.liferay.portal.service.ServiceContext serviceContext)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 return getService()
052 .addEntry(title, description, content, displayDateMonth,
053 displayDateDay, displayDateYear, displayDateHour,
054 displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
055 smallImage, smallImageURL, smallImageFileName,
056 smallImageInputStream, serviceContext);
057 }
058
059 public static void deleteEntry(long entryId)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 getService().deleteEntry(entryId);
063 }
064
065 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
066 long companyId, java.util.Date displayDate, int status, int max)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException {
069 return getService()
070 .getCompanyEntries(companyId, displayDate, status, max);
071 }
072
073 public static java.lang.String getCompanyEntriesRSS(long companyId,
074 java.util.Date displayDate, int status, int max, java.lang.String type,
075 double version, java.lang.String displayStyle,
076 java.lang.String feedURL, java.lang.String entryURL,
077 com.liferay.portal.theme.ThemeDisplay themeDisplay)
078 throws com.liferay.portal.kernel.exception.PortalException,
079 com.liferay.portal.kernel.exception.SystemException {
080 return getService()
081 .getCompanyEntriesRSS(companyId, displayDate, status, max,
082 type, version, displayStyle, feedURL, entryURL, themeDisplay);
083 }
084
085 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
086 long entryId)
087 throws com.liferay.portal.kernel.exception.PortalException,
088 com.liferay.portal.kernel.exception.SystemException {
089 return getService().getEntry(entryId);
090 }
091
092 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
093 long groupId, java.lang.String urlTitle)
094 throws com.liferay.portal.kernel.exception.PortalException,
095 com.liferay.portal.kernel.exception.SystemException {
096 return getService().getEntry(groupId, urlTitle);
097 }
098
099 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
100 long groupId, java.util.Date displayDate, int status, int max)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getService().getGroupEntries(groupId, displayDate, status, max);
103 }
104
105 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
106 long groupId, java.util.Date displayDate, int status, int start, int end)
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService()
109 .getGroupEntries(groupId, displayDate, status, start, end);
110 }
111
112 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
113 long groupId, int status, int max)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getService().getGroupEntries(groupId, status, max);
116 }
117
118 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
119 long groupId, int status, int start, int end)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().getGroupEntries(groupId, status, start, end);
122 }
123
124 public static int getGroupEntriesCount(long groupId,
125 java.util.Date displayDate, int status)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().getGroupEntriesCount(groupId, displayDate, status);
128 }
129
130 public static int getGroupEntriesCount(long groupId, int status)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getService().getGroupEntriesCount(groupId, status);
133 }
134
135 public static java.lang.String getGroupEntriesRSS(long groupId,
136 java.util.Date displayDate, int status, int max, java.lang.String type,
137 double version, java.lang.String displayStyle,
138 java.lang.String feedURL, java.lang.String entryURL,
139 com.liferay.portal.theme.ThemeDisplay themeDisplay)
140 throws com.liferay.portal.kernel.exception.PortalException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getService()
143 .getGroupEntriesRSS(groupId, displayDate, status, max, type,
144 version, displayStyle, feedURL, entryURL, themeDisplay);
145 }
146
147 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
148 long companyId, long groupId, java.util.Date displayDate, int status,
149 int max)
150 throws com.liferay.portal.kernel.exception.PortalException,
151 com.liferay.portal.kernel.exception.SystemException {
152 return getService()
153 .getGroupsEntries(companyId, groupId, displayDate, status,
154 max);
155 }
156
157 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
158 long organizationId, java.util.Date displayDate, int status, int max)
159 throws com.liferay.portal.kernel.exception.PortalException,
160 com.liferay.portal.kernel.exception.SystemException {
161 return getService()
162 .getOrganizationEntries(organizationId, displayDate, status,
163 max);
164 }
165
166 public static java.lang.String getOrganizationEntriesRSS(
167 long organizationId, java.util.Date displayDate, int status, int max,
168 java.lang.String type, double version, java.lang.String displayStyle,
169 java.lang.String feedURL, java.lang.String entryURL,
170 com.liferay.portal.theme.ThemeDisplay themeDisplay)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService()
174 .getOrganizationEntriesRSS(organizationId, displayDate,
175 status, max, type, version, displayStyle, feedURL, entryURL,
176 themeDisplay);
177 }
178
179 public static void subscribe(long groupId)
180 throws com.liferay.portal.kernel.exception.PortalException,
181 com.liferay.portal.kernel.exception.SystemException {
182 getService().subscribe(groupId);
183 }
184
185 public static void unsubscribe(long groupId)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 getService().unsubscribe(groupId);
189 }
190
191 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
192 long entryId, java.lang.String title, java.lang.String description,
193 java.lang.String content, int displayDateMonth, int displayDateDay,
194 int displayDateYear, int displayDateHour, int displayDateMinute,
195 boolean allowPingbacks, boolean allowTrackbacks,
196 java.lang.String[] trackbacks, boolean smallImage,
197 java.lang.String smallImageURL, java.lang.String smallImageFileName,
198 java.io.InputStream smallImageInputStream,
199 com.liferay.portal.service.ServiceContext serviceContext)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getService()
203 .updateEntry(entryId, title, description, content,
204 displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
205 displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
206 smallImage, smallImageURL, smallImageFileName,
207 smallImageInputStream, serviceContext);
208 }
209
210 public static BlogsEntryService getService() {
211 if (_service == null) {
212 _service = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
213
214 ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
215 "_service");
216 MethodCache.remove(BlogsEntryService.class);
217 }
218
219 return _service;
220 }
221
222 public void setService(BlogsEntryService service) {
223 MethodCache.remove(BlogsEntryService.class);
224
225 _service = service;
226
227 ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
228 "_service");
229 MethodCache.remove(BlogsEntryService.class);
230 }
231
232 private static BlogsEntryService _service;
233 }