001
014
015 package com.liferay.portal.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 PortletLocalServiceUtil {
035
040
041
048 public static com.liferay.portal.model.Portlet addPortlet(
049 com.liferay.portal.model.Portlet portlet)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addPortlet(portlet);
052 }
053
054
060 public static com.liferay.portal.model.Portlet createPortlet(long id) {
061 return getService().createPortlet(id);
062 }
063
064
071 public static void deletePortlet(long id)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException {
074 getService().deletePortlet(id);
075 }
076
077
083 public static void deletePortlet(com.liferay.portal.model.Portlet portlet)
084 throws com.liferay.portal.kernel.exception.SystemException {
085 getService().deletePortlet(portlet);
086 }
087
088
095 @SuppressWarnings("rawtypes")
096 public static java.util.List dynamicQuery(
097 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
098 throws com.liferay.portal.kernel.exception.SystemException {
099 return getService().dynamicQuery(dynamicQuery);
100 }
101
102
115 @SuppressWarnings("rawtypes")
116 public static java.util.List dynamicQuery(
117 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
118 int end) throws com.liferay.portal.kernel.exception.SystemException {
119 return getService().dynamicQuery(dynamicQuery, start, end);
120 }
121
122
136 @SuppressWarnings("rawtypes")
137 public static java.util.List dynamicQuery(
138 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139 int end,
140 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141 throws com.liferay.portal.kernel.exception.SystemException {
142 return getService()
143 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
144 }
145
146
153 public static long dynamicQueryCount(
154 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
155 throws com.liferay.portal.kernel.exception.SystemException {
156 return getService().dynamicQueryCount(dynamicQuery);
157 }
158
159
167 public static com.liferay.portal.model.Portlet getPortlet(long id)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 return getService().getPortlet(id);
171 }
172
173 public static com.liferay.portal.model.PersistedModel getPersistedModel(
174 java.io.Serializable primaryKeyObj)
175 throws com.liferay.portal.kernel.exception.PortalException,
176 com.liferay.portal.kernel.exception.SystemException {
177 return getService().getPersistedModel(primaryKeyObj);
178 }
179
180
192 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
193 int start, int end)
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getService().getPortlets(start, end);
196 }
197
198
204 public static int getPortletsCount()
205 throws com.liferay.portal.kernel.exception.SystemException {
206 return getService().getPortletsCount();
207 }
208
209
216 public static com.liferay.portal.model.Portlet updatePortlet(
217 com.liferay.portal.model.Portlet portlet)
218 throws com.liferay.portal.kernel.exception.SystemException {
219 return getService().updatePortlet(portlet);
220 }
221
222
230 public static com.liferay.portal.model.Portlet updatePortlet(
231 com.liferay.portal.model.Portlet portlet, boolean merge)
232 throws com.liferay.portal.kernel.exception.SystemException {
233 return getService().updatePortlet(portlet, merge);
234 }
235
236
241 public static java.lang.String getBeanIdentifier() {
242 return getService().getBeanIdentifier();
243 }
244
245
250 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
251 getService().setBeanIdentifier(beanIdentifier);
252 }
253
254 public static void addPortletCategory(long companyId,
255 java.lang.String categoryName) {
256 getService().addPortletCategory(companyId, categoryName);
257 }
258
259 public static void checkPortlet(com.liferay.portal.model.Portlet portlet)
260 throws com.liferay.portal.kernel.exception.PortalException,
261 com.liferay.portal.kernel.exception.SystemException {
262 getService().checkPortlet(portlet);
263 }
264
265 public static void checkPortlets(long companyId)
266 throws com.liferay.portal.kernel.exception.PortalException,
267 com.liferay.portal.kernel.exception.SystemException {
268 getService().checkPortlets(companyId);
269 }
270
271 public static void clearCache() {
272 getService().clearCache();
273 }
274
275 public static void clearCompanyPortletsPool() {
276 getService().clearCompanyPortletsPool();
277 }
278
279
282 public static com.liferay.portal.model.Portlet clonePortlet(
283 long companyId, java.lang.String portletId) {
284 return getService().clonePortlet(companyId, portletId);
285 }
286
287 public static com.liferay.portal.model.Portlet clonePortlet(
288 java.lang.String portletId) {
289 return getService().clonePortlet(portletId);
290 }
291
292 public static com.liferay.portal.model.Portlet deployRemotePortlet(
293 com.liferay.portal.model.Portlet portlet, java.lang.String categoryName)
294 throws com.liferay.portal.kernel.exception.PortalException,
295 com.liferay.portal.kernel.exception.SystemException {
296 return getService().deployRemotePortlet(portlet, categoryName);
297 }
298
299 public static com.liferay.portal.model.Portlet deployRemotePortlet(
300 com.liferay.portal.model.Portlet portlet,
301 java.lang.String[] categoryNames)
302 throws com.liferay.portal.kernel.exception.PortalException,
303 com.liferay.portal.kernel.exception.SystemException {
304 return getService().deployRemotePortlet(portlet, categoryNames);
305 }
306
307 public static void destroyPortlet(com.liferay.portal.model.Portlet portlet) {
308 getService().destroyPortlet(portlet);
309 }
310
311 public static void destroyRemotePortlet(
312 com.liferay.portal.model.Portlet portlet) {
313 getService().destroyRemotePortlet(portlet);
314 }
315
316 public static java.util.List<com.liferay.portlet.expando.model.CustomAttributesDisplay> getCustomAttributesDisplays() {
317 return getService().getCustomAttributesDisplays();
318 }
319
320 public static com.liferay.portal.model.PortletCategory getEARDisplay(
321 java.lang.String xml)
322 throws com.liferay.portal.kernel.exception.SystemException {
323 return getService().getEARDisplay(xml);
324 }
325
326 public static java.util.List<com.liferay.portal.model.Portlet> getFriendlyURLMapperPortlets() {
327 return getService().getFriendlyURLMapperPortlets();
328 }
329
330 public static java.util.List<com.liferay.portal.kernel.portlet.FriendlyURLMapper> getFriendlyURLMappers() {
331 return getService().getFriendlyURLMappers();
332 }
333
334 public static com.liferay.portal.model.PortletApp getPortletApp(
335 java.lang.String servletContextName) {
336 return getService().getPortletApp(servletContextName);
337 }
338
339 public static com.liferay.portal.model.Portlet getPortletById(
340 long companyId, java.lang.String portletId)
341 throws com.liferay.portal.kernel.exception.SystemException {
342 return getService().getPortletById(companyId, portletId);
343 }
344
345 public static com.liferay.portal.model.Portlet getPortletById(
346 java.lang.String portletId) {
347 return getService().getPortletById(portletId);
348 }
349
350 public static com.liferay.portal.model.Portlet getPortletByStrutsPath(
351 long companyId, java.lang.String strutsPath)
352 throws com.liferay.portal.kernel.exception.SystemException {
353 return getService().getPortletByStrutsPath(companyId, strutsPath);
354 }
355
356 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets() {
357 return getService().getPortlets();
358 }
359
360 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
361 long companyId)
362 throws com.liferay.portal.kernel.exception.SystemException {
363 return getService().getPortlets(companyId);
364 }
365
366 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
367 long companyId, boolean showSystem, boolean showPortal)
368 throws com.liferay.portal.kernel.exception.SystemException {
369 return getService().getPortlets(companyId, showSystem, showPortal);
370 }
371
372 public static com.liferay.portal.model.PortletCategory getWARDisplay(
373 java.lang.String servletContextName, java.lang.String xml)
374 throws com.liferay.portal.kernel.exception.SystemException {
375 return getService().getWARDisplay(servletContextName, xml);
376 }
377
378 public static boolean hasPortlet(long companyId, java.lang.String portletId)
379 throws com.liferay.portal.kernel.exception.SystemException {
380 return getService().hasPortlet(companyId, portletId);
381 }
382
383 public static void initEAR(javax.servlet.ServletContext servletContext,
384 java.lang.String[] xmls,
385 com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
386 getService().initEAR(servletContext, xmls, pluginPackage);
387 }
388
389 public static java.util.List<com.liferay.portal.model.Portlet> initWAR(
390 java.lang.String servletContextName,
391 javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
392 com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
393 return getService()
394 .initWAR(servletContextName, servletContext, xmls,
395 pluginPackage);
396 }
397
398 public static java.util.Map<java.lang.String, com.liferay.portal.model.Portlet> loadGetPortletsPool(
399 long companyId)
400 throws com.liferay.portal.kernel.exception.SystemException {
401 return getService().loadGetPortletsPool(companyId);
402 }
403
404 public static void removeCompanyPortletsPool(long companyId) {
405 getService().removeCompanyPortletsPool(companyId);
406 }
407
408 public static com.liferay.portal.model.Portlet updatePortlet(
409 long companyId, java.lang.String portletId, java.lang.String roles,
410 boolean active)
411 throws com.liferay.portal.kernel.exception.SystemException {
412 return getService().updatePortlet(companyId, portletId, roles, active);
413 }
414
415 public static PortletLocalService getService() {
416 if (_service == null) {
417 _service = (PortletLocalService)PortalBeanLocatorUtil.locate(PortletLocalService.class.getName());
418
419 ReferenceRegistry.registerReference(PortletLocalServiceUtil.class,
420 "_service");
421 MethodCache.remove(PortletLocalService.class);
422 }
423
424 return _service;
425 }
426
427 public void setService(PortletLocalService service) {
428 MethodCache.remove(PortletLocalService.class);
429
430 _service = service;
431
432 ReferenceRegistry.registerReference(PortletLocalServiceUtil.class,
433 "_service");
434 MethodCache.remove(PortletLocalService.class);
435 }
436
437 private static PortletLocalService _service;
438 }