001
014
015 package com.liferay.portal.util;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.dao.db.DB;
020 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
021 import com.liferay.portal.kernel.exception.PortalException;
022 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
023 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
024 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
025 import com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry;
026 import com.liferay.portal.kernel.upload.UploadPortletRequest;
027 import com.liferay.portal.kernel.upload.UploadServletRequest;
028 import com.liferay.portal.model.BaseModel;
029 import com.liferay.portal.model.Company;
030 import com.liferay.portal.model.Group;
031 import com.liferay.portal.model.Layout;
032 import com.liferay.portal.model.LayoutFriendlyURLComposite;
033 import com.liferay.portal.model.LayoutQueryStringComposite;
034 import com.liferay.portal.model.LayoutSet;
035 import com.liferay.portal.model.Portlet;
036 import com.liferay.portal.model.ResourcePermission;
037 import com.liferay.portal.model.User;
038 import com.liferay.portal.service.PortletLocalServiceUtil;
039 import com.liferay.portal.theme.ThemeDisplay;
040 import com.liferay.portlet.InvokerPortlet;
041 import com.liferay.portlet.PortletInstanceFactoryUtil;
042 import com.liferay.portlet.expando.model.ExpandoBridge;
043
044 import java.io.IOException;
045 import java.io.Serializable;
046
047 import java.net.InetAddress;
048
049 import java.sql.SQLException;
050
051 import java.util.Date;
052 import java.util.List;
053 import java.util.Locale;
054 import java.util.Map;
055 import java.util.Properties;
056 import java.util.ResourceBundle;
057 import java.util.Set;
058 import java.util.TimeZone;
059
060 import javax.portlet.ActionRequest;
061 import javax.portlet.ActionResponse;
062 import javax.portlet.PortletConfig;
063 import javax.portlet.PortletException;
064 import javax.portlet.PortletMode;
065 import javax.portlet.PortletPreferences;
066 import javax.portlet.PortletRequest;
067 import javax.portlet.PortletResponse;
068 import javax.portlet.PortletURL;
069 import javax.portlet.PreferencesValidator;
070 import javax.portlet.RenderRequest;
071 import javax.portlet.ResourceRequest;
072 import javax.portlet.ResourceResponse;
073 import javax.portlet.ValidatorException;
074 import javax.portlet.WindowState;
075
076 import javax.servlet.ServletContext;
077 import javax.servlet.ServletException;
078 import javax.servlet.http.HttpServletRequest;
079 import javax.servlet.http.HttpServletResponse;
080 import javax.servlet.http.HttpSession;
081
082
087 @ProviderType
088 public class PortalUtil {
089
090
098 public static void addPageDescription(
099 String description, HttpServletRequest request) {
100
101 getPortal().addPageDescription(description, request);
102 }
103
104
112 public static void addPageKeywords(
113 String keywords, HttpServletRequest request) {
114
115 getPortal().addPageKeywords(keywords, request);
116 }
117
118
124 public static void addPageSubtitle(
125 String subtitle, HttpServletRequest request) {
126
127 getPortal().addPageSubtitle(subtitle, request);
128 }
129
130
136 public static void addPageTitle(String title, HttpServletRequest request) {
137 getPortal().addPageTitle(title, request);
138 }
139
140 public static boolean addPortalInetSocketAddressEventListener(
141 PortalInetSocketAddressEventListener
142 portalInetSocketAddressEventListener) {
143
144 return getPortal().addPortalInetSocketAddressEventListener(
145 portalInetSocketAddressEventListener);
146 }
147
148
157 @Deprecated
158 public static void addPortalPortEventListener(
159 PortalPortEventListener portalPortEventListener) {
160
161 getPortal().addPortalPortEventListener(portalPortEventListener);
162 }
163
164
171 public static void addPortletBreadcrumbEntry(
172 HttpServletRequest request, String title, String url) {
173
174 getPortal().addPortletBreadcrumbEntry(request, title, url);
175 }
176
177
185 public static void addPortletBreadcrumbEntry(
186 HttpServletRequest request, String title, String url,
187 Map<String, Object> data) {
188
189 getPortal().addPortletBreadcrumbEntry(request, title, url, data);
190 }
191
192
199 public static void addPortletDefaultResource(
200 HttpServletRequest request, Portlet portlet)
201 throws PortalException {
202
203 getPortal().addPortletDefaultResource(request, portlet);
204 }
205
206 public static void addPortletDefaultResource(
207 long companyId, Layout layout, Portlet portlet)
208 throws PortalException {
209
210 getPortal().addPortletDefaultResource(companyId, layout, portlet);
211 }
212
213
230 public static String addPreservedParameters(
231 ThemeDisplay themeDisplay, Layout layout, String url,
232 boolean doAsUser) {
233
234 return getPortal().addPreservedParameters(
235 themeDisplay, layout, url, doAsUser);
236 }
237
238
246 public static String addPreservedParameters(
247 ThemeDisplay themeDisplay, String url) {
248
249 return getPortal().addPreservedParameters(themeDisplay, url);
250 }
251
252 public static void addUserLocaleOptionsMessage(HttpServletRequest request) {
253 getPortal().addUserLocaleOptionsMessage(request);
254 }
255
256
262 public static void clearRequestParameters(RenderRequest renderRequest) {
263 getPortal().clearRequestParameters(renderRequest);
264 }
265
266
273 public static void copyRequestParameters(
274 ActionRequest actionRequest, ActionResponse actionResponse) {
275
276 getPortal().copyRequestParameters(actionRequest, actionResponse);
277 }
278
279
287 public static String escapeRedirect(String url) {
288 return getPortal().escapeRedirect(url);
289 }
290
291
298 public static String generateRandomKey(
299 HttpServletRequest request, String input) {
300
301 return getPortal().generateRandomKey(request, input);
302 }
303
304 public static String getAbsoluteURL(
305 HttpServletRequest request, String url) {
306
307 return getPortal().getAbsoluteURL(request, url);
308 }
309
310 public static LayoutQueryStringComposite
311 getActualLayoutQueryStringComposite(
312 long groupId, boolean privateLayout, String friendlyURL,
313 Map<String, String[]> params, Map<String, Object> requestContext)
314 throws PortalException {
315
316 return getPortal().getActualLayoutQueryStringComposite(
317 groupId, privateLayout, friendlyURL, params, requestContext);
318 }
319
320 public static String getActualURL(
321 long groupId, boolean privateLayout, String mainPath,
322 String friendlyURL, Map<String, String[]> params,
323 Map<String, Object> requestContext)
324 throws PortalException {
325
326 return getPortal().getActualURL(
327 groupId, privateLayout, mainPath, friendlyURL, params,
328 requestContext);
329 }
330
331
349 public static String getAlternateURL(
350 String canonicalURL, ThemeDisplay themeDisplay, Locale locale,
351 Layout layout)
352 throws PortalException {
353
354 return getPortal().getAlternateURL(
355 canonicalURL, themeDisplay, locale, layout);
356 }
357
358 public static long[] getAncestorSiteGroupIds(long groupId)
359 throws PortalException {
360
361 return getPortal().getAncestorSiteGroupIds(groupId);
362 }
363
364
368 @Deprecated
369 public static Set<String> getAuthTokenIgnoreActions() {
370 return getPortal().getAuthTokenIgnoreActions();
371 }
372
373
377 @Deprecated
378 public static Set<String> getAuthTokenIgnorePortlets() {
379 return getPortal().getAuthTokenIgnorePortlets();
380 }
381
382
390 public static BaseModel<?> getBaseModel(
391 ResourcePermission resourcePermission)
392 throws PortalException {
393
394 return getPortal().getBaseModel(resourcePermission);
395 }
396
397
405 public static BaseModel<?> getBaseModel(String modelName, String primKey)
406 throws PortalException {
407
408 return getPortal().getBaseModel(modelName, primKey);
409 }
410
411
416 @Deprecated
417 public static long getBasicAuthUserId(HttpServletRequest request)
418 throws PortalException {
419
420 return getPortal().getBasicAuthUserId(request);
421 }
422
423
428 @Deprecated
429 public static long getBasicAuthUserId(
430 HttpServletRequest request, long companyId)
431 throws PortalException {
432
433 return getPortal().getBasicAuthUserId(request, companyId);
434 }
435
436 public static List<Group> getBrowsableScopeGroups(
437 long userId, long companyId, long groupId, String portletId)
438 throws PortalException {
439
440 return getPortal().getBrowsableScopeGroups(
441 userId, companyId, groupId, portletId);
442 }
443
444
464 public static String getCanonicalURL(
465 String completeURL, ThemeDisplay themeDisplay, Layout layout)
466 throws PortalException {
467
468 return getPortal().getCanonicalURL(completeURL, themeDisplay, layout);
469 }
470
471
494 public static String getCanonicalURL(
495 String completeURL, ThemeDisplay themeDisplay, Layout layout,
496 boolean forceLayoutFriendlyURL)
497 throws PortalException {
498
499 return getPortal().getCanonicalURL(
500 completeURL, themeDisplay, layout, forceLayoutFriendlyURL);
501 }
502
503
506 @Deprecated
507 public static String getCDNHost() {
508 return getPortal().getCDNHost();
509 }
510
511
518 public static String getCDNHost(boolean secure) {
519 return getPortal().getCDNHost(secure);
520 }
521
522 public static String getCDNHost(HttpServletRequest request)
523 throws PortalException {
524
525 return getPortal().getCDNHost(request);
526 }
527
528
535 public static String getCDNHostHttp(long companyId) {
536 return getPortal().getCDNHostHttp(companyId);
537 }
538
539
546 public static String getCDNHostHttps(long companyId) {
547 return getPortal().getCDNHostHttps(companyId);
548 }
549
550
556 public static String getClassName(long classNameId) {
557 return getPortal().getClassName(classNameId);
558 }
559
560
566 public static long getClassNameId(Class<?> clazz) {
567 return getPortal().getClassNameId(clazz);
568 }
569
570
576 public static long getClassNameId(String value) {
577 return getPortal().getClassNameId(value);
578 }
579
580 public static Company getCompany(HttpServletRequest request)
581 throws PortalException {
582
583 return getPortal().getCompany(request);
584 }
585
586 public static Company getCompany(PortletRequest portletRequest)
587 throws PortalException {
588
589 return getPortal().getCompany(portletRequest);
590 }
591
592 public static long getCompanyId(HttpServletRequest request) {
593 return getPortal().getCompanyId(request);
594 }
595
596 public static long getCompanyId(PortletRequest portletRequest) {
597 return getPortal().getCompanyId(portletRequest);
598 }
599
600 public static long[] getCompanyIds() {
601 return getPortal().getCompanyIds();
602 }
603
604 public static Set<String> getComputerAddresses() {
605 return getPortal().getComputerAddresses();
606 }
607
608 public static String getComputerName() {
609 return getPortal().getComputerName();
610 }
611
612 public static String getControlPanelFullURL(
613 long scopeGroupId, String ppid, Map<String, String[]> params)
614 throws PortalException {
615
616 return getPortal().getControlPanelFullURL(scopeGroupId, ppid, params);
617 }
618
619 public static long getControlPanelPlid(long companyId)
620 throws PortalException {
621
622 return getPortal().getControlPanelPlid(companyId);
623 }
624
625 public static long getControlPanelPlid(PortletRequest portletRequest)
626 throws PortalException {
627
628 return getPortal().getControlPanelPlid(portletRequest);
629 }
630
631 public static PortletURL getControlPanelPortletURL(
632 HttpServletRequest request, Group group, String portletId,
633 long refererGroupId, long refererPlid, String lifecycle) {
634
635 return getPortal().getControlPanelPortletURL(
636 request, group, portletId, refererGroupId, refererPlid, lifecycle);
637 }
638
639 public static PortletURL getControlPanelPortletURL(
640 HttpServletRequest request, String portletId, String lifecycle) {
641
642 return getPortal().getControlPanelPortletURL(
643 request, portletId, lifecycle);
644 }
645
646 public static PortletURL getControlPanelPortletURL(
647 PortletRequest portletRequest, Group group, String portletId,
648 long refererGroupId, long refererPlid, String lifecycle) {
649
650 return getPortal().getControlPanelPortletURL(
651 portletRequest, group, portletId, refererGroupId, refererPlid,
652 lifecycle);
653 }
654
655 public static PortletURL getControlPanelPortletURL(
656 PortletRequest portletRequest, String portletId, String lifecycle) {
657
658 return getPortal().getControlPanelPortletURL(
659 portletRequest, portletId, lifecycle);
660 }
661
662 public static String getCreateAccountURL(
663 HttpServletRequest request, ThemeDisplay themeDisplay)
664 throws Exception {
665
666 return getPortal().getCreateAccountURL(request, themeDisplay);
667 }
668
669 public static long[] getCurrentAndAncestorSiteGroupIds(long groupId)
670 throws PortalException {
671
672 return getPortal().getCurrentAndAncestorSiteGroupIds(groupId);
673 }
674
675 public static long[] getCurrentAndAncestorSiteGroupIds(
676 long groupId, boolean checkContentSharingWithChildrenEnabled)
677 throws PortalException {
678
679 return getPortal().getCurrentAndAncestorSiteGroupIds(
680 groupId, checkContentSharingWithChildrenEnabled);
681 }
682
683 public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds)
684 throws PortalException {
685
686 return getPortal().getCurrentAndAncestorSiteGroupIds(groupIds);
687 }
688
689 public static long[] getCurrentAndAncestorSiteGroupIds(
690 long[] groupIds, boolean checkContentSharingWithChildrenEnabled)
691 throws PortalException {
692
693 return getPortal().getCurrentAndAncestorSiteGroupIds(
694 groupIds, checkContentSharingWithChildrenEnabled);
695 }
696
697 public static List<Group> getCurrentAndAncestorSiteGroups(long groupId)
698 throws PortalException {
699
700 return getPortal().getCurrentAndAncestorSiteGroups(groupId);
701 }
702
703 public static List<Group> getCurrentAndAncestorSiteGroups(
704 long groupId, boolean checkContentSharingWithChildrenEnabled)
705 throws PortalException {
706
707 return getPortal().getCurrentAndAncestorSiteGroups(
708 groupId, checkContentSharingWithChildrenEnabled);
709 }
710
711 public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds)
712 throws PortalException {
713
714 return getPortal().getCurrentAndAncestorSiteGroups(groupIds);
715 }
716
717 public static List<Group> getCurrentAndAncestorSiteGroups(
718 long[] groupIds, boolean checkContentSharingWithChildrenEnabled)
719 throws PortalException {
720
721 return getPortal().getCurrentAndAncestorSiteGroups(
722 groupIds, checkContentSharingWithChildrenEnabled);
723 }
724
725 public static String getCurrentCompleteURL(HttpServletRequest request) {
726 return getPortal().getCurrentCompleteURL(request);
727 }
728
729 public static String getCurrentURL(HttpServletRequest request) {
730 return getPortal().getCurrentURL(request);
731 }
732
733 public static String getCurrentURL(PortletRequest portletRequest) {
734 return getPortal().getCurrentURL(portletRequest);
735 }
736
737 public static String getCustomSQLFunctionIsNotNull() {
738 return getPortal().getCustomSQLFunctionIsNotNull();
739 }
740
741 public static String getCustomSQLFunctionIsNull() {
742 return getPortal().getCustomSQLFunctionIsNull();
743 }
744
745
754 public static Date getDate(int month, int day, int year) {
755 return getPortal().getDate(month, day, year);
756 }
757
758
771 public static Date getDate(
772 int month, int day, int year,
773 Class<? extends PortalException> clazz)
774 throws PortalException {
775
776 return getPortal().getDate(month, day, year, clazz);
777 }
778
779
794 public static Date getDate(
795 int month, int day, int year, int hour, int min,
796 Class<? extends PortalException> clazz)
797 throws PortalException {
798
799 return getPortal().getDate(month, day, year, hour, min, clazz);
800 }
801
802
818 public static Date getDate(
819 int month, int day, int year, int hour, int min, TimeZone timeZone,
820 Class<? extends PortalException> clazz)
821 throws PortalException {
822
823 return getPortal().getDate(
824 month, day, year, hour, min, timeZone, clazz);
825 }
826
827
841 public static Date getDate(
842 int month, int day, int year, TimeZone timeZone,
843 Class<? extends PortalException> clazz)
844 throws PortalException {
845
846 return getPortal().getDate(month, day, year, timeZone, clazz);
847 }
848
849
852 @Deprecated
853 public static DB getDB() {
854 return DBManagerUtil.getDB();
855 }
856
857 public static long getDefaultCompanyId() {
858 return getPortal().getDefaultCompanyId();
859 }
860
861
866 @Deprecated
867 public static long getDigestAuthUserId(HttpServletRequest request)
868 throws PortalException {
869
870 return getPortal().getDigestAuthUserId(request);
871 }
872
873 public static String getEmailFromAddress(
874 PortletPreferences preferences, long companyId, String defaultValue) {
875
876 return getPortal().getEmailFromAddress(
877 preferences, companyId, defaultValue);
878 }
879
880 public static String getEmailFromName(
881 PortletPreferences preferences, long companyId, String defaultValue) {
882
883 return getPortal().getEmailFromName(
884 preferences, companyId, defaultValue);
885 }
886
887 public static Map<String, Serializable> getExpandoBridgeAttributes(
888 ExpandoBridge expandoBridge, HttpServletRequest request)
889 throws PortalException {
890
891 return getPortal().getExpandoBridgeAttributes(expandoBridge, request);
892 }
893
894 public static Map<String, Serializable> getExpandoBridgeAttributes(
895 ExpandoBridge expandoBridge, PortletRequest portletRequest)
896 throws PortalException {
897
898 return getPortal().getExpandoBridgeAttributes(
899 expandoBridge, portletRequest);
900 }
901
902 public static Map<String, Serializable> getExpandoBridgeAttributes(
903 ExpandoBridge expandoBridge,
904 UploadPortletRequest uploadPortletRequest)
905 throws PortalException {
906
907 return getPortal().getExpandoBridgeAttributes(
908 expandoBridge, uploadPortletRequest);
909 }
910
911 public static Serializable getExpandoValue(
912 HttpServletRequest request, String name, int type,
913 String displayType)
914 throws PortalException {
915
916 return getPortal().getExpandoValue(request, name, type, displayType);
917 }
918
919 public static Serializable getExpandoValue(
920 PortletRequest portletRequest, String name, int type,
921 String displayType)
922 throws PortalException {
923
924 return getPortal().getExpandoValue(
925 portletRequest, name, type, displayType);
926 }
927
928 public static Serializable getExpandoValue(
929 UploadPortletRequest uploadPortletRequest, String name, int type,
930 String displayType)
931 throws PortalException {
932
933 return getPortal().getExpandoValue(
934 uploadPortletRequest, name, type, displayType);
935 }
936
937 public static String getFacebookURL(
938 Portlet portlet, String facebookCanvasPageURL,
939 ThemeDisplay themeDisplay)
940 throws PortalException {
941
942 return getPortal().getFacebookURL(
943 portlet, facebookCanvasPageURL, themeDisplay);
944 }
945
946 public static String getFirstPageLayoutTypes(HttpServletRequest request) {
947 return getPortal().getFirstPageLayoutTypes(request);
948 }
949
950 public static String getFullName(
951 String firstName, String middleName, String lastName) {
952
953 return getPortal().getFullName(firstName, middleName, lastName);
954 }
955
956 public static String getGlobalLibDir() {
957 return getPortal().getGlobalLibDir();
958 }
959
960 public static String getGoogleGadgetURL(
961 Portlet portlet, ThemeDisplay themeDisplay)
962 throws PortalException {
963
964 return getPortal().getGoogleGadgetURL(portlet, themeDisplay);
965 }
966
967 public static String getGroupFriendlyURL(
968 LayoutSet layoutSet, ThemeDisplay themeDisplay)
969 throws PortalException {
970
971 return getPortal().getGroupFriendlyURL(layoutSet, themeDisplay);
972 }
973
974 public static String getGroupFriendlyURL(
975 LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale)
976 throws PortalException {
977
978 return getPortal().getGroupFriendlyURL(layoutSet, themeDisplay, locale);
979 }
980
981 public static int[] getGroupFriendlyURLIndex(String requestURI) {
982 return getPortal().getGroupFriendlyURLIndex(requestURI);
983 }
984
985 public static String[] getGroupPermissions(HttpServletRequest request) {
986 return getPortal().getGroupPermissions(request);
987 }
988
989 public static String[] getGroupPermissions(
990 HttpServletRequest request, String className) {
991
992 return getPortal().getGroupPermissions(request, className);
993 }
994
995 public static String[] getGroupPermissions(PortletRequest portletRequest) {
996 return getPortal().getGroupPermissions(portletRequest);
997 }
998
999 public static String[] getGroupPermissions(
1000 PortletRequest portletRequest, String className) {
1001
1002 return getPortal().getGroupPermissions(portletRequest, className);
1003 }
1004
1005 public static String[] getGuestPermissions(HttpServletRequest request) {
1006 return getPortal().getGuestPermissions(request);
1007 }
1008
1009 public static String[] getGuestPermissions(
1010 HttpServletRequest request, String className) {
1011
1012 return getPortal().getGuestPermissions(request, className);
1013 }
1014
1015 public static String[] getGuestPermissions(PortletRequest portletRequest) {
1016 return getPortal().getGuestPermissions(portletRequest);
1017 }
1018
1019 public static String[] getGuestPermissions(
1020 PortletRequest portletRequest, String className) {
1021
1022 return getPortal().getGuestPermissions(portletRequest, className);
1023 }
1024
1025 public static String getHomeURL(HttpServletRequest request)
1026 throws PortalException {
1027
1028 return getPortal().getHomeURL(request);
1029 }
1030
1031 public static String getHost(HttpServletRequest request) {
1032 return getPortal().getHost(request);
1033 }
1034
1035 public static String getHost(PortletRequest portletRequest) {
1036 return getPortal().getHost(portletRequest);
1037 }
1038
1039 public static HttpServletRequest getHttpServletRequest(
1040 PortletRequest portletRequest) {
1041
1042 return getPortal().getHttpServletRequest(portletRequest);
1043 }
1044
1045 public static HttpServletResponse getHttpServletResponse(
1046 PortletResponse portletResponse) {
1047
1048 return getPortal().getHttpServletResponse(portletResponse);
1049 }
1050
1051 public static String getI18nPathLanguageId(
1052 Locale locale, String defaultI18nPathLanguageId) {
1053
1054 return getPortal().getI18nPathLanguageId(
1055 locale, defaultI18nPathLanguageId);
1056 }
1057
1058
1061 @Deprecated
1062 public static String getJournalArticleActualURL(
1063 long groupId, boolean privateLayout, String mainPath,
1064 String friendlyURL, Map<String, String[]> params,
1065 Map<String, Object> requestContext)
1066 throws PortalException {
1067
1068 return getPortal().getJournalArticleActualURL(
1069 groupId, privateLayout, mainPath, friendlyURL, params,
1070 requestContext);
1071 }
1072
1073
1076 @Deprecated
1077 public static Layout getJournalArticleLayout(
1078 long groupId, boolean privateLayout, String friendlyURL)
1079 throws PortalException {
1080
1081 return getPortal().getJournalArticleLayout(
1082 groupId, privateLayout, friendlyURL);
1083 }
1084
1085 public static String getJsSafePortletId(String portletId) {
1086 return getPortal().getJsSafePortletId(portletId);
1087 }
1088
1089 public static String getLayoutActualURL(Layout layout) {
1090 return getPortal().getLayoutActualURL(layout);
1091 }
1092
1093 public static String getLayoutActualURL(Layout layout, String mainPath) {
1094 return getPortal().getLayoutActualURL(layout, mainPath);
1095 }
1096
1097 public static String getLayoutActualURL(
1098 long groupId, boolean privateLayout, String mainPath,
1099 String friendlyURL)
1100 throws PortalException {
1101
1102 return getPortal().getLayoutActualURL(
1103 groupId, privateLayout, mainPath, friendlyURL);
1104 }
1105
1106 public static String getLayoutActualURL(
1107 long groupId, boolean privateLayout, String mainPath,
1108 String friendlyURL, Map<String, String[]> params,
1109 Map<String, Object> requestContext)
1110 throws PortalException {
1111
1112 return getPortal().getLayoutActualURL(
1113 groupId, privateLayout, mainPath, friendlyURL, params,
1114 requestContext);
1115 }
1116
1117 public static String getLayoutFriendlyURL(
1118 Layout layout, ThemeDisplay themeDisplay)
1119 throws PortalException {
1120
1121 return getPortal().getLayoutFriendlyURL(layout, themeDisplay);
1122 }
1123
1124 public static String getLayoutFriendlyURL(
1125 Layout layout, ThemeDisplay themeDisplay, Locale locale)
1126 throws PortalException {
1127
1128 return getPortal().getLayoutFriendlyURL(layout, themeDisplay, locale);
1129 }
1130
1131 public static LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(
1132 long groupId, boolean privateLayout, String friendlyURL,
1133 Map<String, String[]> params, Map<String, Object> requestContext)
1134 throws PortalException {
1135
1136 return getPortal().getLayoutFriendlyURLComposite(
1137 groupId, privateLayout, friendlyURL, params, requestContext);
1138 }
1139
1140 public static String getLayoutFullURL(
1141 Layout layout, ThemeDisplay themeDisplay)
1142 throws PortalException {
1143
1144 return getPortal().getLayoutFullURL(layout, themeDisplay);
1145 }
1146
1147 public static String getLayoutFullURL(
1148 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1149 throws PortalException {
1150
1151 return getPortal().getLayoutFullURL(layout, themeDisplay, doAsUser);
1152 }
1153
1154 public static String getLayoutFullURL(long groupId, String portletId)
1155 throws PortalException {
1156
1157 return getPortal().getLayoutFullURL(groupId, portletId);
1158 }
1159
1160 public static String getLayoutFullURL(
1161 long groupId, String portletId, boolean secure)
1162 throws PortalException {
1163
1164 return getPortal().getLayoutFullURL(groupId, portletId, secure);
1165 }
1166
1167 public static String getLayoutFullURL(ThemeDisplay themeDisplay)
1168 throws PortalException {
1169
1170 return getPortal().getLayoutFullURL(themeDisplay);
1171 }
1172
1173 public static String getLayoutRelativeURL(
1174 Layout layout, ThemeDisplay themeDisplay)
1175 throws PortalException {
1176
1177 return getPortal().getLayoutRelativeURL(layout, themeDisplay);
1178 }
1179
1180 public static String getLayoutRelativeURL(
1181 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1182 throws PortalException {
1183
1184 return getPortal().getLayoutRelativeURL(layout, themeDisplay, doAsUser);
1185 }
1186
1187 public static String getLayoutSetDisplayURL(
1188 LayoutSet layoutSet, boolean secureConnection)
1189 throws PortalException {
1190
1191 return getPortal().getLayoutSetDisplayURL(layoutSet, secureConnection);
1192 }
1193
1194 public static String getLayoutSetFriendlyURL(
1195 LayoutSet layoutSet, ThemeDisplay themeDisplay)
1196 throws PortalException {
1197
1198 return getPortal().getLayoutSetFriendlyURL(layoutSet, themeDisplay);
1199 }
1200
1201 public static String getLayoutTarget(Layout layout) {
1202 return getPortal().getLayoutTarget(layout);
1203 }
1204
1205 public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
1206 throws PortalException {
1207
1208 return getPortal().getLayoutURL(layout, themeDisplay);
1209 }
1210
1211 public static String getLayoutURL(
1212 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1213 throws PortalException {
1214
1215 return getPortal().getLayoutURL(layout, themeDisplay, doAsUser);
1216 }
1217
1218 public static String getLayoutURL(
1219 Layout layout, ThemeDisplay themeDisplay, Locale locale)
1220 throws PortalException {
1221
1222 return getPortal().getLayoutURL(layout, themeDisplay, locale);
1223 }
1224
1225 public static String getLayoutURL(ThemeDisplay themeDisplay)
1226 throws PortalException {
1227
1228 return getPortal().getLayoutURL(themeDisplay);
1229 }
1230
1231 public static LiferayPortletRequest getLiferayPortletRequest(
1232 PortletRequest portletRequest) {
1233
1234 return getPortal().getLiferayPortletRequest(portletRequest);
1235 }
1236
1237 public static LiferayPortletResponse getLiferayPortletResponse(
1238 PortletResponse portletResponse) {
1239
1240 return getPortal().getLiferayPortletResponse(portletResponse);
1241 }
1242
1243 public static Locale getLocale(HttpServletRequest request) {
1244 return getPortal().getLocale(request);
1245 }
1246
1247 public static Locale getLocale(
1248 HttpServletRequest request, HttpServletResponse response,
1249 boolean initialize) {
1250
1251 return getPortal().getLocale(request, response, initialize);
1252 }
1253
1254 public static Locale getLocale(PortletRequest portletRequest) {
1255 return getPortal().getLocale(portletRequest);
1256 }
1257
1258 public static String getLocalizedFriendlyURL(
1259 HttpServletRequest request, Layout layout, Locale locale,
1260 Locale originalLocale)
1261 throws Exception {
1262
1263 return getPortal().getLocalizedFriendlyURL(
1264 request, layout, locale, originalLocale);
1265 }
1266
1267 public static String getMailId(
1268 String mx, String popPortletPrefix, Object... ids) {
1269
1270 return getPortal().getMailId(mx, popPortletPrefix, ids);
1271 }
1272
1273
1277 @Deprecated
1278 public static BaseModel<?> getModel(ResourcePermission resourcePermission)
1279 throws PortalException {
1280
1281 return getPortal().getBaseModel(resourcePermission);
1282 }
1283
1284
1288 @Deprecated
1289 public static BaseModel<?> getModel(String modelName, String primKey)
1290 throws PortalException {
1291
1292 return getPortal().getBaseModel(modelName, primKey);
1293 }
1294
1295 public static String getNetvibesURL(
1296 Portlet portlet, ThemeDisplay themeDisplay)
1297 throws PortalException {
1298
1299 return getPortal().getNetvibesURL(portlet, themeDisplay);
1300 }
1301
1302 public static String getNewPortletTitle(
1303 String portletTitle, String oldScopeName, String newScopeName) {
1304
1305 return getPortal().getNewPortletTitle(
1306 portletTitle, oldScopeName, newScopeName);
1307 }
1308
1309 public static HttpServletRequest getOriginalServletRequest(
1310 HttpServletRequest request) {
1311
1312 return getPortal().getOriginalServletRequest(request);
1313 }
1314
1315
1318 @Deprecated
1319 public static long getParentGroupId(long scopeGroupId) {
1320 return getPortal().getParentGroupId(scopeGroupId);
1321 }
1322
1323 public static String getPathContext() {
1324 return getPortal().getPathContext();
1325 }
1326
1327 public static String getPathContext(HttpServletRequest request) {
1328 return getPortal().getPathContext(request);
1329 }
1330
1331 public static String getPathContext(PortletRequest portletRequest) {
1332 return getPortal().getPathContext(portletRequest);
1333 }
1334
1335 public static String getPathContext(String contextPath) {
1336 return getPortal().getPathContext(contextPath);
1337 }
1338
1339 public static String getPathFriendlyURLPrivateGroup() {
1340 return getPortal().getPathFriendlyURLPrivateGroup();
1341 }
1342
1343 public static String getPathFriendlyURLPrivateUser() {
1344 return getPortal().getPathFriendlyURLPrivateUser();
1345 }
1346
1347 public static String getPathFriendlyURLPublic() {
1348 return getPortal().getPathFriendlyURLPublic();
1349 }
1350
1351 public static String getPathImage() {
1352 return getPortal().getPathImage();
1353 }
1354
1355 public static String getPathMain() {
1356 return getPortal().getPathMain();
1357 }
1358
1359 public static String getPathModule() {
1360 return getPortal().getPathModule();
1361 }
1362
1363 public static String getPathProxy() {
1364 return getPortal().getPathProxy();
1365 }
1366
1367 public static long getPlidFromFriendlyURL(
1368 long companyId, String friendlyURL) {
1369
1370 return getPortal().getPlidFromFriendlyURL(companyId, friendlyURL);
1371 }
1372
1373 public static long getPlidFromPortletId(
1374 long groupId, boolean privateLayout, String portletId)
1375 throws PortalException {
1376
1377 return getPortal().getPlidFromPortletId(
1378 groupId, privateLayout, portletId);
1379 }
1380
1381 public static long getPlidFromPortletId(long groupId, String portletId)
1382 throws PortalException {
1383
1384 return getPortal().getPlidFromPortletId(groupId, portletId);
1385 }
1386
1387 public static Portal getPortal() {
1388 PortalRuntimePermission.checkGetBeanProperty(PortalUtil.class);
1389
1390 return _portal;
1391 }
1392
1393 public static PortalInetSocketAddressEventListener[]
1394 getPortalInetSocketAddressEventListeners() {
1395
1396 return getPortal().getPortalInetSocketAddressEventListeners();
1397 }
1398
1399 public static String getPortalLibDir() {
1400 return getPortal().getPortalLibDir();
1401 }
1402
1403 public static InetAddress getPortalLocalInetAddress(boolean secure) {
1404 return getPortal().getPortalLocalInetAddress(secure);
1405 }
1406
1407 public static int getPortalLocalPort(boolean secure) {
1408 return getPortal().getPortalLocalPort(secure);
1409 }
1410
1411
1414 @Deprecated
1415 public static int getPortalPort() {
1416 return getPortal().getPortalPort();
1417 }
1418
1419
1423 @Deprecated
1424 public static int getPortalPort(boolean secure) {
1425 return getPortal().getPortalPort(secure);
1426 }
1427
1428 public static Properties getPortalProperties() {
1429 return getPortal().getPortalProperties();
1430 }
1431
1432 public static InetAddress getPortalServerInetAddress(boolean secure) {
1433 return getPortal().getPortalServerInetAddress(secure);
1434 }
1435
1436 public static int getPortalServerPort(boolean secure) {
1437 return getPortal().getPortalServerPort(secure);
1438 }
1439
1440 public static String getPortalURL(HttpServletRequest request) {
1441 return getPortal().getPortalURL(request);
1442 }
1443
1444 public static String getPortalURL(
1445 HttpServletRequest request, boolean secure) {
1446
1447 return getPortal().getPortalURL(request, secure);
1448 }
1449
1450 public static String getPortalURL(Layout layout, ThemeDisplay themeDisplay)
1451 throws PortalException {
1452
1453 return getPortal().getPortalURL(layout, themeDisplay);
1454 }
1455
1456 public static String getPortalURL(PortletRequest portletRequest) {
1457 return getPortal().getPortalURL(portletRequest);
1458 }
1459
1460 public static String getPortalURL(
1461 PortletRequest portletRequest, boolean secure) {
1462
1463 return getPortal().getPortalURL(portletRequest, secure);
1464 }
1465
1466 public static String getPortalURL(
1467 String serverName, int serverPort, boolean secure) {
1468
1469 return getPortal().getPortalURL(serverName, serverPort, secure);
1470 }
1471
1472 public static String getPortalURL(ThemeDisplay themeDisplay)
1473 throws PortalException {
1474
1475 return getPortal().getPortalURL(themeDisplay);
1476 }
1477
1478 public static String getPortalWebDir() {
1479 return getPortal().getPortalWebDir();
1480 }
1481
1482
1486 @Deprecated
1487 public static Set<String> getPortletAddDefaultResourceCheckWhitelist() {
1488 return getPortal().getPortletAddDefaultResourceCheckWhitelist();
1489 }
1490
1491
1495 @Deprecated
1496 public static Set<String>
1497 getPortletAddDefaultResourceCheckWhitelistActions() {
1498
1499 return getPortal().getPortletAddDefaultResourceCheckWhitelistActions();
1500 }
1501
1502
1506 @Deprecated
1507 public static List<BreadcrumbEntry> getPortletBreadcrumbList(
1508 HttpServletRequest request) {
1509
1510 return getPortal().getPortletBreadcrumbList(request);
1511 }
1512
1513
1518 @Deprecated
1519 public static List<BreadcrumbEntry> getPortletBreadcrumbs(
1520 HttpServletRequest request) {
1521
1522 return getPortal().getPortletBreadcrumbs(request);
1523 }
1524
1525 public static PortletConfig getPortletConfig(
1526 long companyId, String portletId, ServletContext servletContext)
1527 throws PortletException {
1528
1529 Portlet portlet = PortletLocalServiceUtil.getPortletById(
1530 companyId, portletId);
1531
1532 InvokerPortlet invokerPortlet = PortletInstanceFactoryUtil.create(
1533 portlet, servletContext);
1534
1535 return invokerPortlet.getPortletConfig();
1536 }
1537
1538 public static String getPortletDescription(
1539 Portlet portlet, ServletContext servletContext, Locale locale) {
1540
1541 return getPortal().getPortletDescription(
1542 portlet, servletContext, locale);
1543 }
1544
1545 public static String getPortletDescription(Portlet portlet, User user) {
1546 return getPortal().getPortletDescription(portlet, user);
1547 }
1548
1549 public static String getPortletDescription(
1550 String portletId, Locale locale) {
1551
1552 return getPortal().getPortletDescription(portletId, locale);
1553 }
1554
1555 public static String getPortletDescription(
1556 String portletId, String languageId) {
1557
1558 return getPortal().getPortletDescription(portletId, languageId);
1559 }
1560
1561 public static String getPortletDescription(String portletId, User user) {
1562 return getPortal().getPortletDescription(portletId, user);
1563 }
1564
1565 public static String getPortletId(HttpServletRequest request) {
1566 return getPortal().getPortletId(request);
1567 }
1568
1569 public static String getPortletId(PortletRequest portletRequest) {
1570 return getPortal().getPortletId(portletRequest);
1571 }
1572
1573 public static String getPortletLongTitle(Portlet portlet, Locale locale) {
1574 return getPortal().getPortletLongTitle(portlet, locale);
1575 }
1576
1577 public static String getPortletLongTitle(
1578 Portlet portlet, ServletContext servletContext, Locale locale) {
1579
1580 return getPortal().getPortletLongTitle(portlet, servletContext, locale);
1581 }
1582
1583 public static String getPortletLongTitle(
1584 Portlet portlet, String languageId) {
1585
1586 return getPortal().getPortletLongTitle(portlet, languageId);
1587 }
1588
1589 public static String getPortletLongTitle(Portlet portlet, User user) {
1590 return getPortal().getPortletLongTitle(portlet, user);
1591 }
1592
1593 public static String getPortletLongTitle(String portletId, Locale locale) {
1594 return getPortal().getPortletLongTitle(portletId, locale);
1595 }
1596
1597 public static String getPortletLongTitle(
1598 String portletId, String languageId) {
1599
1600 return getPortal().getPortletLongTitle(portletId, languageId);
1601 }
1602
1603 public static String getPortletLongTitle(String portletId, User user) {
1604 return getPortal().getPortletLongTitle(portletId, user);
1605 }
1606
1607 public static String getPortletNamespace(String portletId) {
1608 return getPortal().getPortletNamespace(portletId);
1609 }
1610
1611 public static String getPortletTitle(Portlet portlet, Locale locale) {
1612 return getPortal().getPortletTitle(portlet, locale);
1613 }
1614
1615 public static String getPortletTitle(
1616 Portlet portlet, ServletContext servletContext, Locale locale) {
1617
1618 return getPortal().getPortletTitle(portlet, servletContext, locale);
1619 }
1620
1621 public static String getPortletTitle(Portlet portlet, String languageId) {
1622 return getPortal().getPortletTitle(portlet, languageId);
1623 }
1624
1625 public static String getPortletTitle(Portlet portlet, User user) {
1626 return getPortal().getPortletTitle(portlet, user);
1627 }
1628
1629 public static String getPortletTitle(PortletRequest portletRequest) {
1630 return getPortal().getPortletTitle(portletRequest);
1631 }
1632
1633 public static String getPortletTitle(PortletResponse portletResponse) {
1634 return getPortal().getPortletTitle(portletResponse);
1635 }
1636
1637 public static String getPortletTitle(String portletId, Locale locale) {
1638 return getPortal().getPortletTitle(portletId, locale);
1639 }
1640
1641 public static String getPortletTitle(
1642 String portletId, ResourceBundle resourceBundle) {
1643
1644 return getPortal().getPortletTitle(portletId, resourceBundle);
1645 }
1646
1647 public static String getPortletTitle(String portletId, String languageId) {
1648 return getPortal().getPortletTitle(portletId, languageId);
1649 }
1650
1651 public static String getPortletTitle(String portletId, User user) {
1652 return getPortal().getPortletTitle(portletId, user);
1653 }
1654
1655 public static String getPortletXmlFileName() {
1656 return getPortal().getPortletXmlFileName();
1657 }
1658
1659 public static PortletPreferences getPreferences(
1660 HttpServletRequest request) {
1661
1662 return getPortal().getPreferences(request);
1663 }
1664
1665 public static PreferencesValidator getPreferencesValidator(
1666 Portlet portlet) {
1667
1668 return getPortal().getPreferencesValidator(portlet);
1669 }
1670
1671 public static String getRelativeHomeURL(HttpServletRequest request)
1672 throws PortalException {
1673
1674 return getPortal().getRelativeHomeURL(request);
1675 }
1676
1677 public static ResourceBundle getResourceBundle(Locale locale) {
1678 return getPortal().getResourceBundle(locale);
1679 }
1680
1681 public static long getScopeGroupId(HttpServletRequest request)
1682 throws PortalException {
1683
1684 return getPortal().getScopeGroupId(request);
1685 }
1686
1687 public static long getScopeGroupId(
1688 HttpServletRequest request, String portletId)
1689 throws PortalException {
1690
1691 return getPortal().getScopeGroupId(request, portletId);
1692 }
1693
1694 public static long getScopeGroupId(
1695 HttpServletRequest request, String portletId,
1696 boolean checkStagingGroup)
1697 throws PortalException {
1698
1699 return getPortal().getScopeGroupId(
1700 request, portletId, checkStagingGroup);
1701 }
1702
1703 public static long getScopeGroupId(Layout layout) {
1704 return getPortal().getScopeGroupId(layout);
1705 }
1706
1707 public static long getScopeGroupId(Layout layout, String portletId) {
1708 return getPortal().getScopeGroupId(layout, portletId);
1709 }
1710
1711 public static long getScopeGroupId(long plid) {
1712 return getPortal().getScopeGroupId(plid);
1713 }
1714
1715 public static long getScopeGroupId(PortletRequest portletRequest)
1716 throws PortalException {
1717
1718 return getPortal().getScopeGroupId(portletRequest);
1719 }
1720
1721 public static User getSelectedUser(HttpServletRequest request)
1722 throws PortalException {
1723
1724 return getPortal().getSelectedUser(request);
1725 }
1726
1727 public static User getSelectedUser(
1728 HttpServletRequest request, boolean checkPermission)
1729 throws PortalException {
1730
1731 return getPortal().getSelectedUser(request, checkPermission);
1732 }
1733
1734 public static User getSelectedUser(PortletRequest portletRequest)
1735 throws PortalException {
1736
1737 return getPortal().getSelectedUser(portletRequest);
1738 }
1739
1740 public static User getSelectedUser(
1741 PortletRequest portletRequest, boolean checkPermission)
1742 throws PortalException {
1743
1744 return getPortal().getSelectedUser(portletRequest, checkPermission);
1745 }
1746
1747 public static String getServletContextName() {
1748 return getPortal().getServletContextName();
1749 }
1750
1751 public static long[] getSharedContentSiteGroupIds(
1752 long companyId, long groupId, long userId)
1753 throws PortalException {
1754
1755 return getPortal().getSharedContentSiteGroupIds(
1756 companyId, groupId, userId);
1757 }
1758
1759
1764 @Deprecated
1765 public static PortletURL getSiteAdministrationURL(
1766 HttpServletRequest request, ThemeDisplay themeDisplay,
1767 String portletId) {
1768
1769 return getPortal().getSiteAdministrationURL(
1770 request, themeDisplay, portletId);
1771 }
1772
1773
1778 @Deprecated
1779 public static PortletURL getSiteAdministrationURL(
1780 PortletResponse portletResponse, ThemeDisplay themeDisplay,
1781 String portletName) {
1782
1783 return getPortal().getSiteAdministrationURL(
1784 portletResponse, themeDisplay, portletName);
1785 }
1786
1787
1791 @Deprecated
1792 public static long[] getSiteAndCompanyGroupIds(long groupId)
1793 throws PortalException {
1794
1795 return getPortal().getSiteAndCompanyGroupIds(groupId);
1796 }
1797
1798
1802 @Deprecated
1803 public static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
1804 throws PortalException {
1805
1806 return getPortal().getSiteAndCompanyGroupIds(themeDisplay);
1807 }
1808
1809 public static Locale getSiteDefaultLocale(long groupId)
1810 throws PortalException {
1811
1812 return getPortal().getSiteDefaultLocale(groupId);
1813 }
1814
1815 public static long getSiteGroupId(long scopeGroupId) {
1816 return getPortal().getSiteGroupId(scopeGroupId);
1817 }
1818
1819 public static String getSiteLoginURL(ThemeDisplay themeDisplay)
1820 throws PortalException {
1821
1822 return getPortal().getSiteLoginURL(themeDisplay);
1823 }
1824
1825 public static String getStaticResourceURL(
1826 HttpServletRequest request, String uri) {
1827
1828 return getPortal().getStaticResourceURL(request, uri);
1829 }
1830
1831 public static String getStaticResourceURL(
1832 HttpServletRequest request, String uri, long timestamp) {
1833
1834 return getPortal().getStaticResourceURL(request, uri, timestamp);
1835 }
1836
1837 public static String getStaticResourceURL(
1838 HttpServletRequest request, String uri, String queryString) {
1839
1840 return getPortal().getStaticResourceURL(request, uri, queryString);
1841 }
1842
1843 public static String getStaticResourceURL(
1844 HttpServletRequest request, String uri, String queryString,
1845 long timestamp) {
1846
1847 return getPortal().getStaticResourceURL(
1848 request, uri, queryString, timestamp);
1849 }
1850
1851 public static String getStrutsAction(HttpServletRequest request) {
1852 return getPortal().getStrutsAction(request);
1853 }
1854
1855 public static String[] getSystemGroups() {
1856 return getPortal().getSystemGroups();
1857 }
1858
1859 public static String[] getSystemOrganizationRoles() {
1860 return getPortal().getSystemOrganizationRoles();
1861 }
1862
1863 public static String[] getSystemRoles() {
1864 return getPortal().getSystemRoles();
1865 }
1866
1867 public static String[] getSystemSiteRoles() {
1868 return getPortal().getSystemSiteRoles();
1869 }
1870
1871 public static String getUniqueElementId(
1872 HttpServletRequest request, String namespace, String id) {
1873
1874 return getPortal().getUniqueElementId(request, namespace, id);
1875 }
1876
1877 public static String getUniqueElementId(
1878 PortletRequest request, String namespace, String id) {
1879
1880 return getPortal().getUniqueElementId(request, namespace, id);
1881 }
1882
1883 public static UploadPortletRequest getUploadPortletRequest(
1884 PortletRequest portletRequest) {
1885
1886 return getPortal().getUploadPortletRequest(portletRequest);
1887 }
1888
1889 public static UploadServletRequest getUploadServletRequest(
1890 HttpServletRequest request) {
1891
1892 return getPortal().getUploadServletRequest(request);
1893 }
1894
1895 public static Date getUptime() {
1896 return getPortal().getUptime();
1897 }
1898
1899 public static String getURLWithSessionId(String url, String sessionId) {
1900 return getPortal().getURLWithSessionId(url, sessionId);
1901 }
1902
1903 public static User getUser(HttpServletRequest request)
1904 throws PortalException {
1905
1906 return getPortal().getUser(request);
1907 }
1908
1909 public static User getUser(PortletRequest portletRequest)
1910 throws PortalException {
1911
1912 return getPortal().getUser(portletRequest);
1913 }
1914
1915 public static String getUserEmailAddress(long userId) {
1916 return getPortal().getUserEmailAddress(userId);
1917 }
1918
1919 public static long getUserId(HttpServletRequest request) {
1920 return getPortal().getUserId(request);
1921 }
1922
1923 public static long getUserId(PortletRequest portletRequest) {
1924 return getPortal().getUserId(portletRequest);
1925 }
1926
1927 public static String getUserName(BaseModel<?> baseModel) {
1928 return getPortal().getUserName(baseModel);
1929 }
1930
1931 public static String getUserName(long userId, String defaultUserName) {
1932 return getPortal().getUserName(userId, defaultUserName);
1933 }
1934
1935 public static String getUserName(
1936 long userId, String defaultUserName, HttpServletRequest request) {
1937
1938 return getPortal().getUserName(userId, defaultUserName, request);
1939 }
1940
1941 public static String getUserName(
1942 long userId, String defaultUserName, String userAttribute) {
1943
1944 return getPortal().getUserName(userId, defaultUserName, userAttribute);
1945 }
1946
1947 public static String getUserName(
1948 long userId, String defaultUserName, String userAttribute,
1949 HttpServletRequest request) {
1950
1951 return getPortal().getUserName(
1952 userId, defaultUserName, userAttribute, request);
1953 }
1954
1955 public static String getUserPassword(HttpServletRequest request) {
1956 return getPortal().getUserPassword(request);
1957 }
1958
1959 public static String getUserPassword(HttpSession session) {
1960 return getPortal().getUserPassword(session);
1961 }
1962
1963 public static String getUserPassword(PortletRequest portletRequest) {
1964 return getPortal().getUserPassword(portletRequest);
1965 }
1966
1967
1970 @Deprecated
1971 public static String getUserValue(
1972 long userId, String param, String defaultValue) {
1973
1974 return getPortal().getUserValue(userId, param, defaultValue);
1975 }
1976
1977 public static String getValidPortalDomain(long companyId, String domain) {
1978 return getPortal().getValidPortalDomain(companyId, domain);
1979 }
1980
1981 public static long getValidUserId(long companyId, long userId)
1982 throws PortalException {
1983
1984 return getPortal().getValidUserId(companyId, userId);
1985 }
1986
1987 public static String getVirtualHostname(LayoutSet layoutSet) {
1988 return getPortal().getVirtualHostname(layoutSet);
1989 }
1990
1991
1994 @Deprecated
1995 public static String getVirtualLayoutActualURL(
1996 long groupId, boolean privateLayout, String mainPath,
1997 String friendlyURL, Map<String, String[]> params,
1998 Map<String, Object> requestContext)
1999 throws PortalException {
2000
2001 return getPortal().getVirtualLayoutActualURL(
2002 groupId, privateLayout, mainPath, friendlyURL, params,
2003 requestContext);
2004 }
2005
2006
2009 @Deprecated
2010 public static LayoutFriendlyURLComposite
2011 getVirtualLayoutFriendlyURLComposite(
2012 boolean privateLayout, String friendlyURL,
2013 Map<String, String[]> params, Map<String, Object> requestContext)
2014 throws PortalException {
2015
2016 return getPortal().getVirtualLayoutFriendlyURLComposite(
2017 privateLayout, friendlyURL, params, requestContext);
2018 }
2019
2020 public static String getWidgetURL(
2021 Portlet portlet, ThemeDisplay themeDisplay)
2022 throws PortalException {
2023
2024 return getPortal().getWidgetURL(portlet, themeDisplay);
2025 }
2026
2027 public static void initCustomSQL() {
2028 getPortal().initCustomSQL();
2029 }
2030
2031 public static User initUser(HttpServletRequest request) throws Exception {
2032 return getPortal().initUser(request);
2033 }
2034
2035
2038 @Deprecated
2039 public static void invokeTaglibDiscussion(
2040 PortletConfig portletConfig, ActionRequest actionRequest,
2041 ActionResponse actionResponse)
2042 throws Exception {
2043
2044 getPortal().invokeTaglibDiscussion(
2045 portletConfig, actionRequest, actionResponse);
2046 }
2047
2048
2051 @Deprecated
2052 public static void invokeTaglibDiscussionPagination(
2053 PortletConfig portletConfig, ResourceRequest resourceRequest,
2054 ResourceResponse resourceResponse)
2055 throws IOException, PortletException {
2056
2057 getPortal().invokeTaglibDiscussionPagination(
2058 portletConfig, resourceRequest, resourceResponse);
2059 }
2060
2061
2064 @Deprecated
2065 public static boolean isAllowAddPortletDefaultResource(
2066 HttpServletRequest request, Portlet portlet)
2067 throws PortalException {
2068
2069 return getPortal().isAllowAddPortletDefaultResource(request, portlet);
2070 }
2071
2072 public static boolean isCDNDynamicResourcesEnabled(
2073 HttpServletRequest request)
2074 throws PortalException {
2075
2076 return getPortal().isCDNDynamicResourcesEnabled(request);
2077 }
2078
2079 public static boolean isCDNDynamicResourcesEnabled(long companyId) {
2080 return getPortal().isCDNDynamicResourcesEnabled(companyId);
2081 }
2082
2083
2086 @Deprecated
2087 public static boolean isCommunityAdmin(User user, long groupId)
2088 throws Exception {
2089
2090 return getPortal().isCommunityAdmin(user, groupId);
2091 }
2092
2093
2096 @Deprecated
2097 public static boolean isCommunityOwner(User user, long groupId)
2098 throws Exception {
2099
2100 return getPortal().isCommunityOwner(user, groupId);
2101 }
2102
2103 public static boolean isCompanyAdmin(User user) throws Exception {
2104 return getPortal().isCompanyAdmin(user);
2105 }
2106
2107 public static boolean isCompanyControlPanelPortlet(
2108 String portletId, String category, ThemeDisplay themeDisplay)
2109 throws PortalException {
2110
2111 return getPortal().isCompanyControlPanelPortlet(
2112 portletId, category, themeDisplay);
2113 }
2114
2115 public static boolean isCompanyControlPanelPortlet(
2116 String portletId, ThemeDisplay themeDisplay)
2117 throws PortalException {
2118
2119 return getPortal().isCompanyControlPanelPortlet(
2120 portletId, themeDisplay);
2121 }
2122
2123 public static boolean isControlPanelPortlet(
2124 String portletId, String category, ThemeDisplay themeDisplay) {
2125
2126 return getPortal().isControlPanelPortlet(
2127 portletId, category, themeDisplay);
2128 }
2129
2130 public static boolean isControlPanelPortlet(
2131 String portletId, ThemeDisplay themeDisplay) {
2132
2133 return getPortal().isControlPanelPortlet(portletId, themeDisplay);
2134 }
2135
2136 public static boolean isGroupAdmin(User user, long groupId)
2137 throws Exception {
2138
2139 return getPortal().isGroupAdmin(user, groupId);
2140 }
2141
2142 public static boolean isGroupFriendlyURL(
2143 String fullURL, String groupFriendlyURL, String layoutFriendlyURL) {
2144
2145 return getPortal().isGroupFriendlyURL(
2146 fullURL, groupFriendlyURL, layoutFriendlyURL);
2147 }
2148
2149 public static boolean isGroupOwner(User user, long groupId)
2150 throws Exception {
2151
2152 return getPortal().isGroupOwner(user, groupId);
2153 }
2154
2155 public static boolean isLayoutDescendant(Layout layout, long layoutId)
2156 throws PortalException {
2157
2158 return getPortal().isLayoutDescendant(layout, layoutId);
2159 }
2160
2161 public static boolean isLayoutSitemapable(Layout layout) {
2162 return getPortal().isLayoutSitemapable(layout);
2163 }
2164
2165 public static boolean isLoginRedirectRequired(HttpServletRequest request) {
2166 return getPortal().isLoginRedirectRequired(request);
2167 }
2168
2169 public static boolean isMethodGet(PortletRequest portletRequest) {
2170 return getPortal().isMethodGet(portletRequest);
2171 }
2172
2173 public static boolean isMethodPost(PortletRequest portletRequest) {
2174 return getPortal().isMethodPost(portletRequest);
2175 }
2176
2177 public static boolean isMultipartRequest(HttpServletRequest request) {
2178 return getPortal().isMultipartRequest(request);
2179 }
2180
2181 public static boolean isOmniadmin(long userId) {
2182 return getPortal().isOmniadmin(userId);
2183 }
2184
2185 public static boolean isOmniadmin(User user) {
2186 return getPortal().isOmniadmin(user);
2187 }
2188
2189 public static boolean isReservedParameter(String name) {
2190 return getPortal().isReservedParameter(name);
2191 }
2192
2193 public static boolean isRightToLeft(HttpServletRequest request) {
2194 return getPortal().isRightToLeft(request);
2195 }
2196
2197 public static boolean isRSSFeedsEnabled() {
2198 return getPortal().isRSSFeedsEnabled();
2199 }
2200
2201 public static boolean isSecure(HttpServletRequest request) {
2202 return getPortal().isSecure(request);
2203 }
2204
2205 public static boolean isSystemGroup(String groupName) {
2206 return getPortal().isSystemGroup(groupName);
2207 }
2208
2209 public static boolean isSystemRole(String roleName) {
2210 return getPortal().isSystemRole(roleName);
2211 }
2212
2213 public static boolean isUpdateAvailable() {
2214 return getPortal().isUpdateAvailable();
2215 }
2216
2217 public static boolean isValidResourceId(String resourceId) {
2218 return getPortal().isValidResourceId(resourceId);
2219 }
2220
2221 public static boolean removePortalEventListener(
2222 PortalInetSocketAddressEventListener
2223 portalInetSocketAddressEventListener) {
2224
2225 return getPortal().removePortalInetSocketAddressEventListener(
2226 portalInetSocketAddressEventListener);
2227 }
2228
2229 public static void resetCDNHosts() {
2230 getPortal().resetCDNHosts();
2231 }
2232
2233
2237 @Deprecated
2238 public static Set<String> resetPortletAddDefaultResourceCheckWhitelist() {
2239 return getPortal().resetPortletAddDefaultResourceCheckWhitelist();
2240 }
2241
2242
2246 @Deprecated
2247 public static Set<String>
2248 resetPortletAddDefaultResourceCheckWhitelistActions() {
2249
2250 return getPortal().
2251 resetPortletAddDefaultResourceCheckWhitelistActions();
2252 }
2253
2254 public static String resetPortletParameters(String url, String portletId) {
2255 return getPortal().resetPortletParameters(url, portletId);
2256 }
2257
2258
2261 @Deprecated
2262 public static void runSQL(String sql) throws IOException, SQLException {
2263 DBManagerUtil.getDB().runSQL(sql);
2264 }
2265
2266 public static void sendError(
2267 Exception e, ActionRequest actionRequest,
2268 ActionResponse actionResponse)
2269 throws IOException {
2270
2271 getPortal().sendError(e, actionRequest, actionResponse);
2272 }
2273
2274 public static void sendError(
2275 Exception e, HttpServletRequest request,
2276 HttpServletResponse response)
2277 throws IOException, ServletException {
2278
2279 getPortal().sendError(e, request, response);
2280 }
2281
2282 public static void sendError(
2283 int status, Exception e, ActionRequest actionRequest,
2284 ActionResponse actionResponse)
2285 throws IOException {
2286
2287 getPortal().sendError(status, e, actionRequest, actionResponse);
2288 }
2289
2290 public static void sendError(
2291 int status, Exception e, HttpServletRequest request,
2292 HttpServletResponse response)
2293 throws IOException, ServletException {
2294
2295 getPortal().sendError(status, e, request, response);
2296 }
2297
2298 public static void sendRSSFeedsDisabledError(
2299 HttpServletRequest request, HttpServletResponse response)
2300 throws IOException, ServletException {
2301
2302 getPortal().sendRSSFeedsDisabledError(request, response);
2303 }
2304
2305 public static void sendRSSFeedsDisabledError(
2306 PortletRequest portletRequest, PortletResponse portletResponse)
2307 throws IOException, ServletException {
2308
2309 getPortal().sendRSSFeedsDisabledError(portletRequest, portletResponse);
2310 }
2311
2312
2316 public static void setPageDescription(
2317 String description, HttpServletRequest request) {
2318
2319 getPortal().setPageDescription(description, request);
2320 }
2321
2322
2325 public static void setPageKeywords(
2326 String keywords, HttpServletRequest request) {
2327
2328 getPortal().setPageKeywords(keywords, request);
2329 }
2330
2331
2334 public static void setPageSubtitle(
2335 String subtitle, HttpServletRequest request) {
2336
2337 getPortal().setPageSubtitle(subtitle, request);
2338 }
2339
2340
2344 public static void setPageTitle(String title, HttpServletRequest request) {
2345 getPortal().setPageTitle(title, request);
2346 }
2347
2348 public static void setPortalInetSocketAddresses(
2349 HttpServletRequest request) {
2350
2351 getPortal().setPortalInetSocketAddresses(request);
2352 }
2353
2354
2360 @Deprecated
2361 public static void setPortalPort(HttpServletRequest request) {
2362 getPortal().setPortalPort(request);
2363 }
2364
2365 public static void storePreferences(PortletPreferences portletPreferences)
2366 throws IOException, ValidatorException {
2367
2368 getPortal().storePreferences(portletPreferences);
2369 }
2370
2371 public static String[] stripURLAnchor(String url, String separator) {
2372 return getPortal().stripURLAnchor(url, separator);
2373 }
2374
2375 public static String transformCustomSQL(String sql) {
2376 return getPortal().transformCustomSQL(sql);
2377 }
2378
2379 public static String transformSQL(String sql) {
2380 return getPortal().transformSQL(sql);
2381 }
2382
2383 public static void updateImageId(
2384 BaseModel<?> baseModel, boolean hasImage, byte[] bytes,
2385 String fieldName, long maxSize, int maxHeight, int maxWidth)
2386 throws PortalException {
2387
2388 getPortal().updateImageId(
2389 baseModel, hasImage, bytes, fieldName, maxSize, maxHeight,
2390 maxWidth);
2391 }
2392
2393 public static PortletMode updatePortletMode(
2394 String portletId, User user, Layout layout, PortletMode portletMode,
2395 HttpServletRequest request)
2396 throws PortalException {
2397
2398 return getPortal().updatePortletMode(
2399 portletId, user, layout, portletMode, request);
2400 }
2401
2402 public static String updateRedirect(
2403 String redirect, String oldPath, String newPath) {
2404
2405 return getPortal().updateRedirect(redirect, oldPath, newPath);
2406 }
2407
2408 public static WindowState updateWindowState(
2409 String portletId, User user, Layout layout, WindowState windowState,
2410 HttpServletRequest request) {
2411
2412 return getPortal().updateWindowState(
2413 portletId, user, layout, windowState, request);
2414 }
2415
2416
2421 @Deprecated
2422 public void removePortalPortEventListener(
2423 PortalPortEventListener portalPortEventListener) {
2424
2425 getPortal().removePortalPortEventListener(portalPortEventListener);
2426 }
2427
2428 public void setPortal(Portal portal) {
2429 PortalRuntimePermission.checkSetBeanProperty(getClass());
2430
2431 _portal = portal;
2432 }
2433
2434 private static Portal _portal;
2435
2436 }