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, int status, int max)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException {
069 return getService().getCompanyEntries(companyId, status, max);
070 }
071
072 public static java.lang.String getCompanyEntriesRSS(long companyId,
073 int status, int max, java.lang.String type, double version,
074 java.lang.String displayStyle, java.lang.String feedURL,
075 java.lang.String entryURL,
076 com.liferay.portal.theme.ThemeDisplay themeDisplay)
077 throws com.liferay.portal.kernel.exception.PortalException,
078 com.liferay.portal.kernel.exception.SystemException {
079 return getService()
080 .getCompanyEntriesRSS(companyId, status, max, type, version,
081 displayStyle, feedURL, entryURL, themeDisplay);
082 }
083
084 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
085 long entryId)
086 throws com.liferay.portal.kernel.exception.PortalException,
087 com.liferay.portal.kernel.exception.SystemException {
088 return getService().getEntry(entryId);
089 }
090
091 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
092 long groupId, java.lang.String urlTitle)
093 throws com.liferay.portal.kernel.exception.PortalException,
094 com.liferay.portal.kernel.exception.SystemException {
095 return getService().getEntry(groupId, urlTitle);
096 }
097
098 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
099 long groupId, int status, int max)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().getGroupEntries(groupId, status, max);
102 }
103
104 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
105 long groupId, int status, int start, int end)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().getGroupEntries(groupId, status, start, end);
108 }
109
110 public static int getGroupEntriesCount(long groupId, int status)
111 throws com.liferay.portal.kernel.exception.SystemException {
112 return getService().getGroupEntriesCount(groupId, status);
113 }
114
115 public static java.lang.String getGroupEntriesRSS(long groupId, int status,
116 int max, java.lang.String type, double version,
117 java.lang.String displayStyle, java.lang.String feedURL,
118 java.lang.String entryURL,
119 com.liferay.portal.theme.ThemeDisplay themeDisplay)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getService()
123 .getGroupEntriesRSS(groupId, status, max, type, version,
124 displayStyle, feedURL, entryURL, themeDisplay);
125 }
126
127 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
128 long companyId, long groupId, int status, int max)
129 throws com.liferay.portal.kernel.exception.PortalException,
130 com.liferay.portal.kernel.exception.SystemException {
131 return getService().getGroupsEntries(companyId, groupId, status, max);
132 }
133
134 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
135 long organizationId, int status, int max)
136 throws com.liferay.portal.kernel.exception.PortalException,
137 com.liferay.portal.kernel.exception.SystemException {
138 return getService().getOrganizationEntries(organizationId, status, max);
139 }
140
141 public static java.lang.String getOrganizationEntriesRSS(
142 long organizationId, int status, int max, java.lang.String type,
143 double version, java.lang.String displayStyle,
144 java.lang.String feedURL, java.lang.String entryURL,
145 com.liferay.portal.theme.ThemeDisplay themeDisplay)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException {
148 return getService()
149 .getOrganizationEntriesRSS(organizationId, status, max,
150 type, version, displayStyle, feedURL, entryURL, themeDisplay);
151 }
152
153 public static void subscribe(long groupId)
154 throws com.liferay.portal.kernel.exception.PortalException,
155 com.liferay.portal.kernel.exception.SystemException {
156 getService().subscribe(groupId);
157 }
158
159 public static void unsubscribe(long groupId)
160 throws com.liferay.portal.kernel.exception.PortalException,
161 com.liferay.portal.kernel.exception.SystemException {
162 getService().unsubscribe(groupId);
163 }
164
165 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
166 long entryId, java.lang.String title, java.lang.String description,
167 java.lang.String content, int displayDateMonth, int displayDateDay,
168 int displayDateYear, int displayDateHour, int displayDateMinute,
169 boolean allowPingbacks, boolean allowTrackbacks,
170 java.lang.String[] trackbacks, boolean smallImage,
171 java.lang.String smallImageURL, java.lang.String smallImageFileName,
172 java.io.InputStream smallImageInputStream,
173 com.liferay.portal.service.ServiceContext serviceContext)
174 throws com.liferay.portal.kernel.exception.PortalException,
175 com.liferay.portal.kernel.exception.SystemException {
176 return getService()
177 .updateEntry(entryId, title, description, content,
178 displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
179 displayDateMinute, allowPingbacks, allowTrackbacks, trackbacks,
180 smallImage, smallImageURL, smallImageFileName,
181 smallImageInputStream, serviceContext);
182 }
183
184 public static BlogsEntryService getService() {
185 if (_service == null) {
186 _service = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
187
188 ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
189 "_service");
190 MethodCache.remove(BlogsEntryService.class);
191 }
192
193 return _service;
194 }
195
196 public void setService(BlogsEntryService service) {
197 MethodCache.remove(BlogsEntryService.class);
198
199 _service = service;
200
201 ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
202 "_service");
203 MethodCache.remove(BlogsEntryService.class);
204 }
205
206 private static BlogsEntryService _service;
207 }