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 public static com.liferay.portal.model.Portlet fetchPortlet(long id)
160 throws com.liferay.portal.kernel.exception.SystemException {
161 return getService().fetchPortlet(id);
162 }
163
164
172 public static com.liferay.portal.model.Portlet getPortlet(long id)
173 throws com.liferay.portal.kernel.exception.PortalException,
174 com.liferay.portal.kernel.exception.SystemException {
175 return getService().getPortlet(id);
176 }
177
178 public static com.liferay.portal.model.PersistedModel getPersistedModel(
179 java.io.Serializable primaryKeyObj)
180 throws com.liferay.portal.kernel.exception.PortalException,
181 com.liferay.portal.kernel.exception.SystemException {
182 return getService().getPersistedModel(primaryKeyObj);
183 }
184
185
197 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
198 int start, int end)
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getService().getPortlets(start, end);
201 }
202
203
209 public static int getPortletsCount()
210 throws com.liferay.portal.kernel.exception.SystemException {
211 return getService().getPortletsCount();
212 }
213
214
221 public static com.liferay.portal.model.Portlet updatePortlet(
222 com.liferay.portal.model.Portlet portlet)
223 throws com.liferay.portal.kernel.exception.SystemException {
224 return getService().updatePortlet(portlet);
225 }
226
227
235 public static com.liferay.portal.model.Portlet updatePortlet(
236 com.liferay.portal.model.Portlet portlet, boolean merge)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 return getService().updatePortlet(portlet, merge);
239 }
240
241
246 public static java.lang.String getBeanIdentifier() {
247 return getService().getBeanIdentifier();
248 }
249
250
255 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
256 getService().setBeanIdentifier(beanIdentifier);
257 }
258
259 public static void addPortletCategory(long companyId,
260 java.lang.String categoryName) {
261 getService().addPortletCategory(companyId, categoryName);
262 }
263
264 public static void checkPortlet(com.liferay.portal.model.Portlet portlet)
265 throws com.liferay.portal.kernel.exception.PortalException,
266 com.liferay.portal.kernel.exception.SystemException {
267 getService().checkPortlet(portlet);
268 }
269
270 public static void checkPortlets(long companyId)
271 throws com.liferay.portal.kernel.exception.PortalException,
272 com.liferay.portal.kernel.exception.SystemException {
273 getService().checkPortlets(companyId);
274 }
275
276 public static void clearCache() {
277 getService().clearCache();
278 }
279
280 public static void clearCompanyPortletsPool() {
281 getService().clearCompanyPortletsPool();
282 }
283
284
287 public static com.liferay.portal.model.Portlet clonePortlet(
288 long companyId, java.lang.String portletId) {
289 return getService().clonePortlet(companyId, portletId);
290 }
291
292 public static com.liferay.portal.model.Portlet clonePortlet(
293 java.lang.String portletId) {
294 return getService().clonePortlet(portletId);
295 }
296
297 public static com.liferay.portal.model.Portlet deployRemotePortlet(
298 com.liferay.portal.model.Portlet portlet, java.lang.String categoryName)
299 throws com.liferay.portal.kernel.exception.PortalException,
300 com.liferay.portal.kernel.exception.SystemException {
301 return getService().deployRemotePortlet(portlet, categoryName);
302 }
303
304 public static com.liferay.portal.model.Portlet deployRemotePortlet(
305 com.liferay.portal.model.Portlet portlet,
306 java.lang.String[] categoryNames)
307 throws com.liferay.portal.kernel.exception.PortalException,
308 com.liferay.portal.kernel.exception.SystemException {
309 return getService().deployRemotePortlet(portlet, categoryNames);
310 }
311
312 public static void destroyPortlet(com.liferay.portal.model.Portlet portlet) {
313 getService().destroyPortlet(portlet);
314 }
315
316 public static void destroyRemotePortlet(
317 com.liferay.portal.model.Portlet portlet) {
318 getService().destroyRemotePortlet(portlet);
319 }
320
321 public static java.util.List<com.liferay.portlet.expando.model.CustomAttributesDisplay> getCustomAttributesDisplays() {
322 return getService().getCustomAttributesDisplays();
323 }
324
325 public static com.liferay.portal.model.PortletCategory getEARDisplay(
326 java.lang.String xml)
327 throws com.liferay.portal.kernel.exception.SystemException {
328 return getService().getEARDisplay(xml);
329 }
330
331 public static java.util.List<com.liferay.portal.model.Portlet> getFriendlyURLMapperPortlets() {
332 return getService().getFriendlyURLMapperPortlets();
333 }
334
335 public static java.util.List<com.liferay.portal.kernel.portlet.FriendlyURLMapper> getFriendlyURLMappers() {
336 return getService().getFriendlyURLMappers();
337 }
338
339 public static com.liferay.portal.model.PortletApp getPortletApp(
340 java.lang.String servletContextName) {
341 return getService().getPortletApp(servletContextName);
342 }
343
344 public static com.liferay.portal.model.Portlet getPortletById(
345 long companyId, java.lang.String portletId)
346 throws com.liferay.portal.kernel.exception.SystemException {
347 return getService().getPortletById(companyId, portletId);
348 }
349
350 public static com.liferay.portal.model.Portlet getPortletById(
351 java.lang.String portletId) {
352 return getService().getPortletById(portletId);
353 }
354
355 public static com.liferay.portal.model.Portlet getPortletByStrutsPath(
356 long companyId, java.lang.String strutsPath)
357 throws com.liferay.portal.kernel.exception.SystemException {
358 return getService().getPortletByStrutsPath(companyId, strutsPath);
359 }
360
361 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets() {
362 return getService().getPortlets();
363 }
364
365 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
366 long companyId)
367 throws com.liferay.portal.kernel.exception.SystemException {
368 return getService().getPortlets(companyId);
369 }
370
371 public static java.util.List<com.liferay.portal.model.Portlet> getPortlets(
372 long companyId, boolean showSystem, boolean showPortal)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getService().getPortlets(companyId, showSystem, showPortal);
375 }
376
377 public static java.util.List<com.liferay.portal.model.Portlet> getScopablePortlets() {
378 return getService().getScopablePortlets();
379 }
380
381 public static com.liferay.portal.model.PortletCategory getWARDisplay(
382 java.lang.String servletContextName, java.lang.String xml)
383 throws com.liferay.portal.kernel.exception.SystemException {
384 return getService().getWARDisplay(servletContextName, xml);
385 }
386
387 public static boolean hasPortlet(long companyId, java.lang.String portletId)
388 throws com.liferay.portal.kernel.exception.SystemException {
389 return getService().hasPortlet(companyId, portletId);
390 }
391
392 public static void initEAR(javax.servlet.ServletContext servletContext,
393 java.lang.String[] xmls,
394 com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
395 getService().initEAR(servletContext, xmls, pluginPackage);
396 }
397
398 public static java.util.List<com.liferay.portal.model.Portlet> initWAR(
399 java.lang.String servletContextName,
400 javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
401 com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
402 return getService()
403 .initWAR(servletContextName, servletContext, xmls,
404 pluginPackage);
405 }
406
407 public static java.util.Map<java.lang.String, com.liferay.portal.model.Portlet> loadGetPortletsPool(
408 long companyId)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return getService().loadGetPortletsPool(companyId);
411 }
412
413 public static void removeCompanyPortletsPool(long companyId) {
414 getService().removeCompanyPortletsPool(companyId);
415 }
416
417 public static com.liferay.portal.model.Portlet updatePortlet(
418 long companyId, java.lang.String portletId, java.lang.String roles,
419 boolean active)
420 throws com.liferay.portal.kernel.exception.SystemException {
421 return getService().updatePortlet(companyId, portletId, roles, active);
422 }
423
424 public static PortletLocalService getService() {
425 if (_service == null) {
426 _service = (PortletLocalService)PortalBeanLocatorUtil.locate(PortletLocalService.class.getName());
427
428 ReferenceRegistry.registerReference(PortletLocalServiceUtil.class,
429 "_service");
430 MethodCache.remove(PortletLocalService.class);
431 }
432
433 return _service;
434 }
435
436 public void setService(PortletLocalService service) {
437 MethodCache.remove(PortletLocalService.class);
438
439 _service = service;
440
441 ReferenceRegistry.registerReference(PortletLocalServiceUtil.class,
442 "_service");
443 MethodCache.remove(PortletLocalService.class);
444 }
445
446 private static PortletLocalService _service;
447 }