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.DBFactoryUtil;
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
200 public static void addPortletDefaultResource(
201 HttpServletRequest request, Portlet portlet)
202 throws PortalException {
203
204 getPortal().addPortletDefaultResource(request, portlet);
205 }
206
207 public static void addPortletDefaultResource(
208 long companyId, Layout layout, Portlet portlet)
209 throws PortalException {
210
211 getPortal().addPortletDefaultResource(companyId, layout, portlet);
212 }
213
214
231 public static String addPreservedParameters(
232 ThemeDisplay themeDisplay, Layout layout, String url,
233 boolean doAsUser) {
234
235 return getPortal().addPreservedParameters(
236 themeDisplay, layout, url, doAsUser);
237 }
238
239
247 public static String addPreservedParameters(
248 ThemeDisplay themeDisplay, String url) {
249
250 return getPortal().addPreservedParameters(themeDisplay, url);
251 }
252
253 public static void addUserLocaleOptionsMessage(HttpServletRequest request) {
254 getPortal().addUserLocaleOptionsMessage(request);
255 }
256
257
263 public static void clearRequestParameters(RenderRequest renderRequest) {
264 getPortal().clearRequestParameters(renderRequest);
265 }
266
267
274 public static void copyRequestParameters(
275 ActionRequest actionRequest, ActionResponse actionResponse) {
276
277 getPortal().copyRequestParameters(actionRequest, actionResponse);
278 }
279
280
288 public static String escapeRedirect(String url) {
289 return getPortal().escapeRedirect(url);
290 }
291
292
299 public static String generateRandomKey(
300 HttpServletRequest request, String input) {
301
302 return getPortal().generateRandomKey(request, input);
303 }
304
305 public static String getAbsoluteURL(
306 HttpServletRequest request, String url) {
307
308 return getPortal().getAbsoluteURL(request, url);
309 }
310
311 public static LayoutQueryStringComposite
312 getActualLayoutQueryStringComposite(
313 long groupId, boolean privateLayout, String friendlyURL,
314 Map<String, String[]> params, Map<String, Object> requestContext)
315 throws PortalException {
316
317 return getPortal().getActualLayoutQueryStringComposite(
318 groupId, privateLayout, friendlyURL, params, requestContext);
319 }
320
321 public static String getActualURL(
322 long groupId, boolean privateLayout, String mainPath,
323 String friendlyURL, Map<String, String[]> params,
324 Map<String, Object> requestContext)
325 throws PortalException {
326
327 return getPortal().getActualURL(
328 groupId, privateLayout, mainPath, friendlyURL, params,
329 requestContext);
330 }
331
332
351 public static String getAlternateURL(
352 String canonicalURL, ThemeDisplay themeDisplay, Locale locale,
353 Layout layout)
354 throws PortalException {
355
356 return getPortal().getAlternateURL(
357 canonicalURL, themeDisplay, locale, layout);
358 }
359
360 public static long[] getAncestorSiteGroupIds(long groupId)
361 throws PortalException {
362
363 return getPortal().getAncestorSiteGroupIds(groupId);
364 }
365
366
370 @Deprecated
371 public static Set<String> getAuthTokenIgnoreActions() {
372 return getPortal().getAuthTokenIgnoreActions();
373 }
374
375
379 @Deprecated
380 public static Set<String> getAuthTokenIgnorePortlets() {
381 return getPortal().getAuthTokenIgnorePortlets();
382 }
383
384
394 public static BaseModel<?> getBaseModel(
395 ResourcePermission resourcePermission)
396 throws PortalException {
397
398 return getPortal().getBaseModel(resourcePermission);
399 }
400
401
411 public static BaseModel<?> getBaseModel(String modelName, String primKey)
412 throws PortalException {
413
414 return getPortal().getBaseModel(modelName, primKey);
415 }
416
417
427 public static long getBasicAuthUserId(HttpServletRequest request)
428 throws PortalException {
429
430 return getPortal().getBasicAuthUserId(request);
431 }
432
433
444 public static long getBasicAuthUserId(
445 HttpServletRequest request, long companyId)
446 throws PortalException {
447
448 return getPortal().getBasicAuthUserId(request, companyId);
449 }
450
451 public static List<Group> getBrowsableScopeGroups(
452 long userId, long companyId, long groupId, String portletId)
453 throws PortalException {
454
455 return getPortal().getBrowsableScopeGroups(
456 userId, companyId, groupId, portletId);
457 }
458
459
482 public static String getCanonicalURL(
483 String completeURL, ThemeDisplay themeDisplay, Layout layout)
484 throws PortalException {
485
486 return getPortal().getCanonicalURL(completeURL, themeDisplay, layout);
487 }
488
489
515 public static String getCanonicalURL(
516 String completeURL, ThemeDisplay themeDisplay, Layout layout,
517 boolean forceLayoutFriendlyURL)
518 throws PortalException {
519
520 return getPortal().getCanonicalURL(
521 completeURL, themeDisplay, layout, forceLayoutFriendlyURL);
522 }
523
524
527 @Deprecated
528 public static String getCDNHost() {
529 return getPortal().getCDNHost();
530 }
531
532
539 public static String getCDNHost(boolean secure) {
540 return getPortal().getCDNHost(secure);
541 }
542
543 public static String getCDNHost(HttpServletRequest request)
544 throws PortalException {
545
546 return getPortal().getCDNHost(request);
547 }
548
549
556 public static String getCDNHostHttp(long companyId) {
557 return getPortal().getCDNHostHttp(companyId);
558 }
559
560
567 public static String getCDNHostHttps(long companyId) {
568 return getPortal().getCDNHostHttps(companyId);
569 }
570
571
577 public static String getClassName(long classNameId) {
578 return getPortal().getClassName(classNameId);
579 }
580
581
587 public static long getClassNameId(Class<?> clazz) {
588 return getPortal().getClassNameId(clazz);
589 }
590
591
597 public static long getClassNameId(String value) {
598 return getPortal().getClassNameId(value);
599 }
600
601 public static Company getCompany(HttpServletRequest request)
602 throws PortalException {
603
604 return getPortal().getCompany(request);
605 }
606
607 public static Company getCompany(PortletRequest portletRequest)
608 throws PortalException {
609
610 return getPortal().getCompany(portletRequest);
611 }
612
613 public static long getCompanyId(HttpServletRequest request) {
614 return getPortal().getCompanyId(request);
615 }
616
617 public static long getCompanyId(PortletRequest portletRequest) {
618 return getPortal().getCompanyId(portletRequest);
619 }
620
621 public static long[] getCompanyIds() {
622 return getPortal().getCompanyIds();
623 }
624
625 public static String getComputerAddress() {
626 return getPortal().getComputerAddress();
627 }
628
629 public static String getComputerName() {
630 return getPortal().getComputerName();
631 }
632
633 public static Map<String, List<Portlet>> getControlPanelCategoriesMap(
634 HttpServletRequest request) {
635
636 return getPortal().getControlPanelCategoriesMap(request);
637 }
638
639 public static String getControlPanelCategory(
640 String portletId, ThemeDisplay themeDisplay) {
641
642 return getPortal().getControlPanelCategory(portletId, themeDisplay);
643 }
644
645 public static String getControlPanelFullURL(
646 long scopeGroupId, String ppid, Map<String, String[]> params)
647 throws PortalException {
648
649 return getPortal().getControlPanelFullURL(scopeGroupId, ppid, params);
650 }
651
652 public static long getControlPanelPlid(long companyId)
653 throws PortalException {
654
655 return getPortal().getControlPanelPlid(companyId);
656 }
657
658 public static long getControlPanelPlid(PortletRequest portletRequest)
659 throws PortalException {
660
661 return getPortal().getControlPanelPlid(portletRequest);
662 }
663
664 public static Set<Portlet> getControlPanelPortlets(
665 long companyId, String category) {
666
667 return getPortal().getControlPanelPortlets(companyId, category);
668 }
669
670 public static List<Portlet> getControlPanelPortlets(
671 String category, ThemeDisplay themeDisplay) {
672
673 return getPortal().getControlPanelPortlets(category, themeDisplay);
674 }
675
676 public static PortletURL getControlPanelPortletURL(
677 HttpServletRequest request, String portletId, long referrerPlid,
678 String lifecycle) {
679
680 return getPortal().getControlPanelPortletURL(
681 request, portletId, referrerPlid, lifecycle);
682 }
683
684 public static PortletURL getControlPanelPortletURL(
685 PortletRequest portletRequest, String portletId, long referrerPlid,
686 String lifecycle) {
687
688 return getPortal().getControlPanelPortletURL(
689 portletRequest, portletId, referrerPlid, lifecycle);
690 }
691
692 public static String getCreateAccountURL(
693 HttpServletRequest request, ThemeDisplay themeDisplay)
694 throws Exception {
695
696 return getPortal().getCreateAccountURL(request, themeDisplay);
697 }
698
699 public static long[] getCurrentAndAncestorSiteGroupIds(long groupId)
700 throws PortalException {
701
702 return getPortal().getCurrentAndAncestorSiteGroupIds(groupId);
703 }
704
705 public static long[] getCurrentAndAncestorSiteGroupIds(
706 long groupId, boolean checkContentSharingWithChildrenEnabled)
707 throws PortalException {
708
709 return getPortal().getCurrentAndAncestorSiteGroupIds(
710 groupId, checkContentSharingWithChildrenEnabled);
711 }
712
713 public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds)
714 throws PortalException {
715
716 return getPortal().getCurrentAndAncestorSiteGroupIds(groupIds);
717 }
718
719 public static long[] getCurrentAndAncestorSiteGroupIds(
720 long[] groupIds, boolean checkContentSharingWithChildrenEnabled)
721 throws PortalException {
722
723 return getPortal().getCurrentAndAncestorSiteGroupIds(
724 groupIds, checkContentSharingWithChildrenEnabled);
725 }
726
727 public static List<Group> getCurrentAndAncestorSiteGroups(long groupId)
728 throws PortalException {
729
730 return getPortal().getCurrentAndAncestorSiteGroups(groupId);
731 }
732
733 public static List<Group> getCurrentAndAncestorSiteGroups(
734 long groupId, boolean checkContentSharingWithChildrenEnabled)
735 throws PortalException {
736
737 return getPortal().getCurrentAndAncestorSiteGroups(
738 groupId, checkContentSharingWithChildrenEnabled);
739 }
740
741 public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds)
742 throws PortalException {
743
744 return getPortal().getCurrentAndAncestorSiteGroups(groupIds);
745 }
746
747 public static List<Group> getCurrentAndAncestorSiteGroups(
748 long[] groupIds, boolean checkContentSharingWithChildrenEnabled)
749 throws PortalException {
750
751 return getPortal().getCurrentAndAncestorSiteGroups(
752 groupIds, checkContentSharingWithChildrenEnabled);
753 }
754
755 public static String getCurrentCompleteURL(HttpServletRequest request) {
756 return getPortal().getCurrentCompleteURL(request);
757 }
758
759 public static String getCurrentURL(HttpServletRequest request) {
760 return getPortal().getCurrentURL(request);
761 }
762
763 public static String getCurrentURL(PortletRequest portletRequest) {
764 return getPortal().getCurrentURL(portletRequest);
765 }
766
767 public static String getCustomSQLFunctionIsNotNull() {
768 return getPortal().getCustomSQLFunctionIsNotNull();
769 }
770
771 public static String getCustomSQLFunctionIsNull() {
772 return getPortal().getCustomSQLFunctionIsNull();
773 }
774
775
784 public static Date getDate(int month, int day, int year) {
785 return getPortal().getDate(month, day, year);
786 }
787
788
803 public static Date getDate(
804 int month, int day, int year,
805 Class<? extends PortalException> clazz)
806 throws PortalException {
807
808 return getPortal().getDate(month, day, year, clazz);
809 }
810
811
828 public static Date getDate(
829 int month, int day, int year, int hour, int min,
830 Class<? extends PortalException> clazz)
831 throws PortalException {
832
833 return getPortal().getDate(month, day, year, hour, min, clazz);
834 }
835
836
854 public static Date getDate(
855 int month, int day, int year, int hour, int min, TimeZone timeZone,
856 Class<? extends PortalException> clazz)
857 throws PortalException {
858
859 return getPortal().getDate(
860 month, day, year, hour, min, timeZone, clazz);
861 }
862
863
879 public static Date getDate(
880 int month, int day, int year, TimeZone timeZone,
881 Class<? extends PortalException> clazz)
882 throws PortalException {
883
884 return getPortal().getDate(month, day, year, timeZone, clazz);
885 }
886
887
890 @Deprecated
891 public static DB getDB() {
892 return DBFactoryUtil.getDB();
893 }
894
895 public static long getDefaultCompanyId() {
896 return getPortal().getDefaultCompanyId();
897 }
898
899 public static long getDigestAuthUserId(HttpServletRequest request)
900 throws PortalException {
901
902 return getPortal().getDigestAuthUserId(request);
903 }
904
905 public static String getEmailFromAddress(
906 PortletPreferences preferences, long companyId, String defaultValue) {
907
908 return getPortal().getEmailFromAddress(
909 preferences, companyId, defaultValue);
910 }
911
912 public static String getEmailFromName(
913 PortletPreferences preferences, long companyId, String defaultValue) {
914
915 return getPortal().getEmailFromName(
916 preferences, companyId, defaultValue);
917 }
918
919 public static Map<String, Serializable> getExpandoBridgeAttributes(
920 ExpandoBridge expandoBridge, HttpServletRequest request)
921 throws PortalException {
922
923 return getPortal().getExpandoBridgeAttributes(expandoBridge, request);
924 }
925
926 public static Map<String, Serializable> getExpandoBridgeAttributes(
927 ExpandoBridge expandoBridge, PortletRequest portletRequest)
928 throws PortalException {
929
930 return getPortal().getExpandoBridgeAttributes(
931 expandoBridge, portletRequest);
932 }
933
934 public static Map<String, Serializable> getExpandoBridgeAttributes(
935 ExpandoBridge expandoBridge,
936 UploadPortletRequest uploadPortletRequest)
937 throws PortalException {
938
939 return getPortal().getExpandoBridgeAttributes(
940 expandoBridge, uploadPortletRequest);
941 }
942
943 public static Serializable getExpandoValue(
944 HttpServletRequest request, String name, int type,
945 String displayType)
946 throws PortalException {
947
948 return getPortal().getExpandoValue(request, name, type, displayType);
949 }
950
951 public static Serializable getExpandoValue(
952 PortletRequest portletRequest, String name, int type,
953 String displayType)
954 throws PortalException {
955
956 return getPortal().getExpandoValue(
957 portletRequest, name, type, displayType);
958 }
959
960 public static Serializable getExpandoValue(
961 UploadPortletRequest uploadPortletRequest, String name, int type,
962 String displayType)
963 throws PortalException {
964
965 return getPortal().getExpandoValue(
966 uploadPortletRequest, name, type, displayType);
967 }
968
969 public static String getFacebookURL(
970 Portlet portlet, String facebookCanvasPageURL,
971 ThemeDisplay themeDisplay)
972 throws PortalException {
973
974 return getPortal().getFacebookURL(
975 portlet, facebookCanvasPageURL, themeDisplay);
976 }
977
978
981 @Deprecated
982 public static Portlet getFirstMyAccountPortlet(ThemeDisplay themeDisplay) {
983 return getPortal().getFirstMyAccountPortlet(themeDisplay);
984 }
985
986 public static String getFirstPageLayoutTypes(HttpServletRequest request) {
987 return getPortal().getFirstPageLayoutTypes(request);
988 }
989
990 public static Portlet getFirstSiteAdministrationPortlet(
991 ThemeDisplay themeDisplay) {
992
993 return getPortal().getFirstSiteAdministrationPortlet(themeDisplay);
994 }
995
996 public static String getFullName(
997 String firstName, String middleName, String lastName) {
998
999 return getPortal().getFullName(firstName, middleName, lastName);
1000 }
1001
1002 public static String getGlobalLibDir() {
1003 return getPortal().getGlobalLibDir();
1004 }
1005
1006 public static String getGoogleGadgetURL(
1007 Portlet portlet, ThemeDisplay themeDisplay)
1008 throws PortalException {
1009
1010 return getPortal().getGoogleGadgetURL(portlet, themeDisplay);
1011 }
1012
1013 public static String getGroupFriendlyURL(
1014 LayoutSet layoutSet, ThemeDisplay themeDisplay)
1015 throws PortalException {
1016
1017 return getPortal().getGroupFriendlyURL(layoutSet, themeDisplay);
1018 }
1019
1020 public static String getGroupFriendlyURL(
1021 LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale)
1022 throws PortalException {
1023
1024 return getPortal().getGroupFriendlyURL(layoutSet, themeDisplay, locale);
1025 }
1026
1027 public static int[] getGroupFriendlyURLIndex(String requestURI) {
1028 return getPortal().getGroupFriendlyURLIndex(requestURI);
1029 }
1030
1031 public static String[] getGroupPermissions(HttpServletRequest request) {
1032 return getPortal().getGroupPermissions(request);
1033 }
1034
1035 public static String[] getGroupPermissions(
1036 HttpServletRequest request, String className) {
1037
1038 return getPortal().getGroupPermissions(request, className);
1039 }
1040
1041 public static String[] getGroupPermissions(PortletRequest portletRequest) {
1042 return getPortal().getGroupPermissions(portletRequest);
1043 }
1044
1045 public static String[] getGroupPermissions(
1046 PortletRequest portletRequest, String className) {
1047
1048 return getPortal().getGroupPermissions(portletRequest, className);
1049 }
1050
1051 public static String[] getGuestPermissions(HttpServletRequest request) {
1052 return getPortal().getGuestPermissions(request);
1053 }
1054
1055 public static String[] getGuestPermissions(
1056 HttpServletRequest request, String className) {
1057
1058 return getPortal().getGuestPermissions(request, className);
1059 }
1060
1061 public static String[] getGuestPermissions(PortletRequest portletRequest) {
1062 return getPortal().getGuestPermissions(portletRequest);
1063 }
1064
1065 public static String[] getGuestPermissions(
1066 PortletRequest portletRequest, String className) {
1067
1068 return getPortal().getGuestPermissions(portletRequest, className);
1069 }
1070
1071 public static String getHomeURL(HttpServletRequest request)
1072 throws PortalException {
1073
1074 return getPortal().getHomeURL(request);
1075 }
1076
1077 public static String getHost(HttpServletRequest request) {
1078 return getPortal().getHost(request);
1079 }
1080
1081 public static String getHost(PortletRequest portletRequest) {
1082 return getPortal().getHost(portletRequest);
1083 }
1084
1085 public static HttpServletRequest getHttpServletRequest(
1086 PortletRequest portletRequest) {
1087
1088 return getPortal().getHttpServletRequest(portletRequest);
1089 }
1090
1091 public static HttpServletResponse getHttpServletResponse(
1092 PortletResponse portletResponse) {
1093
1094 return getPortal().getHttpServletResponse(portletResponse);
1095 }
1096
1097 public static String getI18nPathLanguageId(
1098 Locale locale, String defaultI18nPathLanguageId) {
1099
1100 return getPortal().getI18nPathLanguageId(
1101 locale, defaultI18nPathLanguageId);
1102 }
1103
1104
1107 @Deprecated
1108 public static String getJournalArticleActualURL(
1109 long groupId, boolean privateLayout, String mainPath,
1110 String friendlyURL, Map<String, String[]> params,
1111 Map<String, Object> requestContext)
1112 throws PortalException {
1113
1114 return getPortal().getJournalArticleActualURL(
1115 groupId, privateLayout, mainPath, friendlyURL, params,
1116 requestContext);
1117 }
1118
1119
1122 @Deprecated
1123 public static Layout getJournalArticleLayout(
1124 long groupId, boolean privateLayout, String friendlyURL)
1125 throws PortalException {
1126
1127 return getPortal().getJournalArticleLayout(
1128 groupId, privateLayout, friendlyURL);
1129 }
1130
1131 public static String getJsSafePortletId(String portletId) {
1132 return getPortal().getJsSafePortletId(portletId);
1133 }
1134
1135 public static String getLayoutActualURL(Layout layout) {
1136 return getPortal().getLayoutActualURL(layout);
1137 }
1138
1139 public static String getLayoutActualURL(Layout layout, String mainPath) {
1140 return getPortal().getLayoutActualURL(layout, mainPath);
1141 }
1142
1143 public static String getLayoutActualURL(
1144 long groupId, boolean privateLayout, String mainPath,
1145 String friendlyURL)
1146 throws PortalException {
1147
1148 return getPortal().getLayoutActualURL(
1149 groupId, privateLayout, mainPath, friendlyURL);
1150 }
1151
1152 public static String getLayoutActualURL(
1153 long groupId, boolean privateLayout, String mainPath,
1154 String friendlyURL, Map<String, String[]> params,
1155 Map<String, Object> requestContext)
1156 throws PortalException {
1157
1158 return getPortal().getLayoutActualURL(
1159 groupId, privateLayout, mainPath, friendlyURL, params,
1160 requestContext);
1161 }
1162
1163 public static String getLayoutFriendlyURL(
1164 Layout layout, ThemeDisplay themeDisplay)
1165 throws PortalException {
1166
1167 return getPortal().getLayoutFriendlyURL(layout, themeDisplay);
1168 }
1169
1170 public static String getLayoutFriendlyURL(
1171 Layout layout, ThemeDisplay themeDisplay, Locale locale)
1172 throws PortalException {
1173
1174 return getPortal().getLayoutFriendlyURL(layout, themeDisplay, locale);
1175 }
1176
1177 public static LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(
1178 long groupId, boolean privateLayout, String friendlyURL,
1179 Map<String, String[]> params, Map<String, Object> requestContext)
1180 throws PortalException {
1181
1182 return getPortal().getLayoutFriendlyURLComposite(
1183 groupId, privateLayout, friendlyURL, params, requestContext);
1184 }
1185
1186 public static String getLayoutFullURL(
1187 Layout layout, ThemeDisplay themeDisplay)
1188 throws PortalException {
1189
1190 return getPortal().getLayoutFullURL(layout, themeDisplay);
1191 }
1192
1193 public static String getLayoutFullURL(
1194 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1195 throws PortalException {
1196
1197 return getPortal().getLayoutFullURL(layout, themeDisplay, doAsUser);
1198 }
1199
1200 public static String getLayoutFullURL(long groupId, String portletId)
1201 throws PortalException {
1202
1203 return getPortal().getLayoutFullURL(groupId, portletId);
1204 }
1205
1206 public static String getLayoutFullURL(
1207 long groupId, String portletId, boolean secure)
1208 throws PortalException {
1209
1210 return getPortal().getLayoutFullURL(groupId, portletId, secure);
1211 }
1212
1213 public static String getLayoutFullURL(ThemeDisplay themeDisplay)
1214 throws PortalException {
1215
1216 return getPortal().getLayoutFullURL(themeDisplay);
1217 }
1218
1219 public static String getLayoutRelativeURL(
1220 Layout layout, ThemeDisplay themeDisplay)
1221 throws PortalException {
1222
1223 return getPortal().getLayoutRelativeURL(layout, themeDisplay);
1224 }
1225
1226 public static String getLayoutRelativeURL(
1227 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1228 throws PortalException {
1229
1230 return getPortal().getLayoutRelativeURL(layout, themeDisplay, doAsUser);
1231 }
1232
1233 public static String getLayoutSetFriendlyURL(
1234 LayoutSet layoutSet, ThemeDisplay themeDisplay)
1235 throws PortalException {
1236
1237 return getPortal().getLayoutSetFriendlyURL(layoutSet, themeDisplay);
1238 }
1239
1240 public static String getLayoutTarget(Layout layout) {
1241 return getPortal().getLayoutTarget(layout);
1242 }
1243
1244 public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
1245 throws PortalException {
1246
1247 return getPortal().getLayoutURL(layout, themeDisplay);
1248 }
1249
1250 public static String getLayoutURL(
1251 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1252 throws PortalException {
1253
1254 return getPortal().getLayoutURL(layout, themeDisplay, doAsUser);
1255 }
1256
1257 public static String getLayoutURL(
1258 Layout layout, ThemeDisplay themeDisplay, Locale locale)
1259 throws PortalException {
1260
1261 return getPortal().getLayoutURL(layout, themeDisplay, locale);
1262 }
1263
1264 public static String getLayoutURL(ThemeDisplay themeDisplay)
1265 throws PortalException {
1266
1267 return getPortal().getLayoutURL(themeDisplay);
1268 }
1269
1270 public static LiferayPortletRequest getLiferayPortletRequest(
1271 PortletRequest portletRequest) {
1272
1273 return getPortal().getLiferayPortletRequest(portletRequest);
1274 }
1275
1276 public static LiferayPortletResponse getLiferayPortletResponse(
1277 PortletResponse portletResponse) {
1278
1279 return getPortal().getLiferayPortletResponse(portletResponse);
1280 }
1281
1282 public static Locale getLocale(HttpServletRequest request) {
1283 return getPortal().getLocale(request);
1284 }
1285
1286 public static Locale getLocale(
1287 HttpServletRequest request, HttpServletResponse response,
1288 boolean initialize) {
1289
1290 return getPortal().getLocale(request, response, initialize);
1291 }
1292
1293 public static Locale getLocale(PortletRequest portletRequest) {
1294 return getPortal().getLocale(portletRequest);
1295 }
1296
1297 public static String getLocalizedFriendlyURL(
1298 HttpServletRequest request, Layout layout, Locale locale,
1299 Locale originalLocale)
1300 throws Exception {
1301
1302 return getPortal().getLocalizedFriendlyURL(
1303 request, layout, locale, originalLocale);
1304 }
1305
1306 public static String getMailId(
1307 String mx, String popPortletPrefix, Object... ids) {
1308
1309 return getPortal().getMailId(mx, popPortletPrefix, ids);
1310 }
1311
1312
1316 @Deprecated
1317 public static BaseModel<?> getModel(ResourcePermission resourcePermission)
1318 throws PortalException {
1319
1320 return getPortal().getBaseModel(resourcePermission);
1321 }
1322
1323
1327 @Deprecated
1328 public static BaseModel<?> getModel(String modelName, String primKey)
1329 throws PortalException {
1330
1331 return getPortal().getBaseModel(modelName, primKey);
1332 }
1333
1334 public static String getNetvibesURL(
1335 Portlet portlet, ThemeDisplay themeDisplay)
1336 throws PortalException {
1337
1338 return getPortal().getNetvibesURL(portlet, themeDisplay);
1339 }
1340
1341 public static String getNewPortletTitle(
1342 String portletTitle, String oldScopeName, String newScopeName) {
1343
1344 return getPortal().getNewPortletTitle(
1345 portletTitle, oldScopeName, newScopeName);
1346 }
1347
1348 public static HttpServletRequest getOriginalServletRequest(
1349 HttpServletRequest request) {
1350
1351 return getPortal().getOriginalServletRequest(request);
1352 }
1353
1354
1357 @Deprecated
1358 public static long getParentGroupId(long scopeGroupId) {
1359 return getPortal().getParentGroupId(scopeGroupId);
1360 }
1361
1362 public static String getPathContext() {
1363 return getPortal().getPathContext();
1364 }
1365
1366 public static String getPathContext(HttpServletRequest request) {
1367 return getPortal().getPathContext(request);
1368 }
1369
1370 public static String getPathContext(PortletRequest portletRequest) {
1371 return getPortal().getPathContext(portletRequest);
1372 }
1373
1374 public static String getPathContext(String contextPath) {
1375 return getPortal().getPathContext(contextPath);
1376 }
1377
1378 public static String getPathFriendlyURLPrivateGroup() {
1379 return getPortal().getPathFriendlyURLPrivateGroup();
1380 }
1381
1382 public static String getPathFriendlyURLPrivateUser() {
1383 return getPortal().getPathFriendlyURLPrivateUser();
1384 }
1385
1386 public static String getPathFriendlyURLPublic() {
1387 return getPortal().getPathFriendlyURLPublic();
1388 }
1389
1390 public static String getPathImage() {
1391 return getPortal().getPathImage();
1392 }
1393
1394 public static String getPathMain() {
1395 return getPortal().getPathMain();
1396 }
1397
1398 public static String getPathModule() {
1399 return getPortal().getPathModule();
1400 }
1401
1402 public static String getPathProxy() {
1403 return getPortal().getPathProxy();
1404 }
1405
1406 public static long getPlidFromFriendlyURL(
1407 long companyId, String friendlyURL) {
1408
1409 return getPortal().getPlidFromFriendlyURL(companyId, friendlyURL);
1410 }
1411
1412 public static long getPlidFromPortletId(
1413 long groupId, boolean privateLayout, String portletId)
1414 throws PortalException {
1415
1416 return getPortal().getPlidFromPortletId(
1417 groupId, privateLayout, portletId);
1418 }
1419
1420 public static long getPlidFromPortletId(long groupId, String portletId)
1421 throws PortalException {
1422
1423 return getPortal().getPlidFromPortletId(groupId, portletId);
1424 }
1425
1426 public static Portal getPortal() {
1427 PortalRuntimePermission.checkGetBeanProperty(PortalUtil.class);
1428
1429 return _portal;
1430 }
1431
1432 public static PortalInetSocketAddressEventListener[]
1433 getPortalInetSocketAddressEventListeners() {
1434
1435 return getPortal().getPortalInetSocketAddressEventListeners();
1436 }
1437
1438 public static String getPortalLibDir() {
1439 return getPortal().getPortalLibDir();
1440 }
1441
1442 public static InetAddress getPortalLocalInetAddress(boolean secure) {
1443 return getPortal().getPortalLocalInetAddress(secure);
1444 }
1445
1446 public static int getPortalLocalPort(boolean secure) {
1447 return getPortal().getPortalLocalPort(secure);
1448 }
1449
1450
1453 @Deprecated
1454 public static int getPortalPort() {
1455 return getPortal().getPortalPort();
1456 }
1457
1458
1462 @Deprecated
1463 public static int getPortalPort(boolean secure) {
1464 return getPortal().getPortalPort(secure);
1465 }
1466
1467 public static Properties getPortalProperties() {
1468 return getPortal().getPortalProperties();
1469 }
1470
1471 public static InetAddress getPortalServerInetAddress(boolean secure) {
1472 return getPortal().getPortalServerInetAddress(secure);
1473 }
1474
1475 public static int getPortalServerPort(boolean secure) {
1476 return getPortal().getPortalServerPort(secure);
1477 }
1478
1479 public static String getPortalURL(HttpServletRequest request) {
1480 return getPortal().getPortalURL(request);
1481 }
1482
1483 public static String getPortalURL(
1484 HttpServletRequest request, boolean secure) {
1485
1486 return getPortal().getPortalURL(request, secure);
1487 }
1488
1489 public static String getPortalURL(Layout layout, ThemeDisplay themeDisplay)
1490 throws PortalException {
1491
1492 return getPortal().getPortalURL(layout, themeDisplay);
1493 }
1494
1495 public static String getPortalURL(PortletRequest portletRequest) {
1496 return getPortal().getPortalURL(portletRequest);
1497 }
1498
1499 public static String getPortalURL(
1500 PortletRequest portletRequest, boolean secure) {
1501
1502 return getPortal().getPortalURL(portletRequest, secure);
1503 }
1504
1505 public static String getPortalURL(
1506 String serverName, int serverPort, boolean secure) {
1507
1508 return getPortal().getPortalURL(serverName, serverPort, secure);
1509 }
1510
1511 public static String getPortalURL(ThemeDisplay themeDisplay)
1512 throws PortalException {
1513
1514 return getPortal().getPortalURL(themeDisplay);
1515 }
1516
1517 public static String getPortalWebDir() {
1518 return getPortal().getPortalWebDir();
1519 }
1520
1521
1525 @Deprecated
1526 public static Set<String> getPortletAddDefaultResourceCheckWhitelist() {
1527 return getPortal().getPortletAddDefaultResourceCheckWhitelist();
1528 }
1529
1530
1534 @Deprecated
1535 public static Set<String>
1536 getPortletAddDefaultResourceCheckWhitelistActions() {
1537
1538 return getPortal().getPortletAddDefaultResourceCheckWhitelistActions();
1539 }
1540
1541
1545 @Deprecated
1546 public static List<BreadcrumbEntry> getPortletBreadcrumbList(
1547 HttpServletRequest request) {
1548
1549 return getPortal().getPortletBreadcrumbList(request);
1550 }
1551
1552
1557 @Deprecated
1558 public static List<BreadcrumbEntry> getPortletBreadcrumbs(
1559 HttpServletRequest request) {
1560
1561 return getPortal().getPortletBreadcrumbs(request);
1562 }
1563
1564 public static PortletConfig getPortletConfig(
1565 long companyId, String portletId, ServletContext servletContext)
1566 throws PortletException {
1567
1568 Portlet portlet = PortletLocalServiceUtil.getPortletById(
1569 companyId, portletId);
1570
1571 InvokerPortlet invokerPortlet = PortletInstanceFactoryUtil.create(
1572 portlet, servletContext);
1573
1574 return invokerPortlet.getPortletConfig();
1575 }
1576
1577 public static String getPortletDescription(
1578 Portlet portlet, ServletContext servletContext, Locale locale) {
1579
1580 return getPortal().getPortletDescription(
1581 portlet, servletContext, locale);
1582 }
1583
1584 public static String getPortletDescription(Portlet portlet, User user) {
1585 return getPortal().getPortletDescription(portlet, user);
1586 }
1587
1588 public static String getPortletDescription(
1589 String portletId, Locale locale) {
1590
1591 return getPortal().getPortletDescription(portletId, locale);
1592 }
1593
1594 public static String getPortletDescription(
1595 String portletId, String languageId) {
1596
1597 return getPortal().getPortletDescription(portletId, languageId);
1598 }
1599
1600 public static String getPortletDescription(String portletId, User user) {
1601 return getPortal().getPortletDescription(portletId, user);
1602 }
1603
1604 public static String getPortletId(HttpServletRequest request) {
1605 return getPortal().getPortletId(request);
1606 }
1607
1608 public static String getPortletId(PortletRequest portletRequest) {
1609 return getPortal().getPortletId(portletRequest);
1610 }
1611
1612 public static String getPortletLongTitle(Portlet portlet, Locale locale) {
1613 return getPortal().getPortletLongTitle(portlet, locale);
1614 }
1615
1616 public static String getPortletLongTitle(
1617 Portlet portlet, ServletContext servletContext, Locale locale) {
1618
1619 return getPortal().getPortletLongTitle(portlet, servletContext, locale);
1620 }
1621
1622 public static String getPortletLongTitle(
1623 Portlet portlet, String languageId) {
1624
1625 return getPortal().getPortletLongTitle(portlet, languageId);
1626 }
1627
1628 public static String getPortletLongTitle(Portlet portlet, User user) {
1629 return getPortal().getPortletLongTitle(portlet, user);
1630 }
1631
1632 public static String getPortletLongTitle(String portletId, Locale locale) {
1633 return getPortal().getPortletLongTitle(portletId, locale);
1634 }
1635
1636 public static String getPortletLongTitle(
1637 String portletId, String languageId) {
1638
1639 return getPortal().getPortletLongTitle(portletId, languageId);
1640 }
1641
1642 public static String getPortletLongTitle(String portletId, User user) {
1643 return getPortal().getPortletLongTitle(portletId, user);
1644 }
1645
1646 public static String getPortletNamespace(String portletId) {
1647 return getPortal().getPortletNamespace(portletId);
1648 }
1649
1650 public static String getPortletTitle(Portlet portlet, Locale locale) {
1651 return getPortal().getPortletTitle(portlet, locale);
1652 }
1653
1654 public static String getPortletTitle(
1655 Portlet portlet, ServletContext servletContext, Locale locale) {
1656
1657 return getPortal().getPortletTitle(portlet, servletContext, locale);
1658 }
1659
1660 public static String getPortletTitle(Portlet portlet, String languageId) {
1661 return getPortal().getPortletTitle(portlet, languageId);
1662 }
1663
1664 public static String getPortletTitle(Portlet portlet, User user) {
1665 return getPortal().getPortletTitle(portlet, user);
1666 }
1667
1668 public static String getPortletTitle(PortletRequest portletRequest) {
1669 return getPortal().getPortletTitle(portletRequest);
1670 }
1671
1672 public static String getPortletTitle(PortletResponse portletResponse) {
1673 return getPortal().getPortletTitle(portletResponse);
1674 }
1675
1676 public static String getPortletTitle(String portletId, Locale locale) {
1677 return getPortal().getPortletTitle(portletId, locale);
1678 }
1679
1680 public static String getPortletTitle(
1681 String portletId, ResourceBundle resourceBundle) {
1682
1683 return getPortal().getPortletTitle(portletId, resourceBundle);
1684 }
1685
1686 public static String getPortletTitle(String portletId, String languageId) {
1687 return getPortal().getPortletTitle(portletId, languageId);
1688 }
1689
1690 public static String getPortletTitle(String portletId, User user) {
1691 return getPortal().getPortletTitle(portletId, user);
1692 }
1693
1694 public static String getPortletXmlFileName() {
1695 return getPortal().getPortletXmlFileName();
1696 }
1697
1698 public static PortletPreferences getPreferences(
1699 HttpServletRequest request) {
1700
1701 return getPortal().getPreferences(request);
1702 }
1703
1704 public static PreferencesValidator getPreferencesValidator(
1705 Portlet portlet) {
1706
1707 return getPortal().getPreferencesValidator(portlet);
1708 }
1709
1710 public static String getRelativeHomeURL(HttpServletRequest request)
1711 throws PortalException {
1712
1713 return getPortal().getRelativeHomeURL(request);
1714 }
1715
1716 public static ResourceBundle getResourceBundle(Locale locale) {
1717 return getPortal().getResourceBundle(locale);
1718 }
1719
1720 public static long getScopeGroupId(HttpServletRequest request)
1721 throws PortalException {
1722
1723 return getPortal().getScopeGroupId(request);
1724 }
1725
1726 public static long getScopeGroupId(
1727 HttpServletRequest request, String portletId)
1728 throws PortalException {
1729
1730 return getPortal().getScopeGroupId(request, portletId);
1731 }
1732
1733 public static long getScopeGroupId(
1734 HttpServletRequest request, String portletId,
1735 boolean checkStagingGroup)
1736 throws PortalException {
1737
1738 return getPortal().getScopeGroupId(
1739 request, portletId, checkStagingGroup);
1740 }
1741
1742 public static long getScopeGroupId(Layout layout) {
1743 return getPortal().getScopeGroupId(layout);
1744 }
1745
1746 public static long getScopeGroupId(Layout layout, String portletId) {
1747 return getPortal().getScopeGroupId(layout, portletId);
1748 }
1749
1750 public static long getScopeGroupId(long plid) {
1751 return getPortal().getScopeGroupId(plid);
1752 }
1753
1754 public static long getScopeGroupId(PortletRequest portletRequest)
1755 throws PortalException {
1756
1757 return getPortal().getScopeGroupId(portletRequest);
1758 }
1759
1760 public static User getSelectedUser(HttpServletRequest request)
1761 throws PortalException {
1762
1763 return getPortal().getSelectedUser(request);
1764 }
1765
1766 public static User getSelectedUser(
1767 HttpServletRequest request, boolean checkPermission)
1768 throws PortalException {
1769
1770 return getPortal().getSelectedUser(request, checkPermission);
1771 }
1772
1773 public static User getSelectedUser(PortletRequest portletRequest)
1774 throws PortalException {
1775
1776 return getPortal().getSelectedUser(portletRequest);
1777 }
1778
1779 public static User getSelectedUser(
1780 PortletRequest portletRequest, boolean checkPermission)
1781 throws PortalException {
1782
1783 return getPortal().getSelectedUser(portletRequest, checkPermission);
1784 }
1785
1786 public static String getServletContextName() {
1787 return getPortal().getServletContextName();
1788 }
1789
1790 public static long[] getSharedContentSiteGroupIds(
1791 long companyId, long groupId, long userId)
1792 throws PortalException {
1793
1794 return getPortal().getSharedContentSiteGroupIds(
1795 companyId, groupId, userId);
1796 }
1797
1798 public static Map<String, List<Portlet>> getSiteAdministrationCategoriesMap(
1799 HttpServletRequest request) {
1800
1801 return getPortal().getSiteAdministrationCategoriesMap(request);
1802 }
1803
1804 public static PortletURL getSiteAdministrationURL(
1805 HttpServletRequest request, ThemeDisplay themeDisplay) {
1806
1807 return getPortal().getSiteAdministrationURL(request, themeDisplay);
1808 }
1809
1810 public static PortletURL getSiteAdministrationURL(
1811 HttpServletRequest request, ThemeDisplay themeDisplay,
1812 String portletName) {
1813
1814 return getPortal().getSiteAdministrationURL(
1815 request, themeDisplay, portletName);
1816 }
1817
1818 public static PortletURL getSiteAdministrationURL(
1819 PortletResponse portletResponse, ThemeDisplay themeDisplay) {
1820
1821 return getPortal().getSiteAdministrationURL(
1822 portletResponse, themeDisplay);
1823 }
1824
1825 public static PortletURL getSiteAdministrationURL(
1826 PortletResponse portletResponse, ThemeDisplay themeDisplay,
1827 String portletName) {
1828
1829 return getPortal().getSiteAdministrationURL(
1830 portletResponse, themeDisplay, portletName);
1831 }
1832
1833
1837 @Deprecated
1838 public static long[] getSiteAndCompanyGroupIds(long groupId)
1839 throws PortalException {
1840
1841 return getPortal().getSiteAndCompanyGroupIds(groupId);
1842 }
1843
1844
1848 @Deprecated
1849 public static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
1850 throws PortalException {
1851
1852 return getPortal().getSiteAndCompanyGroupIds(themeDisplay);
1853 }
1854
1855 public static Locale getSiteDefaultLocale(long groupId)
1856 throws PortalException {
1857
1858 return getPortal().getSiteDefaultLocale(groupId);
1859 }
1860
1861 public static long getSiteGroupId(long scopeGroupId) {
1862 return getPortal().getSiteGroupId(scopeGroupId);
1863 }
1864
1865 public static String getSiteLoginURL(ThemeDisplay themeDisplay)
1866 throws PortalException {
1867
1868 return getPortal().getSiteLoginURL(themeDisplay);
1869 }
1870
1871 public static String getStaticResourceURL(
1872 HttpServletRequest request, String uri) {
1873
1874 return getPortal().getStaticResourceURL(request, uri);
1875 }
1876
1877 public static String getStaticResourceURL(
1878 HttpServletRequest request, String uri, long timestamp) {
1879
1880 return getPortal().getStaticResourceURL(request, uri, timestamp);
1881 }
1882
1883 public static String getStaticResourceURL(
1884 HttpServletRequest request, String uri, String queryString) {
1885
1886 return getPortal().getStaticResourceURL(request, uri, queryString);
1887 }
1888
1889 public static String getStaticResourceURL(
1890 HttpServletRequest request, String uri, String queryString,
1891 long timestamp) {
1892
1893 return getPortal().getStaticResourceURL(
1894 request, uri, queryString, timestamp);
1895 }
1896
1897 public static String getStrutsAction(HttpServletRequest request) {
1898 return getPortal().getStrutsAction(request);
1899 }
1900
1901 public static String[] getSystemGroups() {
1902 return getPortal().getSystemGroups();
1903 }
1904
1905 public static String[] getSystemOrganizationRoles() {
1906 return getPortal().getSystemOrganizationRoles();
1907 }
1908
1909 public static String[] getSystemRoles() {
1910 return getPortal().getSystemRoles();
1911 }
1912
1913 public static String[] getSystemSiteRoles() {
1914 return getPortal().getSystemSiteRoles();
1915 }
1916
1917 public static String getUniqueElementId(
1918 HttpServletRequest request, String namespace, String id) {
1919
1920 return getPortal().getUniqueElementId(request, namespace, id);
1921 }
1922
1923 public static String getUniqueElementId(
1924 PortletRequest request, String namespace, String id) {
1925
1926 return getPortal().getUniqueElementId(request, namespace, id);
1927 }
1928
1929 public static UploadPortletRequest getUploadPortletRequest(
1930 PortletRequest portletRequest) {
1931
1932 return getPortal().getUploadPortletRequest(portletRequest);
1933 }
1934
1935 public static UploadServletRequest getUploadServletRequest(
1936 HttpServletRequest request) {
1937
1938 return getPortal().getUploadServletRequest(request);
1939 }
1940
1941 public static Date getUptime() {
1942 return getPortal().getUptime();
1943 }
1944
1945 public static String getURLWithSessionId(String url, String sessionId) {
1946 return getPortal().getURLWithSessionId(url, sessionId);
1947 }
1948
1949 public static User getUser(HttpServletRequest request)
1950 throws PortalException {
1951
1952 return getPortal().getUser(request);
1953 }
1954
1955 public static User getUser(PortletRequest portletRequest)
1956 throws PortalException {
1957
1958 return getPortal().getUser(portletRequest);
1959 }
1960
1961 public static String getUserEmailAddress(long userId) {
1962 return getPortal().getUserEmailAddress(userId);
1963 }
1964
1965 public static long getUserId(HttpServletRequest request) {
1966 return getPortal().getUserId(request);
1967 }
1968
1969 public static long getUserId(PortletRequest portletRequest) {
1970 return getPortal().getUserId(portletRequest);
1971 }
1972
1973 public static String getUserName(BaseModel<?> baseModel) {
1974 return getPortal().getUserName(baseModel);
1975 }
1976
1977 public static String getUserName(long userId, String defaultUserName) {
1978 return getPortal().getUserName(userId, defaultUserName);
1979 }
1980
1981 public static String getUserName(
1982 long userId, String defaultUserName, HttpServletRequest request) {
1983
1984 return getPortal().getUserName(userId, defaultUserName, request);
1985 }
1986
1987 public static String getUserName(
1988 long userId, String defaultUserName, String userAttribute) {
1989
1990 return getPortal().getUserName(userId, defaultUserName, userAttribute);
1991 }
1992
1993 public static String getUserName(
1994 long userId, String defaultUserName, String userAttribute,
1995 HttpServletRequest request) {
1996
1997 return getPortal().getUserName(
1998 userId, defaultUserName, userAttribute, request);
1999 }
2000
2001 public static String getUserPassword(HttpServletRequest request) {
2002 return getPortal().getUserPassword(request);
2003 }
2004
2005 public static String getUserPassword(HttpSession session) {
2006 return getPortal().getUserPassword(session);
2007 }
2008
2009 public static String getUserPassword(PortletRequest portletRequest) {
2010 return getPortal().getUserPassword(portletRequest);
2011 }
2012
2013
2016 @Deprecated
2017 public static String getUserValue(
2018 long userId, String param, String defaultValue) {
2019
2020 return getPortal().getUserValue(userId, param, defaultValue);
2021 }
2022
2023 public static String getValidPortalDomain(long companyId, String domain) {
2024 return getPortal().getValidPortalDomain(companyId, domain);
2025 }
2026
2027 public static long getValidUserId(long companyId, long userId)
2028 throws PortalException {
2029
2030 return getPortal().getValidUserId(companyId, userId);
2031 }
2032
2033 public static String getVirtualHostname(LayoutSet layoutSet) {
2034 return getPortal().getVirtualHostname(layoutSet);
2035 }
2036
2037
2040 @Deprecated
2041 public static String getVirtualLayoutActualURL(
2042 long groupId, boolean privateLayout, String mainPath,
2043 String friendlyURL, Map<String, String[]> params,
2044 Map<String, Object> requestContext)
2045 throws PortalException {
2046
2047 return getPortal().getVirtualLayoutActualURL(
2048 groupId, privateLayout, mainPath, friendlyURL, params,
2049 requestContext);
2050 }
2051
2052
2055 @Deprecated
2056 public static LayoutFriendlyURLComposite
2057 getVirtualLayoutFriendlyURLComposite(
2058 boolean privateLayout, String friendlyURL,
2059 Map<String, String[]> params, Map<String, Object> requestContext)
2060 throws PortalException {
2061
2062 return getPortal().getVirtualLayoutFriendlyURLComposite(
2063 privateLayout, friendlyURL, params, requestContext);
2064 }
2065
2066 public static String getWidgetURL(
2067 Portlet portlet, ThemeDisplay themeDisplay)
2068 throws PortalException {
2069
2070 return getPortal().getWidgetURL(portlet, themeDisplay);
2071 }
2072
2073 public static void initCustomSQL() {
2074 getPortal().initCustomSQL();
2075 }
2076
2077 public static User initUser(HttpServletRequest request) throws Exception {
2078 return getPortal().initUser(request);
2079 }
2080
2081 public static void invokeTaglibDiscussion(
2082 PortletConfig portletConfig, ActionRequest actionRequest,
2083 ActionResponse actionResponse)
2084 throws Exception {
2085
2086 getPortal().invokeTaglibDiscussion(
2087 portletConfig, actionRequest, actionResponse);
2088 }
2089
2090 public static void invokeTaglibDiscussionPagination(
2091 PortletConfig portletConfig, ResourceRequest resourceRequest,
2092 ResourceResponse resourceResponse)
2093 throws IOException, PortletException {
2094
2095 getPortal().invokeTaglibDiscussionPagination(
2096 portletConfig, resourceRequest, resourceResponse);
2097 }
2098
2099
2102 @Deprecated
2103 public static boolean isAllowAddPortletDefaultResource(
2104 HttpServletRequest request, Portlet portlet)
2105 throws PortalException {
2106
2107 return getPortal().isAllowAddPortletDefaultResource(request, portlet);
2108 }
2109
2110 public static boolean isCDNDynamicResourcesEnabled(
2111 HttpServletRequest request)
2112 throws PortalException {
2113
2114 return getPortal().isCDNDynamicResourcesEnabled(request);
2115 }
2116
2117 public static boolean isCDNDynamicResourcesEnabled(long companyId) {
2118 return getPortal().isCDNDynamicResourcesEnabled(companyId);
2119 }
2120
2121
2124 @Deprecated
2125 public static boolean isCommunityAdmin(User user, long groupId)
2126 throws Exception {
2127
2128 return getPortal().isCommunityAdmin(user, groupId);
2129 }
2130
2131
2134 @Deprecated
2135 public static boolean isCommunityOwner(User user, long groupId)
2136 throws Exception {
2137
2138 return getPortal().isCommunityOwner(user, groupId);
2139 }
2140
2141 public static boolean isCompanyAdmin(User user) throws Exception {
2142 return getPortal().isCompanyAdmin(user);
2143 }
2144
2145 public static boolean isCompanyControlPanelPortlet(
2146 String portletId, String category, ThemeDisplay themeDisplay)
2147 throws PortalException {
2148
2149 return getPortal().isCompanyControlPanelPortlet(
2150 portletId, category, themeDisplay);
2151 }
2152
2153 public static boolean isCompanyControlPanelPortlet(
2154 String portletId, ThemeDisplay themeDisplay)
2155 throws PortalException {
2156
2157 return getPortal().isCompanyControlPanelPortlet(
2158 portletId, themeDisplay);
2159 }
2160
2161 public static boolean isCompanyControlPanelVisible(
2162 ThemeDisplay themeDisplay)
2163 throws PortalException {
2164
2165 return getPortal().isCompanyControlPanelVisible(themeDisplay);
2166 }
2167
2168 public static boolean isControlPanelPortlet(
2169 String portletId, String category, ThemeDisplay themeDisplay) {
2170
2171 return getPortal().isControlPanelPortlet(
2172 portletId, category, themeDisplay);
2173 }
2174
2175 public static boolean isControlPanelPortlet(
2176 String portletId, ThemeDisplay themeDisplay) {
2177
2178 return getPortal().isControlPanelPortlet(portletId, themeDisplay);
2179 }
2180
2181 public static boolean isGroupAdmin(User user, long groupId)
2182 throws Exception {
2183
2184 return getPortal().isGroupAdmin(user, groupId);
2185 }
2186
2187 public static boolean isGroupFriendlyURL(
2188 String fullURL, String groupFriendlyURL, String layoutFriendlyURL) {
2189
2190 return getPortal().isGroupFriendlyURL(
2191 fullURL, groupFriendlyURL, layoutFriendlyURL);
2192 }
2193
2194 public static boolean isGroupOwner(User user, long groupId)
2195 throws Exception {
2196
2197 return getPortal().isGroupOwner(user, groupId);
2198 }
2199
2200 public static boolean isLayoutDescendant(Layout layout, long layoutId)
2201 throws PortalException {
2202
2203 return getPortal().isLayoutDescendant(layout, layoutId);
2204 }
2205
2206 public static boolean isLayoutSitemapable(Layout layout) {
2207 return getPortal().isLayoutSitemapable(layout);
2208 }
2209
2210 public static boolean isLoginRedirectRequired(HttpServletRequest request) {
2211 return getPortal().isLoginRedirectRequired(request);
2212 }
2213
2214 public static boolean isMethodGet(PortletRequest portletRequest) {
2215 return getPortal().isMethodGet(portletRequest);
2216 }
2217
2218 public static boolean isMethodPost(PortletRequest portletRequest) {
2219 return getPortal().isMethodPost(portletRequest);
2220 }
2221
2222 public static boolean isMultipartRequest(HttpServletRequest request) {
2223 return getPortal().isMultipartRequest(request);
2224 }
2225
2226 public static boolean isOmniadmin(long userId) {
2227 return getPortal().isOmniadmin(userId);
2228 }
2229
2230 public static boolean isOmniadmin(User user) {
2231 return getPortal().isOmniadmin(user);
2232 }
2233
2234 public static boolean isReservedParameter(String name) {
2235 return getPortal().isReservedParameter(name);
2236 }
2237
2238 public static boolean isRightToLeft(HttpServletRequest request) {
2239 return getPortal().isRightToLeft(request);
2240 }
2241
2242 public static boolean isRSSFeedsEnabled() {
2243 return getPortal().isRSSFeedsEnabled();
2244 }
2245
2246 public static boolean isSecure(HttpServletRequest request) {
2247 return getPortal().isSecure(request);
2248 }
2249
2250 public static boolean isSystemGroup(String groupName) {
2251 return getPortal().isSystemGroup(groupName);
2252 }
2253
2254 public static boolean isSystemRole(String roleName) {
2255 return getPortal().isSystemRole(roleName);
2256 }
2257
2258 public static boolean isUpdateAvailable() {
2259 return getPortal().isUpdateAvailable();
2260 }
2261
2262 public static boolean isValidResourceId(String resourceId) {
2263 return getPortal().isValidResourceId(resourceId);
2264 }
2265
2266 public static boolean removePortalEventListener(
2267 PortalInetSocketAddressEventListener
2268 portalInetSocketAddressEventListener) {
2269
2270 return getPortal().removePortalInetSocketAddressEventListener(
2271 portalInetSocketAddressEventListener);
2272 }
2273
2274 public static void resetCDNHosts() {
2275 getPortal().resetCDNHosts();
2276 }
2277
2278
2282 @Deprecated
2283 public static Set<String> resetPortletAddDefaultResourceCheckWhitelist() {
2284 return getPortal().resetPortletAddDefaultResourceCheckWhitelist();
2285 }
2286
2287
2291 @Deprecated
2292 public static Set<String>
2293 resetPortletAddDefaultResourceCheckWhitelistActions() {
2294
2295 return getPortal().
2296 resetPortletAddDefaultResourceCheckWhitelistActions();
2297 }
2298
2299 public static String resetPortletParameters(String url, String portletId) {
2300 return getPortal().resetPortletParameters(url, portletId);
2301 }
2302
2303
2306 @Deprecated
2307 public static void runSQL(String sql) throws IOException, SQLException {
2308 DBFactoryUtil.getDB().runSQL(sql);
2309 }
2310
2311 public static void sendError(
2312 Exception e, ActionRequest actionRequest,
2313 ActionResponse actionResponse)
2314 throws IOException {
2315
2316 getPortal().sendError(e, actionRequest, actionResponse);
2317 }
2318
2319 public static void sendError(
2320 Exception e, HttpServletRequest request,
2321 HttpServletResponse response)
2322 throws IOException, ServletException {
2323
2324 getPortal().sendError(e, request, response);
2325 }
2326
2327 public static void sendError(
2328 int status, Exception e, ActionRequest actionRequest,
2329 ActionResponse actionResponse)
2330 throws IOException {
2331
2332 getPortal().sendError(status, e, actionRequest, actionResponse);
2333 }
2334
2335 public static void sendError(
2336 int status, Exception e, HttpServletRequest request,
2337 HttpServletResponse response)
2338 throws IOException, ServletException {
2339
2340 getPortal().sendError(status, e, request, response);
2341 }
2342
2343 public static void sendRSSFeedsDisabledError(
2344 HttpServletRequest request, HttpServletResponse response)
2345 throws IOException, ServletException {
2346
2347 getPortal().sendRSSFeedsDisabledError(request, response);
2348 }
2349
2350 public static void sendRSSFeedsDisabledError(
2351 PortletRequest portletRequest, PortletResponse portletResponse)
2352 throws IOException, ServletException {
2353
2354 getPortal().sendRSSFeedsDisabledError(portletRequest, portletResponse);
2355 }
2356
2357
2361 public static void setPageDescription(
2362 String description, HttpServletRequest request) {
2363
2364 getPortal().setPageDescription(description, request);
2365 }
2366
2367
2370 public static void setPageKeywords(
2371 String keywords, HttpServletRequest request) {
2372
2373 getPortal().setPageKeywords(keywords, request);
2374 }
2375
2376
2379 public static void setPageSubtitle(
2380 String subtitle, HttpServletRequest request) {
2381
2382 getPortal().setPageSubtitle(subtitle, request);
2383 }
2384
2385
2389 public static void setPageTitle(String title, HttpServletRequest request) {
2390 getPortal().setPageTitle(title, request);
2391 }
2392
2393 public static void setPortalInetSocketAddresses(
2394 HttpServletRequest request) {
2395
2396 getPortal().setPortalInetSocketAddresses(request);
2397 }
2398
2399
2405 @Deprecated
2406 public static void setPortalPort(HttpServletRequest request) {
2407 getPortal().setPortalPort(request);
2408 }
2409
2410 public static void storePreferences(PortletPreferences portletPreferences)
2411 throws IOException, ValidatorException {
2412
2413 getPortal().storePreferences(portletPreferences);
2414 }
2415
2416 public static String[] stripURLAnchor(String url, String separator) {
2417 return getPortal().stripURLAnchor(url, separator);
2418 }
2419
2420 public static String transformCustomSQL(String sql) {
2421 return getPortal().transformCustomSQL(sql);
2422 }
2423
2424 public static String transformSQL(String sql) {
2425 return getPortal().transformSQL(sql);
2426 }
2427
2428 public static void updateImageId(
2429 BaseModel<?> baseModel, boolean hasImage, byte[] bytes,
2430 String fieldName, long maxSize, int maxHeight, int maxWidth)
2431 throws PortalException {
2432
2433 getPortal().updateImageId(
2434 baseModel, hasImage, bytes, fieldName, maxSize, maxHeight,
2435 maxWidth);
2436 }
2437
2438 public static PortletMode updatePortletMode(
2439 String portletId, User user, Layout layout, PortletMode portletMode,
2440 HttpServletRequest request)
2441 throws PortalException {
2442
2443 return getPortal().updatePortletMode(
2444 portletId, user, layout, portletMode, request);
2445 }
2446
2447 public static String updateRedirect(
2448 String redirect, String oldPath, String newPath) {
2449
2450 return getPortal().updateRedirect(redirect, oldPath, newPath);
2451 }
2452
2453 public static WindowState updateWindowState(
2454 String portletId, User user, Layout layout, WindowState windowState,
2455 HttpServletRequest request) {
2456
2457 return getPortal().updateWindowState(
2458 portletId, user, layout, windowState, request);
2459 }
2460
2461
2466 @Deprecated
2467 public void removePortalPortEventListener(
2468 PortalPortEventListener portalPortEventListener) {
2469
2470 getPortal().removePortalPortEventListener(portalPortEventListener);
2471 }
2472
2473 public void setPortal(Portal portal) {
2474 PortalRuntimePermission.checkSetBeanProperty(getClass());
2475
2476 _portal = portal;
2477 }
2478
2479 private static Portal _portal;
2480
2481 }