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