1
14
15 package com.liferay.portlet.blogs.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class BlogsEntryServiceUtil {
42 public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
43 java.lang.String title, java.lang.String content, int displayDateMonth,
44 int displayDateDay, int displayDateYear, int displayDateHour,
45 int displayDateMinute, boolean draft, boolean allowTrackbacks,
46 java.lang.String[] trackbacks,
47 com.liferay.portal.service.ServiceContext serviceContext)
48 throws com.liferay.portal.PortalException,
49 com.liferay.portal.SystemException {
50 return getService()
51 .addEntry(title, content, displayDateMonth, displayDateDay,
52 displayDateYear, displayDateHour, displayDateMinute, draft,
53 allowTrackbacks, trackbacks, serviceContext);
54 }
55
56 public static void deleteEntry(long entryId)
57 throws com.liferay.portal.PortalException,
58 com.liferay.portal.SystemException {
59 getService().deleteEntry(entryId);
60 }
61
62 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
63 long companyId, int max)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 return getService().getCompanyEntries(companyId, max);
67 }
68
69 public static java.lang.String getCompanyEntriesRSS(long companyId,
70 int max, java.lang.String type, double version,
71 java.lang.String displayStyle, java.lang.String feedURL,
72 java.lang.String entryURL,
73 com.liferay.portal.theme.ThemeDisplay themeDisplay)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 return getService()
77 .getCompanyEntriesRSS(companyId, max, type, version,
78 displayStyle, feedURL, entryURL, themeDisplay);
79 }
80
81 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
82 long entryId)
83 throws com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException {
85 return getService().getEntry(entryId);
86 }
87
88 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
89 long groupId, java.lang.String urlTitle)
90 throws com.liferay.portal.PortalException,
91 com.liferay.portal.SystemException {
92 return getService().getEntry(groupId, urlTitle);
93 }
94
95 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
96 long groupId, int max)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getGroupEntries(groupId, max);
100 }
101
102 public static java.lang.String getGroupEntriesRSS(long groupId, int max,
103 java.lang.String type, double version, java.lang.String displayStyle,
104 java.lang.String feedURL, java.lang.String entryURL,
105 com.liferay.portal.theme.ThemeDisplay themeDisplay)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 return getService()
109 .getGroupEntriesRSS(groupId, max, type, version,
110 displayStyle, feedURL, entryURL, themeDisplay);
111 }
112
113 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
114 long companyId, long groupId, int max)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException {
117 return getService().getGroupsEntries(companyId, groupId, max);
118 }
119
120 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
121 long organizationId, int max)
122 throws com.liferay.portal.PortalException,
123 com.liferay.portal.SystemException {
124 return getService().getOrganizationEntries(organizationId, max);
125 }
126
127 public static java.lang.String getOrganizationEntriesRSS(
128 long organizationId, int max, java.lang.String type, double version,
129 java.lang.String displayStyle, java.lang.String feedURL,
130 java.lang.String entryURL,
131 com.liferay.portal.theme.ThemeDisplay themeDisplay)
132 throws com.liferay.portal.PortalException,
133 com.liferay.portal.SystemException {
134 return getService()
135 .getOrganizationEntriesRSS(organizationId, max, type,
136 version, displayStyle, feedURL, entryURL, themeDisplay);
137 }
138
139 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
140 long entryId, java.lang.String title, java.lang.String content,
141 int displayDateMonth, int displayDateDay, int displayDateYear,
142 int displayDateHour, int displayDateMinute, boolean draft,
143 boolean allowTrackbacks, java.lang.String[] trackbacks,
144 com.liferay.portal.service.ServiceContext serviceContext)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 return getService()
148 .updateEntry(entryId, title, content, displayDateMonth,
149 displayDateDay, displayDateYear, displayDateHour,
150 displayDateMinute, draft, allowTrackbacks, trackbacks,
151 serviceContext);
152 }
153
154 public static BlogsEntryService getService() {
155 if (_service == null) {
156 _service = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
157
158 ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
159 "_service");
160 MethodCache.remove(BlogsEntryService.class);
161 }
162
163 return _service;
164 }
165
166 public void setService(BlogsEntryService service) {
167 MethodCache.remove(BlogsEntryService.class);
168
169 _service = service;
170
171 ReferenceRegistry.registerReference(BlogsEntryServiceUtil.class,
172 "_service");
173 MethodCache.remove(BlogsEntryService.class);
174 }
175
176 private static BlogsEntryService _service;
177 }