001
014
015 package com.liferay.portal.util;
016
017 import com.liferay.portal.kernel.dao.db.DB;
018 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.exception.SystemException;
021 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
022 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
023 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
024 import com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry;
025 import com.liferay.portal.kernel.upload.UploadPortletRequest;
026 import com.liferay.portal.kernel.upload.UploadServletRequest;
027 import com.liferay.portal.model.BaseModel;
028 import com.liferay.portal.model.Company;
029 import com.liferay.portal.model.Group;
030 import com.liferay.portal.model.Layout;
031 import com.liferay.portal.model.LayoutSet;
032 import com.liferay.portal.model.Portlet;
033 import com.liferay.portal.model.Resource;
034 import com.liferay.portal.model.ResourcePermission;
035 import com.liferay.portal.model.User;
036 import com.liferay.portal.theme.ThemeDisplay;
037 import com.liferay.portlet.expando.model.ExpandoBridge;
038
039 import java.io.IOException;
040 import java.io.Serializable;
041
042 import java.sql.SQLException;
043
044 import java.util.Date;
045 import java.util.List;
046 import java.util.Locale;
047 import java.util.Map;
048 import java.util.Properties;
049 import java.util.Set;
050 import java.util.TimeZone;
051
052 import javax.portlet.ActionRequest;
053 import javax.portlet.ActionResponse;
054 import javax.portlet.PortletMode;
055 import javax.portlet.PortletPreferences;
056 import javax.portlet.PortletRequest;
057 import javax.portlet.PortletResponse;
058 import javax.portlet.PreferencesValidator;
059 import javax.portlet.RenderRequest;
060 import javax.portlet.RenderResponse;
061 import javax.portlet.ValidatorException;
062 import javax.portlet.WindowState;
063
064 import javax.servlet.ServletContext;
065 import javax.servlet.ServletException;
066 import javax.servlet.http.HttpServletRequest;
067 import javax.servlet.http.HttpServletResponse;
068 import javax.servlet.http.HttpSession;
069 import javax.servlet.jsp.PageContext;
070
071
076 public class PortalUtil {
077
078
082 public static void addPageDescription(
083 String description, HttpServletRequest request) {
084
085 getPortal().addPageDescription(description, request);
086 }
087
088
091 public static void addPageKeywords(
092 String keywords, HttpServletRequest request) {
093
094 getPortal().addPageKeywords(keywords, request);
095 }
096
097
100 public static void addPageSubtitle(
101 String subtitle, HttpServletRequest request) {
102
103 getPortal().addPageSubtitle(subtitle, request);
104 }
105
106
110 public static void addPageTitle(String title, HttpServletRequest request) {
111 getPortal().addPageTitle(title, request);
112 }
113
114 public static void addPortalPortEventListener(
115 PortalPortEventListener portalPortEventListener) {
116
117 getPortal().addPortalPortEventListener(portalPortEventListener);
118 }
119
120 public static void addPortletBreadcrumbEntry(
121 HttpServletRequest request, String title, String url) {
122
123 getPortal().addPortletBreadcrumbEntry(request, title, url);
124 }
125
126 public static void addPortletBreadcrumbEntry(
127 HttpServletRequest request, String title, String url,
128 Map<String, Object> data) {
129
130 getPortal().addPortletBreadcrumbEntry(request, title, url, data);
131 }
132
133 public static void addPortletDefaultResource(
134 HttpServletRequest request, Portlet portlet)
135 throws PortalException, SystemException {
136
137 getPortal().addPortletDefaultResource(request, portlet);
138 }
139
140 public static void addPortletDefaultResource(
141 long companyId, Layout layout, Portlet portlet)
142 throws PortalException, SystemException {
143
144 getPortal().addPortletDefaultResource(companyId, layout, portlet);
145 }
146
147
153 public static String addPreservedParameters(
154 ThemeDisplay themeDisplay, Layout layout, String url,
155 boolean doAsUser) {
156
157 return getPortal().addPreservedParameters(
158 themeDisplay, layout, url, doAsUser);
159 }
160
161
166 public static String addPreservedParameters(
167 ThemeDisplay themeDisplay, String url) {
168
169 return getPortal().addPreservedParameters(themeDisplay, url);
170 }
171
172 public static void clearRequestParameters(RenderRequest renderRequest) {
173 getPortal().clearRequestParameters(renderRequest);
174 }
175
176 public static void copyRequestParameters(
177 ActionRequest actionRequest, ActionResponse actionResponse) {
178
179 getPortal().copyRequestParameters(actionRequest, actionResponse);
180 }
181
182 public static String escapeRedirect(String url) {
183 return getPortal().escapeRedirect(url);
184 }
185
186 public static String generateRandomKey(
187 HttpServletRequest request, String input) {
188
189 return getPortal().generateRandomKey(request, input);
190 }
191
192 public static String getActualURL(
193 long groupId, boolean privateLayout, String mainPath,
194 String friendlyURL, Map<String, String[]> params,
195 Map<String, Object> requestContext)
196 throws PortalException, SystemException {
197
198 return getPortal().getActualURL(
199 groupId, privateLayout, mainPath, friendlyURL, params,
200 requestContext);
201 }
202
203 public static Locale[] getAlternateLocales(HttpServletRequest request)
204 throws PortalException, SystemException {
205
206 return getPortal().getAlternateLocales(request);
207 }
208
209
212 public static String getAlternateURL(
213 HttpServletRequest request, String canonicalURL, Locale locale) {
214
215 return getPortal().getAlternateURL(request, canonicalURL, locale);
216 }
217
218 public static String getAlternateURL(
219 String canonicalURL, ThemeDisplay themeDisplay, Locale locale) {
220
221 return getPortal().getAlternateURL(canonicalURL, themeDisplay, locale);
222 }
223
224 public static Set<String> getAuthTokenIgnoreActions() {
225 return getPortal().getAuthTokenIgnoreActions();
226 }
227
228 public static Set<String> getAuthTokenIgnorePortlets() {
229 return getPortal().getAuthTokenIgnorePortlets();
230 }
231
232 public static BaseModel<?> getBaseModel(Resource resource)
233 throws PortalException, SystemException {
234
235 return getPortal().getBaseModel(resource);
236 }
237
238 public static BaseModel<?> getBaseModel(
239 ResourcePermission resourcePermission)
240 throws PortalException, SystemException {
241
242 return getPortal().getBaseModel(resourcePermission);
243 }
244
245 public static BaseModel<?> getBaseModel(String modelName, String primKey)
246 throws PortalException, SystemException {
247
248 return getPortal().getBaseModel(modelName, primKey);
249 }
250
251 public static long getBasicAuthUserId(HttpServletRequest request)
252 throws PortalException, SystemException {
253
254 return getPortal().getBasicAuthUserId(request);
255 }
256
257 public static long getBasicAuthUserId(
258 HttpServletRequest request, long companyId)
259 throws PortalException, SystemException {
260
261 return getPortal().getBasicAuthUserId(request, companyId);
262 }
263
264
267 public static String getCanonicalURL(
268 String completeURL, ThemeDisplay themeDisplay)
269 throws PortalException, SystemException {
270
271 return getPortal().getCanonicalURL(completeURL, themeDisplay);
272 }
273
274 public static String getCanonicalURL(
275 String completeURL, ThemeDisplay themeDisplay, Layout layout)
276 throws PortalException, SystemException {
277
278 return getPortal().getCanonicalURL(completeURL, themeDisplay, layout);
279 }
280
281 public static String getCanonicalURL(
282 String completeURL, ThemeDisplay themeDisplay, Layout layout,
283 boolean forceLayoutFriendlyURL)
284 throws PortalException, SystemException {
285
286 return getPortal().getCanonicalURL(
287 completeURL, themeDisplay, layout, forceLayoutFriendlyURL);
288 }
289
290
293 public static String getCDNHost() {
294 return getPortal().getCDNHost();
295 }
296
297 public static String getCDNHost(boolean secure) {
298 return getPortal().getCDNHost(secure);
299 }
300
301 public static String getCDNHost(HttpServletRequest request)
302 throws PortalException, SystemException {
303
304 return getPortal().getCDNHost(request);
305 }
306
307 public static String getCDNHostHttp(long companyId) {
308 return getPortal().getCDNHostHttp(companyId);
309 }
310
311 public static String getCDNHostHttps(long companyId) {
312 return getPortal().getCDNHostHttps(companyId);
313 }
314
315 public static String getClassName(long classNameId) {
316 return getPortal().getClassName(classNameId);
317 }
318
319 public static long getClassNameId(Class<?> clazz) {
320 return getPortal().getClassNameId(clazz);
321 }
322
323 public static long getClassNameId(String value) {
324 return getPortal().getClassNameId(value);
325 }
326
327 public static String getClassNamePortletId(String className) {
328 return getPortal().getClassNamePortletId(className);
329 }
330
331 public static Company getCompany(HttpServletRequest request)
332 throws PortalException, SystemException {
333
334 return getPortal().getCompany(request);
335 }
336
337 public static Company getCompany(PortletRequest portletRequest)
338 throws PortalException, SystemException {
339
340 return getPortal().getCompany(portletRequest);
341 }
342
343 public static long getCompanyId(HttpServletRequest request) {
344 return getPortal().getCompanyId(request);
345 }
346
347 public static long getCompanyId(PortletRequest portletRequest) {
348 return getPortal().getCompanyId(portletRequest);
349 }
350
351 public static long[] getCompanyIds() {
352 return getPortal().getCompanyIds();
353 }
354
355 public static String getComputerAddress() {
356 return getPortal().getComputerAddress();
357 }
358
359 public static String getComputerName() {
360 return getPortal().getComputerName();
361 }
362
363 public static String getControlPanelCategory(
364 String portletId, ThemeDisplay themeDisplay)
365 throws SystemException {
366
367 return getPortal().getControlPanelCategory(portletId, themeDisplay);
368 }
369
370 public static String getControlPanelFullURL(
371 long scopeGroupId, String ppid, Map<String, String[]> params)
372 throws PortalException, SystemException {
373
374 return getPortal().getControlPanelFullURL(scopeGroupId, ppid, params);
375 }
376
377 public static Set<Portlet> getControlPanelPortlets(
378 long companyId, String category)
379 throws SystemException {
380
381 return getPortal().getControlPanelPortlets(companyId, category);
382 }
383
384 public static List<Portlet> getControlPanelPortlets(
385 String category, ThemeDisplay themeDisplay)
386 throws SystemException {
387
388 return getPortal().getControlPanelPortlets(category, themeDisplay);
389 }
390
391 public static String getCreateAccountURL(
392 HttpServletRequest request, ThemeDisplay themeDisplay)
393 throws Exception {
394
395 return getPortal().getCreateAccountURL(request, themeDisplay);
396 }
397
398 public static String getCurrentCompleteURL(HttpServletRequest request) {
399 return getPortal().getCurrentCompleteURL(request);
400 }
401
402 public static String getCurrentURL(HttpServletRequest request) {
403 return getPortal().getCurrentURL(request);
404 }
405
406 public static String getCurrentURL(PortletRequest portletRequest) {
407 return getPortal().getCurrentURL(portletRequest);
408 }
409
410 public static String getCustomSQLFunctionIsNotNull() {
411 return getPortal().getCustomSQLFunctionIsNotNull();
412 }
413
414 public static String getCustomSQLFunctionIsNull() {
415 return getPortal().getCustomSQLFunctionIsNull();
416 }
417
418 public static Date getDate(int month, int day, int year) {
419 return getPortal().getDate(month, day, year);
420 }
421
422 public static Date getDate(
423 int month, int day, int year,
424 Class<? extends PortalException> clazz)
425 throws PortalException {
426
427 return getPortal().getDate(month, day, year, clazz);
428 }
429
430 public static Date getDate(
431 int month, int day, int year, int hour, int min,
432 Class<? extends PortalException> clazz)
433 throws PortalException {
434
435 return getPortal().getDate(month, day, year, hour, min, clazz);
436 }
437
438
441 public static Date getDate(
442 int month, int day, int year, int hour, int min, PortalException pe)
443 throws PortalException {
444
445 return getPortal().getDate(month, day, year, hour, min, pe);
446 }
447
448 public static Date getDate(
449 int month, int day, int year, int hour, int min, TimeZone timeZone,
450 Class<? extends PortalException> clazz)
451 throws PortalException {
452
453 return getPortal().getDate(
454 month, day, year, hour, min, timeZone, clazz);
455 }
456
457
460 public static Date getDate(
461 int month, int day, int year, int hour, int min, TimeZone timeZone,
462 PortalException pe)
463 throws PortalException {
464
465 return getPortal().getDate(month, day, year, hour, min, timeZone, pe);
466 }
467
468
471 public static Date getDate(int month, int day, int year, PortalException pe)
472 throws PortalException {
473
474 return getPortal().getDate(month, day, year, pe);
475 }
476
477 public static Date getDate(
478 int month, int day, int year, TimeZone timeZone,
479 Class<? extends PortalException> clazz)
480 throws PortalException {
481
482 return getPortal().getDate(month, day, year, timeZone, clazz);
483 }
484
485
488 public static Date getDate(
489 int month, int day, int year, TimeZone timeZone, PortalException pe)
490 throws PortalException {
491
492 return getPortal().getDate(month, day, year, timeZone, pe);
493 }
494
495
498 public static DB getDB() {
499 return DBFactoryUtil.getDB();
500 }
501
502 public static long getDefaultCompanyId() {
503 return getPortal().getDefaultCompanyId();
504 }
505
506 public static long getDigestAuthUserId(HttpServletRequest request)
507 throws PortalException, SystemException {
508
509 return getPortal().getDigestAuthUserId(request);
510 }
511
512 public static String getEmailFromAddress(
513 PortletPreferences preferences, long companyId, String defaultValue)
514 throws SystemException {
515
516 return getPortal().getEmailFromAddress(
517 preferences, companyId, defaultValue);
518 }
519
520 public static String getEmailFromName(
521 PortletPreferences preferences, long companyId, String defaultValue)
522 throws SystemException {
523
524 return getPortal().getEmailFromName(
525 preferences, companyId, defaultValue);
526 }
527
528 public static Map<String, Serializable> getExpandoBridgeAttributes(
529 ExpandoBridge expandoBridge, PortletRequest portletRequest)
530 throws PortalException, SystemException {
531
532 return getPortal().getExpandoBridgeAttributes(
533 expandoBridge, portletRequest);
534 }
535
536 public static Map<String, Serializable> getExpandoBridgeAttributes(
537 ExpandoBridge expandoBridge,
538 UploadPortletRequest uploadPortletRequest)
539 throws PortalException, SystemException {
540
541 return getPortal().getExpandoBridgeAttributes(
542 expandoBridge, uploadPortletRequest);
543 }
544
545 public static Serializable getExpandoValue(
546 PortletRequest portletRequest, String name, int type,
547 String displayType)
548 throws PortalException, SystemException {
549
550 return getPortal().getExpandoValue(
551 portletRequest, name, type, displayType);
552 }
553
554 public static Serializable getExpandoValue(
555 UploadPortletRequest uploadPortletRequest, String name, int type,
556 String displayType)
557 throws PortalException, SystemException {
558
559 return getPortal().getExpandoValue(
560 uploadPortletRequest, name, type, displayType);
561 }
562
563 public static String getFacebookURL(
564 Portlet portlet, String facebookCanvasPageURL,
565 ThemeDisplay themeDisplay)
566 throws PortalException, SystemException {
567
568 return getPortal().getFacebookURL(
569 portlet, facebookCanvasPageURL, themeDisplay);
570 }
571
572 public static String getFirstPageLayoutTypes(PageContext pageContext) {
573 return getPortal().getFirstPageLayoutTypes(pageContext);
574 }
575
576 public static String getGlobalLibDir() {
577 return getPortal().getGlobalLibDir();
578 }
579
580 public static String getGoogleGadgetURL(
581 Portlet portlet, ThemeDisplay themeDisplay)
582 throws PortalException, SystemException {
583
584 return getPortal().getGoogleGadgetURL(portlet, themeDisplay);
585 }
586
587 public static String getGroupFriendlyURL(
588 Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay)
589 throws PortalException, SystemException {
590
591 return getPortal().getGroupFriendlyURL(
592 group, privateLayoutSet, themeDisplay);
593 }
594
595 public static String getGroupFriendlyURL(
596 Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay,
597 Locale locale)
598 throws PortalException, SystemException {
599
600 return getPortal().getGroupFriendlyURL(
601 group, privateLayoutSet, themeDisplay, locale);
602 }
603
604 public static String[] getGroupPermissions(HttpServletRequest request) {
605 return getPortal().getGroupPermissions(request);
606 }
607
608 public static String[] getGroupPermissions(
609 HttpServletRequest request, String className) {
610
611 return getPortal().getGroupPermissions(request, className);
612 }
613
614 public static String[] getGroupPermissions(PortletRequest portletRequest) {
615 return getPortal().getGroupPermissions(portletRequest);
616 }
617
618 public static String[] getGroupPermissions(
619 PortletRequest portletRequest, String className) {
620
621 return getPortal().getGroupPermissions(portletRequest, className);
622 }
623
624 public static String[] getGuestPermissions(HttpServletRequest request) {
625 return getPortal().getGuestPermissions(request);
626 }
627
628 public static String[] getGuestPermissions(
629 HttpServletRequest request, String className) {
630
631 return getPortal().getGuestPermissions(request, className);
632 }
633
634 public static String[] getGuestPermissions(PortletRequest portletRequest) {
635 return getPortal().getGuestPermissions(portletRequest);
636 }
637
638 public static String[] getGuestPermissions(
639 PortletRequest portletRequest, String className) {
640
641 return getPortal().getGuestPermissions(portletRequest, className);
642 }
643
644 public static String getHomeURL(HttpServletRequest request)
645 throws PortalException, SystemException {
646
647 return getPortal().getHomeURL(request);
648 }
649
650 public static String getHost(HttpServletRequest request) {
651 return getPortal().getHost(request);
652 }
653
654 public static String getHost(PortletRequest portletRequest) {
655 return getPortal().getHost(portletRequest);
656 }
657
658 public static HttpServletRequest getHttpServletRequest(
659 PortletRequest portletRequest) {
660
661 return getPortal().getHttpServletRequest(portletRequest);
662 }
663
664 public static HttpServletResponse getHttpServletResponse(
665 PortletResponse portletResponse) {
666
667 return getPortal().getHttpServletResponse(portletResponse);
668 }
669
670 public static String getJournalArticleActualURL(
671 long groupId, boolean privateLayout, String mainPath,
672 String friendlyURL, Map<String, String[]> params,
673 Map<String, Object> requestContext)
674 throws PortalException, SystemException {
675
676 return getPortal().getJournalArticleActualURL(
677 groupId, privateLayout, mainPath, friendlyURL, params,
678 requestContext);
679 }
680
681 public static String getJsSafePortletId(String portletId) {
682 return getPortal().getJsSafePortletId(portletId);
683 }
684
685 public static String getLayoutActualURL(Layout layout) {
686 return getPortal().getLayoutActualURL(layout);
687 }
688
689 public static String getLayoutActualURL(Layout layout, String mainPath) {
690 return getPortal().getLayoutActualURL(layout, mainPath);
691 }
692
693 public static String getLayoutActualURL(
694 long groupId, boolean privateLayout, String mainPath,
695 String friendlyURL)
696 throws PortalException, SystemException {
697
698 return getPortal().getLayoutActualURL(
699 groupId, privateLayout, mainPath, friendlyURL);
700 }
701
702 public static String getLayoutActualURL(
703 long groupId, boolean privateLayout, String mainPath,
704 String friendlyURL, Map<String, String[]> params,
705 Map<String, Object> requestContext)
706 throws PortalException, SystemException {
707
708 return getPortal().getLayoutActualURL(
709 groupId, privateLayout, mainPath, friendlyURL, params,
710 requestContext);
711 }
712
713 public static String getLayoutEditPage(Layout layout) {
714 return getPortal().getLayoutEditPage(layout);
715 }
716
717 public static String getLayoutEditPage(String type) {
718 return getPortal().getLayoutEditPage(type);
719 }
720
721 public static String getLayoutFriendlyURL(
722 Layout layout, ThemeDisplay themeDisplay)
723 throws PortalException, SystemException {
724
725 return getPortal().getLayoutFriendlyURL(layout, themeDisplay);
726 }
727
728 public static String getLayoutFriendlyURL(
729 Layout layout, ThemeDisplay themeDisplay, Locale locale)
730 throws PortalException, SystemException {
731
732 return getPortal().getLayoutFriendlyURL(layout, themeDisplay, locale);
733 }
734
735 public static String getLayoutFullURL(
736 Layout layout, ThemeDisplay themeDisplay)
737 throws PortalException, SystemException {
738
739 return getPortal().getLayoutFullURL(layout, themeDisplay);
740 }
741
742 public static String getLayoutFullURL(
743 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
744 throws PortalException, SystemException {
745
746 return getPortal().getLayoutFullURL(layout, themeDisplay, doAsUser);
747 }
748
749 public static String getLayoutFullURL(long groupId, String portletId)
750 throws PortalException, SystemException {
751
752 return getPortal().getLayoutFullURL(groupId, portletId);
753 }
754
755 public static String getLayoutFullURL(
756 long groupId, String portletId, boolean secure)
757 throws PortalException, SystemException {
758
759 return getPortal().getLayoutFullURL(groupId, portletId, secure);
760 }
761
762 public static String getLayoutFullURL(ThemeDisplay themeDisplay)
763 throws PortalException, SystemException {
764
765 return getPortal().getLayoutFullURL(themeDisplay);
766 }
767
768 public static String getLayoutSetFriendlyURL(
769 LayoutSet layoutSet, ThemeDisplay themeDisplay)
770 throws PortalException, SystemException {
771
772 return getPortal().getLayoutSetFriendlyURL(layoutSet, themeDisplay);
773 }
774
775 public static String getLayoutTarget(Layout layout) {
776 return getPortal().getLayoutTarget(layout);
777 }
778
779 public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
780 throws PortalException, SystemException {
781
782 return getPortal().getLayoutURL(layout, themeDisplay);
783 }
784
785 public static String getLayoutURL(
786 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
787 throws PortalException, SystemException {
788
789 return getPortal().getLayoutURL(layout, themeDisplay, doAsUser);
790 }
791
792 public static String getLayoutURL(ThemeDisplay themeDisplay)
793 throws PortalException, SystemException {
794
795 return getPortal().getLayoutURL(themeDisplay);
796 }
797
798 public static String getLayoutViewPage(Layout layout) {
799 return getPortal().getLayoutViewPage(layout);
800 }
801
802 public static String getLayoutViewPage(String type) {
803 return getPortal().getLayoutViewPage(type);
804 }
805
806 public static LiferayPortletRequest getLiferayPortletRequest(
807 PortletRequest portletRequest) {
808
809 return getPortal().getLiferayPortletRequest(portletRequest);
810 }
811
812 public static LiferayPortletResponse getLiferayPortletResponse(
813 PortletResponse portletResponse) {
814
815 return getPortal().getLiferayPortletResponse(portletResponse);
816 }
817
818 public static Locale getLocale(HttpServletRequest request) {
819 return getPortal().getLocale(request);
820 }
821
822 public static Locale getLocale(
823 HttpServletRequest request, HttpServletResponse response,
824 boolean initialize) {
825
826 return getPortal().getLocale(request, response, initialize);
827 }
828
829 public static Locale getLocale(RenderRequest renderRequest) {
830 return getPortal().getLocale(renderRequest);
831 }
832
833 public static String getMailId(
834 String mx, String popPortletPrefix, Object... ids) {
835
836 return getPortal().getMailId(mx, popPortletPrefix, ids);
837 }
838
839
842 public static BaseModel<?> getModel(Resource resource)
843 throws PortalException, SystemException {
844
845 return getPortal().getBaseModel(resource);
846 }
847
848
851 public static BaseModel<?> getModel(ResourcePermission resourcePermission)
852 throws PortalException, SystemException {
853
854 return getPortal().getBaseModel(resourcePermission);
855 }
856
857
860 public static BaseModel<?> getModel(String modelName, String primKey)
861 throws PortalException, SystemException {
862
863 return getPortal().getBaseModel(modelName, primKey);
864 }
865
866 public static String getNetvibesURL(
867 Portlet portlet, ThemeDisplay themeDisplay)
868 throws PortalException, SystemException {
869
870 return getPortal().getNetvibesURL(portlet, themeDisplay);
871 }
872
873 public static String getNewPortletTitle(
874 String portletTitle, String oldScopeName, String newScopeName) {
875
876 return getPortal().getNewPortletTitle(
877 portletTitle, oldScopeName, newScopeName);
878 }
879
880 public static HttpServletRequest getOriginalServletRequest(
881 HttpServletRequest request) {
882
883 return getPortal().getOriginalServletRequest(request);
884 }
885
886 public static long getParentGroupId(long scopeGroupId)
887 throws PortalException, SystemException {
888
889 return getPortal().getParentGroupId(scopeGroupId);
890 }
891
892 public static String getPathContext() {
893 return getPortal().getPathContext();
894 }
895
896 public static String getPathFriendlyURLPrivateGroup() {
897 return getPortal().getPathFriendlyURLPrivateGroup();
898 }
899
900 public static String getPathFriendlyURLPrivateUser() {
901 return getPortal().getPathFriendlyURLPrivateUser();
902 }
903
904 public static String getPathFriendlyURLPublic() {
905 return getPortal().getPathFriendlyURLPublic();
906 }
907
908 public static String getPathImage() {
909 return getPortal().getPathImage();
910 }
911
912 public static String getPathMain() {
913 return getPortal().getPathMain();
914 }
915
916 public static String getPathProxy() {
917 return getPortal().getPathProxy();
918 }
919
920 public static long getPlidFromFriendlyURL(
921 long companyId, String friendlyURL) {
922
923 return getPortal().getPlidFromFriendlyURL(companyId, friendlyURL);
924 }
925
926 public static long getPlidFromPortletId(
927 long groupId, boolean privateLayout, String portletId)
928 throws PortalException, SystemException {
929
930 return getPortal().getPlidFromPortletId(
931 groupId, privateLayout, portletId);
932 }
933
934 public static long getPlidFromPortletId(long groupId, String portletId)
935 throws PortalException, SystemException {
936
937 return getPortal().getPlidFromPortletId(groupId, portletId);
938 }
939
940 public static Portal getPortal() {
941 PortalRuntimePermission.checkGetBeanProperty(PortalUtil.class);
942
943 return _portal;
944 }
945
946 public static String getPortalLibDir() {
947 return getPortal().getPortalLibDir();
948 }
949
950
953 public static int getPortalPort() {
954 return getPortal().getPortalPort();
955 }
956
957 public static int getPortalPort(boolean secure) {
958 return getPortal().getPortalPort(secure);
959 }
960
961 public static Properties getPortalProperties() {
962 return getPortal().getPortalProperties();
963 }
964
965 public static String getPortalURL(HttpServletRequest request) {
966 return getPortal().getPortalURL(request);
967 }
968
969 public static String getPortalURL(
970 HttpServletRequest request, boolean secure) {
971
972 return getPortal().getPortalURL(request, secure);
973 }
974
975 public static String getPortalURL(Layout layout, ThemeDisplay themeDisplay)
976 throws PortalException, SystemException {
977
978 return getPortal().getPortalURL(layout, themeDisplay);
979 }
980
981 public static String getPortalURL(PortletRequest portletRequest) {
982 return getPortal().getPortalURL(portletRequest);
983 }
984
985 public static String getPortalURL(
986 PortletRequest portletRequest, boolean secure) {
987
988 return getPortal().getPortalURL(portletRequest, secure);
989 }
990
991 public static String getPortalURL(
992 String serverName, int serverPort, boolean secure) {
993
994 return getPortal().getPortalURL(serverName, serverPort, secure);
995 }
996
997 public static String getPortalURL(ThemeDisplay themeDisplay)
998 throws PortalException, SystemException {
999
1000 return getPortal().getPortalURL(themeDisplay);
1001 }
1002
1003 public static String getPortalWebDir() {
1004 return getPortal().getPortalWebDir();
1005 }
1006
1007 public static Set<String> getPortletAddDefaultResourceCheckWhitelist() {
1008 return getPortal().getPortletAddDefaultResourceCheckWhitelist();
1009 }
1010
1011 public static Set<String>
1012 getPortletAddDefaultResourceCheckWhitelistActions() {
1013
1014 return getPortal().getPortletAddDefaultResourceCheckWhitelistActions();
1015 }
1016
1017
1020 public static List<BreadcrumbEntry> getPortletBreadcrumbList(
1021 HttpServletRequest request) {
1022
1023 return getPortal().getPortletBreadcrumbList(request);
1024 }
1025
1026 public static List<BreadcrumbEntry> getPortletBreadcrumbs(
1027 HttpServletRequest request) {
1028
1029 return getPortal().getPortletBreadcrumbs(request);
1030 }
1031
1032 public static String getPortletDescription(
1033 Portlet portlet, ServletContext servletContext, Locale locale) {
1034
1035 return getPortal().getPortletDescription(
1036 portlet, servletContext, locale);
1037 }
1038
1039 public static String getPortletDescription(Portlet portlet, User user) {
1040 return getPortal().getPortletDescription(portlet, user);
1041 }
1042
1043 public static String getPortletDescription(
1044 String portletId, Locale locale) {
1045
1046 return getPortal().getPortletDescription(portletId, locale);
1047 }
1048
1049 public static String getPortletDescription(
1050 String portletId, String languageId) {
1051
1052 return getPortal().getPortletDescription(portletId, languageId);
1053 }
1054
1055 public static String getPortletDescription(String portletId, User user) {
1056 return getPortal().getPortletDescription(portletId, user);
1057 }
1058
1059 public static String getPortletId(HttpServletRequest request) {
1060 return getPortal().getPortletId(request);
1061 }
1062
1063 public static String getPortletId(PortletRequest portletRequest) {
1064 return getPortal().getPortletId(portletRequest);
1065 }
1066
1067 public static String getPortletLongTitle(Portlet portlet, Locale locale) {
1068 return getPortal().getPortletLongTitle(portlet, locale);
1069 }
1070
1071 public static String getPortletLongTitle(
1072 Portlet portlet, ServletContext servletContext, Locale locale) {
1073
1074 return getPortal().getPortletLongTitle(portlet, servletContext, locale);
1075 }
1076
1077 public static String getPortletLongTitle(
1078 Portlet portlet, String languageId) {
1079
1080 return getPortal().getPortletLongTitle(portlet, languageId);
1081 }
1082
1083 public static String getPortletLongTitle(Portlet portlet, User user) {
1084 return getPortal().getPortletLongTitle(portlet, user);
1085 }
1086
1087 public static String getPortletLongTitle(String portletId, Locale locale) {
1088 return getPortal().getPortletLongTitle(portletId, locale);
1089 }
1090
1091 public static String getPortletLongTitle(
1092 String portletId, String languageId) {
1093
1094 return getPortal().getPortletLongTitle(portletId, languageId);
1095 }
1096
1097 public static String getPortletLongTitle(String portletId, User user) {
1098 return getPortal().getPortletLongTitle(portletId, user);
1099 }
1100
1101 public static String getPortletNamespace(String portletId) {
1102 return getPortal().getPortletNamespace(portletId);
1103 }
1104
1105 public static String getPortletTitle(Portlet portlet, Locale locale) {
1106 return getPortal().getPortletTitle(portlet, locale);
1107 }
1108
1109 public static String getPortletTitle(
1110 Portlet portlet, ServletContext servletContext, Locale locale) {
1111
1112 return getPortal().getPortletTitle(portlet, servletContext, locale);
1113 }
1114
1115 public static String getPortletTitle(Portlet portlet, String languageId) {
1116 return getPortal().getPortletTitle(portlet, languageId);
1117 }
1118
1119 public static String getPortletTitle(Portlet portlet, User user) {
1120 return getPortal().getPortletTitle(portlet, user);
1121 }
1122
1123 public static String getPortletTitle(RenderResponse renderResponse) {
1124 return getPortal().getPortletTitle(renderResponse);
1125 }
1126
1127 public static String getPortletTitle(String portletId, Locale locale) {
1128 return getPortal().getPortletTitle(portletId, locale);
1129 }
1130
1131 public static String getPortletTitle(String portletId, String languageId) {
1132 return getPortal().getPortletTitle(portletId, languageId);
1133 }
1134
1135 public static String getPortletTitle(String portletId, User user) {
1136 return getPortal().getPortletTitle(portletId, user);
1137 }
1138
1139 public static String getPortletXmlFileName() throws SystemException {
1140 return getPortal().getPortletXmlFileName();
1141 }
1142
1143 public static PortletPreferences getPreferences(
1144 HttpServletRequest request) {
1145
1146 return getPortal().getPreferences(request);
1147 }
1148
1149 public static PreferencesValidator getPreferencesValidator(
1150 Portlet portlet) {
1151
1152 return getPortal().getPreferencesValidator(portlet);
1153 }
1154
1155 public static String getRelativeHomeURL(HttpServletRequest request)
1156 throws PortalException, SystemException {
1157
1158 return getPortal().getRelativeHomeURL(request);
1159 }
1160
1161 public static long getScopeGroupId(HttpServletRequest request)
1162 throws PortalException, SystemException {
1163
1164 return getPortal().getScopeGroupId(request);
1165 }
1166
1167 public static long getScopeGroupId(
1168 HttpServletRequest request, String portletId)
1169 throws PortalException, SystemException {
1170
1171 return getPortal().getScopeGroupId(request, portletId);
1172 }
1173
1174 public static long getScopeGroupId(
1175 HttpServletRequest request, String portletId,
1176 boolean checkStagingGroup)
1177 throws PortalException, SystemException {
1178
1179 return getPortal().getScopeGroupId(
1180 request, portletId, checkStagingGroup);
1181 }
1182
1183 public static long getScopeGroupId(Layout layout) {
1184 return getPortal().getScopeGroupId(layout);
1185 }
1186
1187 public static long getScopeGroupId(Layout layout, String portletId) {
1188 return getPortal().getScopeGroupId(layout, portletId);
1189 }
1190
1191 public static long getScopeGroupId(long plid) {
1192 return getPortal().getScopeGroupId(plid);
1193 }
1194
1195 public static long getScopeGroupId(PortletRequest portletRequest)
1196 throws PortalException, SystemException {
1197
1198 return getPortal().getScopeGroupId(portletRequest);
1199 }
1200
1201 public static User getSelectedUser(HttpServletRequest request)
1202 throws PortalException, SystemException {
1203
1204 return getPortal().getSelectedUser(request);
1205 }
1206
1207 public static User getSelectedUser(
1208 HttpServletRequest request, boolean checkPermission)
1209 throws PortalException, SystemException {
1210
1211 return getPortal().getSelectedUser(request, checkPermission);
1212 }
1213
1214 public static User getSelectedUser(PortletRequest portletRequest)
1215 throws PortalException, SystemException {
1216
1217 return getPortal().getSelectedUser(portletRequest);
1218 }
1219
1220 public static User getSelectedUser(
1221 PortletRequest portletRequest, boolean checkPermission)
1222 throws PortalException, SystemException {
1223
1224 return getPortal().getSelectedUser(portletRequest, checkPermission);
1225 }
1226
1227 public static ServletContext getServletContext(
1228 Portlet portlet, ServletContext servletContext) {
1229
1230 return getPortal().getServletContext(portlet, servletContext);
1231 }
1232
1233 public static String getSiteLoginURL(ThemeDisplay themeDisplay)
1234 throws PortalException, SystemException {
1235
1236 return getPortal().getSiteLoginURL(themeDisplay);
1237 }
1238
1239 public static String getStaticResourceURL(
1240 HttpServletRequest request, String uri) {
1241
1242 return getPortal().getStaticResourceURL(request, uri);
1243 }
1244
1245 public static String getStaticResourceURL(
1246 HttpServletRequest request, String uri, long timestamp) {
1247
1248 return getPortal().getStaticResourceURL(request, uri, timestamp);
1249 }
1250
1251 public static String getStaticResourceURL(
1252 HttpServletRequest request, String uri, String queryString) {
1253
1254 return getPortal().getStaticResourceURL(request, uri, queryString);
1255 }
1256
1257 public static String getStaticResourceURL(
1258 HttpServletRequest request, String uri, String queryString,
1259 long timestamp) {
1260
1261 return getPortal().getStaticResourceURL(
1262 request, uri, queryString, timestamp);
1263 }
1264
1265 public static String getStrutsAction(HttpServletRequest request) {
1266 return getPortal().getStrutsAction(request);
1267 }
1268
1269 public static String[] getSystemGroups() {
1270 return getPortal().getSystemGroups();
1271 }
1272
1273 public static String[] getSystemOrganizationRoles() {
1274 return getPortal().getSystemOrganizationRoles();
1275 }
1276
1277 public static String[] getSystemRoles() {
1278 return getPortal().getSystemRoles();
1279 }
1280
1281 public static String[] getSystemSiteRoles() {
1282 return getPortal().getSystemSiteRoles();
1283 }
1284
1285 public static String getUniqueElementId(
1286 HttpServletRequest request, String namespace, String id) {
1287
1288 return getPortal().getUniqueElementId(request, namespace, id);
1289 }
1290
1291 public static String getUniqueElementId(
1292 PortletRequest request, String namespace, String id) {
1293
1294 return getPortal().getUniqueElementId(request, namespace, id);
1295 }
1296
1297 public static UploadPortletRequest getUploadPortletRequest(
1298 PortletRequest portletRequest) {
1299
1300 return getPortal().getUploadPortletRequest(portletRequest);
1301 }
1302
1303 public static UploadServletRequest getUploadServletRequest(
1304 HttpServletRequest request) {
1305
1306 return getPortal().getUploadServletRequest(request);
1307 }
1308
1309 public static Date getUptime() {
1310 return getPortal().getUptime();
1311 }
1312
1313 public static String getURLWithSessionId(String url, String sessionId) {
1314 return getPortal().getURLWithSessionId(url, sessionId);
1315 }
1316
1317 public static User getUser(HttpServletRequest request)
1318 throws PortalException, SystemException {
1319
1320 return getPortal().getUser(request);
1321 }
1322
1323 public static User getUser(PortletRequest portletRequest)
1324 throws PortalException, SystemException {
1325
1326 return getPortal().getUser(portletRequest);
1327 }
1328
1329 public static String getUserEmailAddress(long userId)
1330 throws SystemException {
1331
1332 return getPortal().getUserEmailAddress(userId);
1333 }
1334
1335 public static long getUserId(HttpServletRequest request) {
1336 return getPortal().getUserId(request);
1337 }
1338
1339 public static long getUserId(PortletRequest portletRequest) {
1340 return getPortal().getUserId(portletRequest);
1341 }
1342
1343 public static String getUserName(BaseModel<?> baseModel) {
1344 return getPortal().getUserName(baseModel);
1345 }
1346
1347 public static String getUserName(long userId, String defaultUserName) {
1348 return getPortal().getUserName(userId, defaultUserName);
1349 }
1350
1351 public static String getUserName(
1352 long userId, String defaultUserName, HttpServletRequest request) {
1353
1354 return getPortal().getUserName(userId, defaultUserName, request);
1355 }
1356
1357 public static String getUserName(
1358 long userId, String defaultUserName, String userAttribute) {
1359
1360 return getPortal().getUserName(userId, defaultUserName, userAttribute);
1361 }
1362
1363 public static String getUserName(
1364 long userId, String defaultUserName, String userAttribute,
1365 HttpServletRequest request) {
1366
1367 return getPortal().getUserName(
1368 userId, defaultUserName, userAttribute, request);
1369 }
1370
1371 public static String getUserPassword(HttpServletRequest request) {
1372 return getPortal().getUserPassword(request);
1373 }
1374
1375 public static String getUserPassword(HttpSession session) {
1376 return getPortal().getUserPassword(session);
1377 }
1378
1379 public static String getUserPassword(PortletRequest portletRequest) {
1380 return getPortal().getUserPassword(portletRequest);
1381 }
1382
1383 public static String getUserValue(
1384 long userId, String param, String defaultValue)
1385 throws SystemException {
1386
1387 return getPortal().getUserValue(userId, param, defaultValue);
1388 }
1389
1390 public static long getValidUserId(long companyId, long userId)
1391 throws PortalException, SystemException {
1392
1393 return getPortal().getValidUserId(companyId, userId);
1394 }
1395
1396 public static String getVirtualLayoutActualURL(
1397 long groupId, boolean privateLayout, String mainPath,
1398 String friendlyURL, Map<String, String[]> params,
1399 Map<String, Object> requestContext)
1400 throws PortalException, SystemException {
1401
1402 return getPortal().getVirtualLayoutActualURL(
1403 groupId, privateLayout, mainPath, friendlyURL, params,
1404 requestContext);
1405 }
1406
1407 public static String getWidgetURL(
1408 Portlet portlet, ThemeDisplay themeDisplay)
1409 throws PortalException, SystemException {
1410
1411 return getPortal().getWidgetURL(portlet, themeDisplay);
1412 }
1413
1414 public static void initCustomSQL() {
1415 getPortal().initCustomSQL();
1416 }
1417
1418 public static User initUser(HttpServletRequest request) throws Exception {
1419 return getPortal().initUser(request);
1420 }
1421
1422 public static boolean isAllowAddPortletDefaultResource(
1423 HttpServletRequest request, Portlet portlet)
1424 throws PortalException, SystemException {
1425
1426 return getPortal().isAllowAddPortletDefaultResource(request, portlet);
1427 }
1428
1429 public static boolean isCDNDynamicResourcesEnabled(
1430 HttpServletRequest request)
1431 throws PortalException, SystemException {
1432
1433 return getPortal().isCDNDynamicResourcesEnabled(request);
1434 }
1435
1436 public static boolean isCDNDynamicResourcesEnabled(long companyId) {
1437 return getPortal().isCDNDynamicResourcesEnabled(companyId);
1438 }
1439
1440
1443 public static boolean isCommunityAdmin(User user, long groupId)
1444 throws Exception {
1445
1446 return getPortal().isCommunityAdmin(user, groupId);
1447 }
1448
1449
1452 public static boolean isCommunityOwner(User user, long groupId)
1453 throws Exception {
1454
1455 return getPortal().isCommunityOwner(user, groupId);
1456 }
1457
1458 public static boolean isCompanyAdmin(User user) throws Exception {
1459 return getPortal().isCompanyAdmin(user);
1460 }
1461
1462 public static boolean isCompanyControlPanelPortlet(
1463 String portletId, String category, ThemeDisplay themeDisplay)
1464 throws PortalException, SystemException {
1465
1466 return getPortal().isCompanyControlPanelPortlet(
1467 portletId, category, themeDisplay);
1468 }
1469
1470 public static boolean isCompanyControlPanelPortlet(
1471 String portletId, ThemeDisplay themeDisplay)
1472 throws PortalException, SystemException {
1473
1474 return getPortal().isCompanyControlPanelPortlet(
1475 portletId, themeDisplay);
1476 }
1477
1478 public static boolean isCompanyControlPanelVisible(
1479 ThemeDisplay themeDisplay)
1480 throws PortalException, SystemException {
1481
1482 return getPortal().isCompanyControlPanelVisible(themeDisplay);
1483 }
1484
1485 public static boolean isControlPanelPortlet(
1486 String portletId, String category, ThemeDisplay themeDisplay)
1487 throws SystemException {
1488
1489 return getPortal().isControlPanelPortlet(
1490 portletId, category, themeDisplay);
1491 }
1492
1493 public static boolean isControlPanelPortlet(
1494 String portletId, ThemeDisplay themeDisplay)
1495 throws SystemException {
1496
1497 return getPortal().isControlPanelPortlet(portletId, themeDisplay);
1498 }
1499
1500 public static boolean isGroupAdmin(User user, long groupId)
1501 throws Exception {
1502
1503 return getPortal().isGroupAdmin(user, groupId);
1504 }
1505
1506 public static boolean isGroupFriendlyURL(
1507 String fullURL, String groupFriendlyURL, String layoutFriendlyURL) {
1508
1509 return getPortal().isGroupFriendlyURL(
1510 fullURL, groupFriendlyURL, layoutFriendlyURL);
1511 }
1512
1513 public static boolean isGroupOwner(User user, long groupId)
1514 throws Exception {
1515
1516 return getPortal().isGroupOwner(user, groupId);
1517 }
1518
1519 public static boolean isLayoutDescendant(Layout layout, long layoutId)
1520 throws PortalException, SystemException {
1521
1522 return getPortal().isLayoutDescendant(layout, layoutId);
1523 }
1524
1525 public static boolean isLayoutFirstPageable(Layout layout) {
1526 return getPortal().isLayoutFirstPageable(layout);
1527 }
1528
1529 public static boolean isLayoutFirstPageable(String type) {
1530 return getPortal().isLayoutFirstPageable(type);
1531 }
1532
1533 public static boolean isLayoutFriendliable(Layout layout) {
1534 return getPortal().isLayoutFriendliable(layout);
1535 }
1536
1537 public static boolean isLayoutFriendliable(String type) {
1538 return getPortal().isLayoutFriendliable(type);
1539 }
1540
1541 public static boolean isLayoutParentable(Layout layout) {
1542 return getPortal().isLayoutParentable(layout);
1543 }
1544
1545 public static boolean isLayoutParentable(String type) {
1546 return getPortal().isLayoutParentable(type);
1547 }
1548
1549 public static boolean isLayoutSitemapable(Layout layout) {
1550 return getPortal().isLayoutSitemapable(layout);
1551 }
1552
1553 public static boolean isMethodGet(PortletRequest portletRequest) {
1554 return getPortal().isMethodGet(portletRequest);
1555 }
1556
1557 public static boolean isMethodPost(PortletRequest portletRequest) {
1558 return getPortal().isMethodPost(portletRequest);
1559 }
1560
1561 public static boolean isMultipartRequest(HttpServletRequest request) {
1562 return getPortal().isMultipartRequest(request);
1563 }
1564
1565 public static boolean isOmniadmin(long userId) {
1566 return getPortal().isOmniadmin(userId);
1567 }
1568
1569 public static boolean isReservedParameter(String name) {
1570 return getPortal().isReservedParameter(name);
1571 }
1572
1573 public static boolean isSecure(HttpServletRequest request) {
1574 return getPortal().isSecure(request);
1575 }
1576
1577 public static boolean isSystemGroup(String groupName) {
1578 return getPortal().isSystemGroup(groupName);
1579 }
1580
1581 public static boolean isSystemRole(String roleName) {
1582 return getPortal().isSystemRole(roleName);
1583 }
1584
1585 public static boolean isUpdateAvailable() throws SystemException {
1586 return getPortal().isUpdateAvailable();
1587 }
1588
1589 public static boolean isValidResourceId(String resourceId) {
1590 return getPortal().isValidResourceId(resourceId);
1591 }
1592
1593 public static String renderPage(
1594 ServletContext servletContext, HttpServletRequest request,
1595 HttpServletResponse response, String path, boolean writeOutput)
1596 throws IOException, ServletException {
1597
1598 return getPortal().renderPage(servletContext, request, response, path);
1599 }
1600
1601 public static String renderPortlet(
1602 ServletContext servletContext, HttpServletRequest request,
1603 HttpServletResponse response, Portlet portlet, String queryString,
1604 boolean writeOutput)
1605 throws IOException, ServletException {
1606
1607 return getPortal().renderPortlet(
1608 servletContext, request, response, portlet, queryString,
1609 writeOutput);
1610 }
1611
1612 public static String renderPortlet(
1613 ServletContext servletContext, HttpServletRequest request,
1614 HttpServletResponse response, Portlet portlet, String queryString,
1615 String columnId, Integer columnPos, Integer columnCount,
1616 boolean writeOutput)
1617 throws IOException, ServletException {
1618
1619 return getPortal().renderPortlet(
1620 servletContext, request, response, portlet, queryString, columnId,
1621 columnPos, columnCount, writeOutput);
1622 }
1623
1624 public static String renderPortlet(
1625 ServletContext servletContext, HttpServletRequest request,
1626 HttpServletResponse response, Portlet portlet, String queryString,
1627 String columnId, Integer columnPos, Integer columnCount,
1628 String path, boolean writeOutput)
1629 throws IOException, ServletException {
1630
1631 return getPortal().renderPortlet(
1632 servletContext, request, response, portlet, queryString, columnId,
1633 columnPos, columnCount, path, writeOutput);
1634 }
1635
1636 public static void resetCDNHosts() {
1637 getPortal().resetCDNHosts();
1638 }
1639
1640 public static Set<String> resetPortletAddDefaultResourceCheckWhitelist() {
1641 return getPortal().resetPortletAddDefaultResourceCheckWhitelist();
1642 }
1643
1644 public static Set<String>
1645 resetPortletAddDefaultResourceCheckWhitelistActions() {
1646
1647 return getPortal().
1648 resetPortletAddDefaultResourceCheckWhitelistActions();
1649 }
1650
1651
1654 public static void runSQL(String sql) throws IOException, SQLException {
1655 DBFactoryUtil.getDB().runSQL(sql);
1656 }
1657
1658 public static void sendError(
1659 Exception e, ActionRequest actionRequest,
1660 ActionResponse actionResponse)
1661 throws IOException {
1662
1663 getPortal().sendError(e, actionRequest, actionResponse);
1664 }
1665
1666 public static void sendError(
1667 Exception e, HttpServletRequest request,
1668 HttpServletResponse response)
1669 throws IOException, ServletException {
1670
1671 getPortal().sendError(e, request, response);
1672 }
1673
1674 public static void sendError(
1675 int status, Exception e, ActionRequest actionRequest,
1676 ActionResponse actionResponse)
1677 throws IOException {
1678
1679 getPortal().sendError(status, e, actionRequest, actionResponse);
1680 }
1681
1682 public static void sendError(
1683 int status, Exception e, HttpServletRequest request,
1684 HttpServletResponse response)
1685 throws IOException, ServletException {
1686
1687 getPortal().sendError(status, e, request, response);
1688 }
1689
1690
1694 public static void setPageDescription(
1695 String description, HttpServletRequest request) {
1696
1697 getPortal().setPageDescription(description, request);
1698 }
1699
1700
1703 public static void setPageKeywords(
1704 String keywords, HttpServletRequest request) {
1705
1706 getPortal().setPageKeywords(keywords, request);
1707 }
1708
1709
1712 public static void setPageSubtitle(
1713 String subtitle, HttpServletRequest request) {
1714
1715 getPortal().setPageSubtitle(subtitle, request);
1716 }
1717
1718
1722 public static void setPageTitle(String title, HttpServletRequest request) {
1723 getPortal().setPageTitle(title, request);
1724 }
1725
1726
1729 public static void setPortalPort(HttpServletRequest request) {
1730 getPortal().setPortalPort(request);
1731 }
1732
1733 public static void storePreferences(PortletPreferences portletPreferences)
1734 throws IOException, ValidatorException {
1735
1736 getPortal().storePreferences(portletPreferences);
1737 }
1738
1739 public static String[] stripURLAnchor(String url, String separator) {
1740 return getPortal().stripURLAnchor(url, separator);
1741 }
1742
1743 public static String transformCustomSQL(String sql) {
1744 return getPortal().transformCustomSQL(sql);
1745 }
1746
1747 public static String transformSQL(String sql) {
1748 return getPortal().transformSQL(sql);
1749 }
1750
1751 public static PortletMode updatePortletMode(
1752 String portletId, User user, Layout layout, PortletMode portletMode,
1753 HttpServletRequest request) {
1754
1755 return getPortal().updatePortletMode(
1756 portletId, user, layout, portletMode, request);
1757 }
1758
1759 public static String updateRedirect(
1760 String redirect, String oldPath, String newPath) {
1761
1762 return getPortal().updateRedirect(redirect, oldPath, newPath);
1763 }
1764
1765 public static WindowState updateWindowState(
1766 String portletId, User user, Layout layout, WindowState windowState,
1767 HttpServletRequest request) {
1768
1769 return getPortal().updateWindowState(
1770 portletId, user, layout, windowState, request);
1771 }
1772
1773 public void removePortalPortEventListener(
1774 PortalPortEventListener portalPortEventListener) {
1775
1776 getPortal().removePortalPortEventListener(portalPortEventListener);
1777 }
1778
1779 public void setPortal(Portal portal) {
1780 PortalRuntimePermission.checkSetBeanProperty(getClass());
1781
1782 _portal = portal;
1783 }
1784
1785 private static Portal _portal;
1786
1787 }