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
422 @Deprecated
423 public static long getBasicAuthUserId(HttpServletRequest request)
424 throws PortalException {
425
426 return getPortal().getBasicAuthUserId(request);
427 }
428
429
434 @Deprecated
435 public static long getBasicAuthUserId(
436 HttpServletRequest request, long companyId)
437 throws PortalException {
438
439 return getPortal().getBasicAuthUserId(request, companyId);
440 }
441
442 public static List<Group> getBrowsableScopeGroups(
443 long userId, long companyId, long groupId, String portletId)
444 throws PortalException {
445
446 return getPortal().getBrowsableScopeGroups(
447 userId, companyId, groupId, portletId);
448 }
449
450
473 public static String getCanonicalURL(
474 String completeURL, ThemeDisplay themeDisplay, Layout layout)
475 throws PortalException {
476
477 return getPortal().getCanonicalURL(completeURL, themeDisplay, layout);
478 }
479
480
506 public static String getCanonicalURL(
507 String completeURL, ThemeDisplay themeDisplay, Layout layout,
508 boolean forceLayoutFriendlyURL)
509 throws PortalException {
510
511 return getPortal().getCanonicalURL(
512 completeURL, themeDisplay, layout, forceLayoutFriendlyURL);
513 }
514
515
518 @Deprecated
519 public static String getCDNHost() {
520 return getPortal().getCDNHost();
521 }
522
523
530 public static String getCDNHost(boolean secure) {
531 return getPortal().getCDNHost(secure);
532 }
533
534 public static String getCDNHost(HttpServletRequest request)
535 throws PortalException {
536
537 return getPortal().getCDNHost(request);
538 }
539
540
547 public static String getCDNHostHttp(long companyId) {
548 return getPortal().getCDNHostHttp(companyId);
549 }
550
551
558 public static String getCDNHostHttps(long companyId) {
559 return getPortal().getCDNHostHttps(companyId);
560 }
561
562
568 public static String getClassName(long classNameId) {
569 return getPortal().getClassName(classNameId);
570 }
571
572
578 public static long getClassNameId(Class<?> clazz) {
579 return getPortal().getClassNameId(clazz);
580 }
581
582
588 public static long getClassNameId(String value) {
589 return getPortal().getClassNameId(value);
590 }
591
592 public static Company getCompany(HttpServletRequest request)
593 throws PortalException {
594
595 return getPortal().getCompany(request);
596 }
597
598 public static Company getCompany(PortletRequest portletRequest)
599 throws PortalException {
600
601 return getPortal().getCompany(portletRequest);
602 }
603
604 public static long getCompanyId(HttpServletRequest request) {
605 return getPortal().getCompanyId(request);
606 }
607
608 public static long getCompanyId(PortletRequest portletRequest) {
609 return getPortal().getCompanyId(portletRequest);
610 }
611
612 public static long[] getCompanyIds() {
613 return getPortal().getCompanyIds();
614 }
615
616 public static Set<String> getComputerAddresses() {
617 return getPortal().getComputerAddresses();
618 }
619
620 public static String getComputerName() {
621 return getPortal().getComputerName();
622 }
623
624 public static String getControlPanelFullURL(
625 long scopeGroupId, String ppid, Map<String, String[]> params)
626 throws PortalException {
627
628 return getPortal().getControlPanelFullURL(scopeGroupId, ppid, params);
629 }
630
631 public static long getControlPanelPlid(long companyId)
632 throws PortalException {
633
634 return getPortal().getControlPanelPlid(companyId);
635 }
636
637 public static long getControlPanelPlid(PortletRequest portletRequest)
638 throws PortalException {
639
640 return getPortal().getControlPanelPlid(portletRequest);
641 }
642
643 public static PortletURL getControlPanelPortletURL(
644 HttpServletRequest request, Group group, String portletId,
645 long refererPlid, String lifecycle) {
646
647 return getPortal().getControlPanelPortletURL(
648 request, group, portletId, refererPlid, lifecycle);
649 }
650
651 public static PortletURL getControlPanelPortletURL(
652 HttpServletRequest request, String portletId, long refererPlid,
653 String lifecycle) {
654
655 return getPortal().getControlPanelPortletURL(
656 request, portletId, refererPlid, lifecycle);
657 }
658
659 public static PortletURL getControlPanelPortletURL(
660 PortletRequest portletRequest, Group group, String portletId,
661 long refererPlid, String lifecycle) {
662
663 return getPortal().getControlPanelPortletURL(
664 portletRequest, group, portletId, refererPlid, lifecycle);
665 }
666
667 public static PortletURL getControlPanelPortletURL(
668 PortletRequest portletRequest, String portletId, long refererPlid,
669 String lifecycle) {
670
671 return getPortal().getControlPanelPortletURL(
672 portletRequest, portletId, refererPlid, lifecycle);
673 }
674
675 public static String getCreateAccountURL(
676 HttpServletRequest request, ThemeDisplay themeDisplay)
677 throws Exception {
678
679 return getPortal().getCreateAccountURL(request, themeDisplay);
680 }
681
682 public static long[] getCurrentAndAncestorSiteGroupIds(long groupId)
683 throws PortalException {
684
685 return getPortal().getCurrentAndAncestorSiteGroupIds(groupId);
686 }
687
688 public static long[] getCurrentAndAncestorSiteGroupIds(
689 long groupId, boolean checkContentSharingWithChildrenEnabled)
690 throws PortalException {
691
692 return getPortal().getCurrentAndAncestorSiteGroupIds(
693 groupId, checkContentSharingWithChildrenEnabled);
694 }
695
696 public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds)
697 throws PortalException {
698
699 return getPortal().getCurrentAndAncestorSiteGroupIds(groupIds);
700 }
701
702 public static long[] getCurrentAndAncestorSiteGroupIds(
703 long[] groupIds, boolean checkContentSharingWithChildrenEnabled)
704 throws PortalException {
705
706 return getPortal().getCurrentAndAncestorSiteGroupIds(
707 groupIds, checkContentSharingWithChildrenEnabled);
708 }
709
710 public static List<Group> getCurrentAndAncestorSiteGroups(long groupId)
711 throws PortalException {
712
713 return getPortal().getCurrentAndAncestorSiteGroups(groupId);
714 }
715
716 public static List<Group> getCurrentAndAncestorSiteGroups(
717 long groupId, boolean checkContentSharingWithChildrenEnabled)
718 throws PortalException {
719
720 return getPortal().getCurrentAndAncestorSiteGroups(
721 groupId, checkContentSharingWithChildrenEnabled);
722 }
723
724 public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds)
725 throws PortalException {
726
727 return getPortal().getCurrentAndAncestorSiteGroups(groupIds);
728 }
729
730 public static List<Group> getCurrentAndAncestorSiteGroups(
731 long[] groupIds, boolean checkContentSharingWithChildrenEnabled)
732 throws PortalException {
733
734 return getPortal().getCurrentAndAncestorSiteGroups(
735 groupIds, checkContentSharingWithChildrenEnabled);
736 }
737
738 public static String getCurrentCompleteURL(HttpServletRequest request) {
739 return getPortal().getCurrentCompleteURL(request);
740 }
741
742 public static String getCurrentURL(HttpServletRequest request) {
743 return getPortal().getCurrentURL(request);
744 }
745
746 public static String getCurrentURL(PortletRequest portletRequest) {
747 return getPortal().getCurrentURL(portletRequest);
748 }
749
750 public static String getCustomSQLFunctionIsNotNull() {
751 return getPortal().getCustomSQLFunctionIsNotNull();
752 }
753
754 public static String getCustomSQLFunctionIsNull() {
755 return getPortal().getCustomSQLFunctionIsNull();
756 }
757
758
767 public static Date getDate(int month, int day, int year) {
768 return getPortal().getDate(month, day, year);
769 }
770
771
786 public static Date getDate(
787 int month, int day, int year,
788 Class<? extends PortalException> clazz)
789 throws PortalException {
790
791 return getPortal().getDate(month, day, year, clazz);
792 }
793
794
811 public static Date getDate(
812 int month, int day, int year, int hour, int min,
813 Class<? extends PortalException> clazz)
814 throws PortalException {
815
816 return getPortal().getDate(month, day, year, hour, min, clazz);
817 }
818
819
837 public static Date getDate(
838 int month, int day, int year, int hour, int min, TimeZone timeZone,
839 Class<? extends PortalException> clazz)
840 throws PortalException {
841
842 return getPortal().getDate(
843 month, day, year, hour, min, timeZone, clazz);
844 }
845
846
862 public static Date getDate(
863 int month, int day, int year, TimeZone timeZone,
864 Class<? extends PortalException> clazz)
865 throws PortalException {
866
867 return getPortal().getDate(month, day, year, timeZone, clazz);
868 }
869
870
873 @Deprecated
874 public static DB getDB() {
875 return DBFactoryUtil.getDB();
876 }
877
878 public static long getDefaultCompanyId() {
879 return getPortal().getDefaultCompanyId();
880 }
881
882
887 @Deprecated
888 public static long getDigestAuthUserId(HttpServletRequest request)
889 throws PortalException {
890
891 return getPortal().getDigestAuthUserId(request);
892 }
893
894 public static String getEmailFromAddress(
895 PortletPreferences preferences, long companyId, String defaultValue) {
896
897 return getPortal().getEmailFromAddress(
898 preferences, companyId, defaultValue);
899 }
900
901 public static String getEmailFromName(
902 PortletPreferences preferences, long companyId, String defaultValue) {
903
904 return getPortal().getEmailFromName(
905 preferences, companyId, defaultValue);
906 }
907
908 public static Map<String, Serializable> getExpandoBridgeAttributes(
909 ExpandoBridge expandoBridge, HttpServletRequest request)
910 throws PortalException {
911
912 return getPortal().getExpandoBridgeAttributes(expandoBridge, request);
913 }
914
915 public static Map<String, Serializable> getExpandoBridgeAttributes(
916 ExpandoBridge expandoBridge, PortletRequest portletRequest)
917 throws PortalException {
918
919 return getPortal().getExpandoBridgeAttributes(
920 expandoBridge, portletRequest);
921 }
922
923 public static Map<String, Serializable> getExpandoBridgeAttributes(
924 ExpandoBridge expandoBridge,
925 UploadPortletRequest uploadPortletRequest)
926 throws PortalException {
927
928 return getPortal().getExpandoBridgeAttributes(
929 expandoBridge, uploadPortletRequest);
930 }
931
932 public static Serializable getExpandoValue(
933 HttpServletRequest request, String name, int type,
934 String displayType)
935 throws PortalException {
936
937 return getPortal().getExpandoValue(request, name, type, displayType);
938 }
939
940 public static Serializable getExpandoValue(
941 PortletRequest portletRequest, String name, int type,
942 String displayType)
943 throws PortalException {
944
945 return getPortal().getExpandoValue(
946 portletRequest, name, type, displayType);
947 }
948
949 public static Serializable getExpandoValue(
950 UploadPortletRequest uploadPortletRequest, String name, int type,
951 String displayType)
952 throws PortalException {
953
954 return getPortal().getExpandoValue(
955 uploadPortletRequest, name, type, displayType);
956 }
957
958 public static String getFacebookURL(
959 Portlet portlet, String facebookCanvasPageURL,
960 ThemeDisplay themeDisplay)
961 throws PortalException {
962
963 return getPortal().getFacebookURL(
964 portlet, facebookCanvasPageURL, themeDisplay);
965 }
966
967 public static String getFirstPageLayoutTypes(HttpServletRequest request) {
968 return getPortal().getFirstPageLayoutTypes(request);
969 }
970
971 public static String getFullName(
972 String firstName, String middleName, String lastName) {
973
974 return getPortal().getFullName(firstName, middleName, lastName);
975 }
976
977 public static String getGlobalLibDir() {
978 return getPortal().getGlobalLibDir();
979 }
980
981 public static String getGoogleGadgetURL(
982 Portlet portlet, ThemeDisplay themeDisplay)
983 throws PortalException {
984
985 return getPortal().getGoogleGadgetURL(portlet, themeDisplay);
986 }
987
988 public static String getGroupFriendlyURL(
989 LayoutSet layoutSet, ThemeDisplay themeDisplay)
990 throws PortalException {
991
992 return getPortal().getGroupFriendlyURL(layoutSet, themeDisplay);
993 }
994
995 public static String getGroupFriendlyURL(
996 LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale)
997 throws PortalException {
998
999 return getPortal().getGroupFriendlyURL(layoutSet, themeDisplay, locale);
1000 }
1001
1002 public static int[] getGroupFriendlyURLIndex(String requestURI) {
1003 return getPortal().getGroupFriendlyURLIndex(requestURI);
1004 }
1005
1006 public static String[] getGroupPermissions(HttpServletRequest request) {
1007 return getPortal().getGroupPermissions(request);
1008 }
1009
1010 public static String[] getGroupPermissions(
1011 HttpServletRequest request, String className) {
1012
1013 return getPortal().getGroupPermissions(request, className);
1014 }
1015
1016 public static String[] getGroupPermissions(PortletRequest portletRequest) {
1017 return getPortal().getGroupPermissions(portletRequest);
1018 }
1019
1020 public static String[] getGroupPermissions(
1021 PortletRequest portletRequest, String className) {
1022
1023 return getPortal().getGroupPermissions(portletRequest, className);
1024 }
1025
1026 public static String[] getGuestPermissions(HttpServletRequest request) {
1027 return getPortal().getGuestPermissions(request);
1028 }
1029
1030 public static String[] getGuestPermissions(
1031 HttpServletRequest request, String className) {
1032
1033 return getPortal().getGuestPermissions(request, className);
1034 }
1035
1036 public static String[] getGuestPermissions(PortletRequest portletRequest) {
1037 return getPortal().getGuestPermissions(portletRequest);
1038 }
1039
1040 public static String[] getGuestPermissions(
1041 PortletRequest portletRequest, String className) {
1042
1043 return getPortal().getGuestPermissions(portletRequest, className);
1044 }
1045
1046 public static String getHomeURL(HttpServletRequest request)
1047 throws PortalException {
1048
1049 return getPortal().getHomeURL(request);
1050 }
1051
1052 public static String getHost(HttpServletRequest request) {
1053 return getPortal().getHost(request);
1054 }
1055
1056 public static String getHost(PortletRequest portletRequest) {
1057 return getPortal().getHost(portletRequest);
1058 }
1059
1060 public static HttpServletRequest getHttpServletRequest(
1061 PortletRequest portletRequest) {
1062
1063 return getPortal().getHttpServletRequest(portletRequest);
1064 }
1065
1066 public static HttpServletResponse getHttpServletResponse(
1067 PortletResponse portletResponse) {
1068
1069 return getPortal().getHttpServletResponse(portletResponse);
1070 }
1071
1072 public static String getI18nPathLanguageId(
1073 Locale locale, String defaultI18nPathLanguageId) {
1074
1075 return getPortal().getI18nPathLanguageId(
1076 locale, defaultI18nPathLanguageId);
1077 }
1078
1079
1082 @Deprecated
1083 public static String getJournalArticleActualURL(
1084 long groupId, boolean privateLayout, String mainPath,
1085 String friendlyURL, Map<String, String[]> params,
1086 Map<String, Object> requestContext)
1087 throws PortalException {
1088
1089 return getPortal().getJournalArticleActualURL(
1090 groupId, privateLayout, mainPath, friendlyURL, params,
1091 requestContext);
1092 }
1093
1094
1097 @Deprecated
1098 public static Layout getJournalArticleLayout(
1099 long groupId, boolean privateLayout, String friendlyURL)
1100 throws PortalException {
1101
1102 return getPortal().getJournalArticleLayout(
1103 groupId, privateLayout, friendlyURL);
1104 }
1105
1106 public static String getJsSafePortletId(String portletId) {
1107 return getPortal().getJsSafePortletId(portletId);
1108 }
1109
1110 public static String getLayoutActualURL(Layout layout) {
1111 return getPortal().getLayoutActualURL(layout);
1112 }
1113
1114 public static String getLayoutActualURL(Layout layout, String mainPath) {
1115 return getPortal().getLayoutActualURL(layout, mainPath);
1116 }
1117
1118 public static String getLayoutActualURL(
1119 long groupId, boolean privateLayout, String mainPath,
1120 String friendlyURL)
1121 throws PortalException {
1122
1123 return getPortal().getLayoutActualURL(
1124 groupId, privateLayout, mainPath, friendlyURL);
1125 }
1126
1127 public static String getLayoutActualURL(
1128 long groupId, boolean privateLayout, String mainPath,
1129 String friendlyURL, Map<String, String[]> params,
1130 Map<String, Object> requestContext)
1131 throws PortalException {
1132
1133 return getPortal().getLayoutActualURL(
1134 groupId, privateLayout, mainPath, friendlyURL, params,
1135 requestContext);
1136 }
1137
1138 public static String getLayoutFriendlyURL(
1139 Layout layout, ThemeDisplay themeDisplay)
1140 throws PortalException {
1141
1142 return getPortal().getLayoutFriendlyURL(layout, themeDisplay);
1143 }
1144
1145 public static String getLayoutFriendlyURL(
1146 Layout layout, ThemeDisplay themeDisplay, Locale locale)
1147 throws PortalException {
1148
1149 return getPortal().getLayoutFriendlyURL(layout, themeDisplay, locale);
1150 }
1151
1152 public static LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(
1153 long groupId, boolean privateLayout, String friendlyURL,
1154 Map<String, String[]> params, Map<String, Object> requestContext)
1155 throws PortalException {
1156
1157 return getPortal().getLayoutFriendlyURLComposite(
1158 groupId, privateLayout, friendlyURL, params, requestContext);
1159 }
1160
1161 public static String getLayoutFullURL(
1162 Layout layout, ThemeDisplay themeDisplay)
1163 throws PortalException {
1164
1165 return getPortal().getLayoutFullURL(layout, themeDisplay);
1166 }
1167
1168 public static String getLayoutFullURL(
1169 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1170 throws PortalException {
1171
1172 return getPortal().getLayoutFullURL(layout, themeDisplay, doAsUser);
1173 }
1174
1175 public static String getLayoutFullURL(long groupId, String portletId)
1176 throws PortalException {
1177
1178 return getPortal().getLayoutFullURL(groupId, portletId);
1179 }
1180
1181 public static String getLayoutFullURL(
1182 long groupId, String portletId, boolean secure)
1183 throws PortalException {
1184
1185 return getPortal().getLayoutFullURL(groupId, portletId, secure);
1186 }
1187
1188 public static String getLayoutFullURL(ThemeDisplay themeDisplay)
1189 throws PortalException {
1190
1191 return getPortal().getLayoutFullURL(themeDisplay);
1192 }
1193
1194 public static String getLayoutRelativeURL(
1195 Layout layout, ThemeDisplay themeDisplay)
1196 throws PortalException {
1197
1198 return getPortal().getLayoutRelativeURL(layout, themeDisplay);
1199 }
1200
1201 public static String getLayoutRelativeURL(
1202 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1203 throws PortalException {
1204
1205 return getPortal().getLayoutRelativeURL(layout, themeDisplay, doAsUser);
1206 }
1207
1208 public static String getLayoutSetFriendlyURL(
1209 LayoutSet layoutSet, ThemeDisplay themeDisplay)
1210 throws PortalException {
1211
1212 return getPortal().getLayoutSetFriendlyURL(layoutSet, themeDisplay);
1213 }
1214
1215 public static String getLayoutTarget(Layout layout) {
1216 return getPortal().getLayoutTarget(layout);
1217 }
1218
1219 public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
1220 throws PortalException {
1221
1222 return getPortal().getLayoutURL(layout, themeDisplay);
1223 }
1224
1225 public static String getLayoutURL(
1226 Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
1227 throws PortalException {
1228
1229 return getPortal().getLayoutURL(layout, themeDisplay, doAsUser);
1230 }
1231
1232 public static String getLayoutURL(
1233 Layout layout, ThemeDisplay themeDisplay, Locale locale)
1234 throws PortalException {
1235
1236 return getPortal().getLayoutURL(layout, themeDisplay, locale);
1237 }
1238
1239 public static String getLayoutURL(ThemeDisplay themeDisplay)
1240 throws PortalException {
1241
1242 return getPortal().getLayoutURL(themeDisplay);
1243 }
1244
1245 public static LiferayPortletRequest getLiferayPortletRequest(
1246 PortletRequest portletRequest) {
1247
1248 return getPortal().getLiferayPortletRequest(portletRequest);
1249 }
1250
1251 public static LiferayPortletResponse getLiferayPortletResponse(
1252 PortletResponse portletResponse) {
1253
1254 return getPortal().getLiferayPortletResponse(portletResponse);
1255 }
1256
1257 public static Locale getLocale(HttpServletRequest request) {
1258 return getPortal().getLocale(request);
1259 }
1260
1261 public static Locale getLocale(
1262 HttpServletRequest request, HttpServletResponse response,
1263 boolean initialize) {
1264
1265 return getPortal().getLocale(request, response, initialize);
1266 }
1267
1268 public static Locale getLocale(PortletRequest portletRequest) {
1269 return getPortal().getLocale(portletRequest);
1270 }
1271
1272 public static String getLocalizedFriendlyURL(
1273 HttpServletRequest request, Layout layout, Locale locale,
1274 Locale originalLocale)
1275 throws Exception {
1276
1277 return getPortal().getLocalizedFriendlyURL(
1278 request, layout, locale, originalLocale);
1279 }
1280
1281 public static String getMailId(
1282 String mx, String popPortletPrefix, Object... ids) {
1283
1284 return getPortal().getMailId(mx, popPortletPrefix, ids);
1285 }
1286
1287
1291 @Deprecated
1292 public static BaseModel<?> getModel(ResourcePermission resourcePermission)
1293 throws PortalException {
1294
1295 return getPortal().getBaseModel(resourcePermission);
1296 }
1297
1298
1302 @Deprecated
1303 public static BaseModel<?> getModel(String modelName, String primKey)
1304 throws PortalException {
1305
1306 return getPortal().getBaseModel(modelName, primKey);
1307 }
1308
1309 public static String getNetvibesURL(
1310 Portlet portlet, ThemeDisplay themeDisplay)
1311 throws PortalException {
1312
1313 return getPortal().getNetvibesURL(portlet, themeDisplay);
1314 }
1315
1316 public static String getNewPortletTitle(
1317 String portletTitle, String oldScopeName, String newScopeName) {
1318
1319 return getPortal().getNewPortletTitle(
1320 portletTitle, oldScopeName, newScopeName);
1321 }
1322
1323 public static HttpServletRequest getOriginalServletRequest(
1324 HttpServletRequest request) {
1325
1326 return getPortal().getOriginalServletRequest(request);
1327 }
1328
1329
1332 @Deprecated
1333 public static long getParentGroupId(long scopeGroupId) {
1334 return getPortal().getParentGroupId(scopeGroupId);
1335 }
1336
1337 public static String getPathContext() {
1338 return getPortal().getPathContext();
1339 }
1340
1341 public static String getPathContext(HttpServletRequest request) {
1342 return getPortal().getPathContext(request);
1343 }
1344
1345 public static String getPathContext(PortletRequest portletRequest) {
1346 return getPortal().getPathContext(portletRequest);
1347 }
1348
1349 public static String getPathContext(String contextPath) {
1350 return getPortal().getPathContext(contextPath);
1351 }
1352
1353 public static String getPathFriendlyURLPrivateGroup() {
1354 return getPortal().getPathFriendlyURLPrivateGroup();
1355 }
1356
1357 public static String getPathFriendlyURLPrivateUser() {
1358 return getPortal().getPathFriendlyURLPrivateUser();
1359 }
1360
1361 public static String getPathFriendlyURLPublic() {
1362 return getPortal().getPathFriendlyURLPublic();
1363 }
1364
1365 public static String getPathImage() {
1366 return getPortal().getPathImage();
1367 }
1368
1369 public static String getPathMain() {
1370 return getPortal().getPathMain();
1371 }
1372
1373 public static String getPathModule() {
1374 return getPortal().getPathModule();
1375 }
1376
1377 public static String getPathProxy() {
1378 return getPortal().getPathProxy();
1379 }
1380
1381 public static long getPlidFromFriendlyURL(
1382 long companyId, String friendlyURL) {
1383
1384 return getPortal().getPlidFromFriendlyURL(companyId, friendlyURL);
1385 }
1386
1387 public static long getPlidFromPortletId(
1388 long groupId, boolean privateLayout, String portletId)
1389 throws PortalException {
1390
1391 return getPortal().getPlidFromPortletId(
1392 groupId, privateLayout, portletId);
1393 }
1394
1395 public static long getPlidFromPortletId(long groupId, String portletId)
1396 throws PortalException {
1397
1398 return getPortal().getPlidFromPortletId(groupId, portletId);
1399 }
1400
1401 public static Portal getPortal() {
1402 PortalRuntimePermission.checkGetBeanProperty(PortalUtil.class);
1403
1404 return _portal;
1405 }
1406
1407 public static PortalInetSocketAddressEventListener[]
1408 getPortalInetSocketAddressEventListeners() {
1409
1410 return getPortal().getPortalInetSocketAddressEventListeners();
1411 }
1412
1413 public static String getPortalLibDir() {
1414 return getPortal().getPortalLibDir();
1415 }
1416
1417 public static InetAddress getPortalLocalInetAddress(boolean secure) {
1418 return getPortal().getPortalLocalInetAddress(secure);
1419 }
1420
1421 public static int getPortalLocalPort(boolean secure) {
1422 return getPortal().getPortalLocalPort(secure);
1423 }
1424
1425
1428 @Deprecated
1429 public static int getPortalPort() {
1430 return getPortal().getPortalPort();
1431 }
1432
1433
1437 @Deprecated
1438 public static int getPortalPort(boolean secure) {
1439 return getPortal().getPortalPort(secure);
1440 }
1441
1442 public static Properties getPortalProperties() {
1443 return getPortal().getPortalProperties();
1444 }
1445
1446 public static InetAddress getPortalServerInetAddress(boolean secure) {
1447 return getPortal().getPortalServerInetAddress(secure);
1448 }
1449
1450 public static int getPortalServerPort(boolean secure) {
1451 return getPortal().getPortalServerPort(secure);
1452 }
1453
1454 public static String getPortalURL(HttpServletRequest request) {
1455 return getPortal().getPortalURL(request);
1456 }
1457
1458 public static String getPortalURL(
1459 HttpServletRequest request, boolean secure) {
1460
1461 return getPortal().getPortalURL(request, secure);
1462 }
1463
1464 public static String getPortalURL(Layout layout, ThemeDisplay themeDisplay)
1465 throws PortalException {
1466
1467 return getPortal().getPortalURL(layout, themeDisplay);
1468 }
1469
1470 public static String getPortalURL(PortletRequest portletRequest) {
1471 return getPortal().getPortalURL(portletRequest);
1472 }
1473
1474 public static String getPortalURL(
1475 PortletRequest portletRequest, boolean secure) {
1476
1477 return getPortal().getPortalURL(portletRequest, secure);
1478 }
1479
1480 public static String getPortalURL(
1481 String serverName, int serverPort, boolean secure) {
1482
1483 return getPortal().getPortalURL(serverName, serverPort, secure);
1484 }
1485
1486 public static String getPortalURL(ThemeDisplay themeDisplay)
1487 throws PortalException {
1488
1489 return getPortal().getPortalURL(themeDisplay);
1490 }
1491
1492 public static String getPortalWebDir() {
1493 return getPortal().getPortalWebDir();
1494 }
1495
1496
1500 @Deprecated
1501 public static Set<String> getPortletAddDefaultResourceCheckWhitelist() {
1502 return getPortal().getPortletAddDefaultResourceCheckWhitelist();
1503 }
1504
1505
1509 @Deprecated
1510 public static Set<String>
1511 getPortletAddDefaultResourceCheckWhitelistActions() {
1512
1513 return getPortal().getPortletAddDefaultResourceCheckWhitelistActions();
1514 }
1515
1516
1520 @Deprecated
1521 public static List<BreadcrumbEntry> getPortletBreadcrumbList(
1522 HttpServletRequest request) {
1523
1524 return getPortal().getPortletBreadcrumbList(request);
1525 }
1526
1527
1532 @Deprecated
1533 public static List<BreadcrumbEntry> getPortletBreadcrumbs(
1534 HttpServletRequest request) {
1535
1536 return getPortal().getPortletBreadcrumbs(request);
1537 }
1538
1539 public static PortletConfig getPortletConfig(
1540 long companyId, String portletId, ServletContext servletContext)
1541 throws PortletException {
1542
1543 Portlet portlet = PortletLocalServiceUtil.getPortletById(
1544 companyId, portletId);
1545
1546 InvokerPortlet invokerPortlet = PortletInstanceFactoryUtil.create(
1547 portlet, servletContext);
1548
1549 return invokerPortlet.getPortletConfig();
1550 }
1551
1552 public static String getPortletDescription(
1553 Portlet portlet, ServletContext servletContext, Locale locale) {
1554
1555 return getPortal().getPortletDescription(
1556 portlet, servletContext, locale);
1557 }
1558
1559 public static String getPortletDescription(Portlet portlet, User user) {
1560 return getPortal().getPortletDescription(portlet, user);
1561 }
1562
1563 public static String getPortletDescription(
1564 String portletId, Locale locale) {
1565
1566 return getPortal().getPortletDescription(portletId, locale);
1567 }
1568
1569 public static String getPortletDescription(
1570 String portletId, String languageId) {
1571
1572 return getPortal().getPortletDescription(portletId, languageId);
1573 }
1574
1575 public static String getPortletDescription(String portletId, User user) {
1576 return getPortal().getPortletDescription(portletId, user);
1577 }
1578
1579 public static String getPortletId(HttpServletRequest request) {
1580 return getPortal().getPortletId(request);
1581 }
1582
1583 public static String getPortletId(PortletRequest portletRequest) {
1584 return getPortal().getPortletId(portletRequest);
1585 }
1586
1587 public static String getPortletLongTitle(Portlet portlet, Locale locale) {
1588 return getPortal().getPortletLongTitle(portlet, locale);
1589 }
1590
1591 public static String getPortletLongTitle(
1592 Portlet portlet, ServletContext servletContext, Locale locale) {
1593
1594 return getPortal().getPortletLongTitle(portlet, servletContext, locale);
1595 }
1596
1597 public static String getPortletLongTitle(
1598 Portlet portlet, String languageId) {
1599
1600 return getPortal().getPortletLongTitle(portlet, languageId);
1601 }
1602
1603 public static String getPortletLongTitle(Portlet portlet, User user) {
1604 return getPortal().getPortletLongTitle(portlet, user);
1605 }
1606
1607 public static String getPortletLongTitle(String portletId, Locale locale) {
1608 return getPortal().getPortletLongTitle(portletId, locale);
1609 }
1610
1611 public static String getPortletLongTitle(
1612 String portletId, String languageId) {
1613
1614 return getPortal().getPortletLongTitle(portletId, languageId);
1615 }
1616
1617 public static String getPortletLongTitle(String portletId, User user) {
1618 return getPortal().getPortletLongTitle(portletId, user);
1619 }
1620
1621 public static String getPortletNamespace(String portletId) {
1622 return getPortal().getPortletNamespace(portletId);
1623 }
1624
1625 public static String getPortletTitle(Portlet portlet, Locale locale) {
1626 return getPortal().getPortletTitle(portlet, locale);
1627 }
1628
1629 public static String getPortletTitle(
1630 Portlet portlet, ServletContext servletContext, Locale locale) {
1631
1632 return getPortal().getPortletTitle(portlet, servletContext, locale);
1633 }
1634
1635 public static String getPortletTitle(Portlet portlet, String languageId) {
1636 return getPortal().getPortletTitle(portlet, languageId);
1637 }
1638
1639 public static String getPortletTitle(Portlet portlet, User user) {
1640 return getPortal().getPortletTitle(portlet, user);
1641 }
1642
1643 public static String getPortletTitle(PortletRequest portletRequest) {
1644 return getPortal().getPortletTitle(portletRequest);
1645 }
1646
1647 public static String getPortletTitle(PortletResponse portletResponse) {
1648 return getPortal().getPortletTitle(portletResponse);
1649 }
1650
1651 public static String getPortletTitle(String portletId, Locale locale) {
1652 return getPortal().getPortletTitle(portletId, locale);
1653 }
1654
1655 public static String getPortletTitle(
1656 String portletId, ResourceBundle resourceBundle) {
1657
1658 return getPortal().getPortletTitle(portletId, resourceBundle);
1659 }
1660
1661 public static String getPortletTitle(String portletId, String languageId) {
1662 return getPortal().getPortletTitle(portletId, languageId);
1663 }
1664
1665 public static String getPortletTitle(String portletId, User user) {
1666 return getPortal().getPortletTitle(portletId, user);
1667 }
1668
1669 public static String getPortletXmlFileName() {
1670 return getPortal().getPortletXmlFileName();
1671 }
1672
1673 public static PortletPreferences getPreferences(
1674 HttpServletRequest request) {
1675
1676 return getPortal().getPreferences(request);
1677 }
1678
1679 public static PreferencesValidator getPreferencesValidator(
1680 Portlet portlet) {
1681
1682 return getPortal().getPreferencesValidator(portlet);
1683 }
1684
1685 public static String getRelativeHomeURL(HttpServletRequest request)
1686 throws PortalException {
1687
1688 return getPortal().getRelativeHomeURL(request);
1689 }
1690
1691 public static ResourceBundle getResourceBundle(Locale locale) {
1692 return getPortal().getResourceBundle(locale);
1693 }
1694
1695 public static long getScopeGroupId(HttpServletRequest request)
1696 throws PortalException {
1697
1698 return getPortal().getScopeGroupId(request);
1699 }
1700
1701 public static long getScopeGroupId(
1702 HttpServletRequest request, String portletId)
1703 throws PortalException {
1704
1705 return getPortal().getScopeGroupId(request, portletId);
1706 }
1707
1708 public static long getScopeGroupId(
1709 HttpServletRequest request, String portletId,
1710 boolean checkStagingGroup)
1711 throws PortalException {
1712
1713 return getPortal().getScopeGroupId(
1714 request, portletId, checkStagingGroup);
1715 }
1716
1717 public static long getScopeGroupId(Layout layout) {
1718 return getPortal().getScopeGroupId(layout);
1719 }
1720
1721 public static long getScopeGroupId(Layout layout, String portletId) {
1722 return getPortal().getScopeGroupId(layout, portletId);
1723 }
1724
1725 public static long getScopeGroupId(long plid) {
1726 return getPortal().getScopeGroupId(plid);
1727 }
1728
1729 public static long getScopeGroupId(PortletRequest portletRequest)
1730 throws PortalException {
1731
1732 return getPortal().getScopeGroupId(portletRequest);
1733 }
1734
1735 public static User getSelectedUser(HttpServletRequest request)
1736 throws PortalException {
1737
1738 return getPortal().getSelectedUser(request);
1739 }
1740
1741 public static User getSelectedUser(
1742 HttpServletRequest request, boolean checkPermission)
1743 throws PortalException {
1744
1745 return getPortal().getSelectedUser(request, checkPermission);
1746 }
1747
1748 public static User getSelectedUser(PortletRequest portletRequest)
1749 throws PortalException {
1750
1751 return getPortal().getSelectedUser(portletRequest);
1752 }
1753
1754 public static User getSelectedUser(
1755 PortletRequest portletRequest, boolean checkPermission)
1756 throws PortalException {
1757
1758 return getPortal().getSelectedUser(portletRequest, checkPermission);
1759 }
1760
1761 public static String getServletContextName() {
1762 return getPortal().getServletContextName();
1763 }
1764
1765 public static long[] getSharedContentSiteGroupIds(
1766 long companyId, long groupId, long userId)
1767 throws PortalException {
1768
1769 return getPortal().getSharedContentSiteGroupIds(
1770 companyId, groupId, userId);
1771 }
1772
1773
1778 @Deprecated
1779 public static PortletURL getSiteAdministrationURL(
1780 HttpServletRequest request, ThemeDisplay themeDisplay,
1781 String portletId) {
1782
1783 return getPortal().getSiteAdministrationURL(
1784 request, themeDisplay, portletId);
1785 }
1786
1787
1792 @Deprecated
1793 public static PortletURL getSiteAdministrationURL(
1794 PortletResponse portletResponse, ThemeDisplay themeDisplay,
1795 String portletName) {
1796
1797 return getPortal().getSiteAdministrationURL(
1798 portletResponse, themeDisplay, portletName);
1799 }
1800
1801
1805 @Deprecated
1806 public static long[] getSiteAndCompanyGroupIds(long groupId)
1807 throws PortalException {
1808
1809 return getPortal().getSiteAndCompanyGroupIds(groupId);
1810 }
1811
1812
1816 @Deprecated
1817 public static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
1818 throws PortalException {
1819
1820 return getPortal().getSiteAndCompanyGroupIds(themeDisplay);
1821 }
1822
1823 public static Locale getSiteDefaultLocale(long groupId)
1824 throws PortalException {
1825
1826 return getPortal().getSiteDefaultLocale(groupId);
1827 }
1828
1829 public static long getSiteGroupId(long scopeGroupId) {
1830 return getPortal().getSiteGroupId(scopeGroupId);
1831 }
1832
1833 public static String getSiteLoginURL(ThemeDisplay themeDisplay)
1834 throws PortalException {
1835
1836 return getPortal().getSiteLoginURL(themeDisplay);
1837 }
1838
1839 public static String getStaticResourceURL(
1840 HttpServletRequest request, String uri) {
1841
1842 return getPortal().getStaticResourceURL(request, uri);
1843 }
1844
1845 public static String getStaticResourceURL(
1846 HttpServletRequest request, String uri, long timestamp) {
1847
1848 return getPortal().getStaticResourceURL(request, uri, timestamp);
1849 }
1850
1851 public static String getStaticResourceURL(
1852 HttpServletRequest request, String uri, String queryString) {
1853
1854 return getPortal().getStaticResourceURL(request, uri, queryString);
1855 }
1856
1857 public static String getStaticResourceURL(
1858 HttpServletRequest request, String uri, String queryString,
1859 long timestamp) {
1860
1861 return getPortal().getStaticResourceURL(
1862 request, uri, queryString, timestamp);
1863 }
1864
1865 public static String getStrutsAction(HttpServletRequest request) {
1866 return getPortal().getStrutsAction(request);
1867 }
1868
1869 public static String[] getSystemGroups() {
1870 return getPortal().getSystemGroups();
1871 }
1872
1873 public static String[] getSystemOrganizationRoles() {
1874 return getPortal().getSystemOrganizationRoles();
1875 }
1876
1877 public static String[] getSystemRoles() {
1878 return getPortal().getSystemRoles();
1879 }
1880
1881 public static String[] getSystemSiteRoles() {
1882 return getPortal().getSystemSiteRoles();
1883 }
1884
1885 public static String getUniqueElementId(
1886 HttpServletRequest request, String namespace, String id) {
1887
1888 return getPortal().getUniqueElementId(request, namespace, id);
1889 }
1890
1891 public static String getUniqueElementId(
1892 PortletRequest request, String namespace, String id) {
1893
1894 return getPortal().getUniqueElementId(request, namespace, id);
1895 }
1896
1897 public static UploadPortletRequest getUploadPortletRequest(
1898 PortletRequest portletRequest) {
1899
1900 return getPortal().getUploadPortletRequest(portletRequest);
1901 }
1902
1903 public static UploadServletRequest getUploadServletRequest(
1904 HttpServletRequest request) {
1905
1906 return getPortal().getUploadServletRequest(request);
1907 }
1908
1909 public static Date getUptime() {
1910 return getPortal().getUptime();
1911 }
1912
1913 public static String getURLWithSessionId(String url, String sessionId) {
1914 return getPortal().getURLWithSessionId(url, sessionId);
1915 }
1916
1917 public static User getUser(HttpServletRequest request)
1918 throws PortalException {
1919
1920 return getPortal().getUser(request);
1921 }
1922
1923 public static User getUser(PortletRequest portletRequest)
1924 throws PortalException {
1925
1926 return getPortal().getUser(portletRequest);
1927 }
1928
1929 public static String getUserEmailAddress(long userId) {
1930 return getPortal().getUserEmailAddress(userId);
1931 }
1932
1933 public static long getUserId(HttpServletRequest request) {
1934 return getPortal().getUserId(request);
1935 }
1936
1937 public static long getUserId(PortletRequest portletRequest) {
1938 return getPortal().getUserId(portletRequest);
1939 }
1940
1941 public static String getUserName(BaseModel<?> baseModel) {
1942 return getPortal().getUserName(baseModel);
1943 }
1944
1945 public static String getUserName(long userId, String defaultUserName) {
1946 return getPortal().getUserName(userId, defaultUserName);
1947 }
1948
1949 public static String getUserName(
1950 long userId, String defaultUserName, HttpServletRequest request) {
1951
1952 return getPortal().getUserName(userId, defaultUserName, request);
1953 }
1954
1955 public static String getUserName(
1956 long userId, String defaultUserName, String userAttribute) {
1957
1958 return getPortal().getUserName(userId, defaultUserName, userAttribute);
1959 }
1960
1961 public static String getUserName(
1962 long userId, String defaultUserName, String userAttribute,
1963 HttpServletRequest request) {
1964
1965 return getPortal().getUserName(
1966 userId, defaultUserName, userAttribute, request);
1967 }
1968
1969 public static String getUserPassword(HttpServletRequest request) {
1970 return getPortal().getUserPassword(request);
1971 }
1972
1973 public static String getUserPassword(HttpSession session) {
1974 return getPortal().getUserPassword(session);
1975 }
1976
1977 public static String getUserPassword(PortletRequest portletRequest) {
1978 return getPortal().getUserPassword(portletRequest);
1979 }
1980
1981
1984 @Deprecated
1985 public static String getUserValue(
1986 long userId, String param, String defaultValue) {
1987
1988 return getPortal().getUserValue(userId, param, defaultValue);
1989 }
1990
1991 public static String getValidPortalDomain(long companyId, String domain) {
1992 return getPortal().getValidPortalDomain(companyId, domain);
1993 }
1994
1995 public static long getValidUserId(long companyId, long userId)
1996 throws PortalException {
1997
1998 return getPortal().getValidUserId(companyId, userId);
1999 }
2000
2001 public static String getVirtualHostname(LayoutSet layoutSet) {
2002 return getPortal().getVirtualHostname(layoutSet);
2003 }
2004
2005
2008 @Deprecated
2009 public static String getVirtualLayoutActualURL(
2010 long groupId, boolean privateLayout, String mainPath,
2011 String friendlyURL, Map<String, String[]> params,
2012 Map<String, Object> requestContext)
2013 throws PortalException {
2014
2015 return getPortal().getVirtualLayoutActualURL(
2016 groupId, privateLayout, mainPath, friendlyURL, params,
2017 requestContext);
2018 }
2019
2020
2023 @Deprecated
2024 public static LayoutFriendlyURLComposite
2025 getVirtualLayoutFriendlyURLComposite(
2026 boolean privateLayout, String friendlyURL,
2027 Map<String, String[]> params, Map<String, Object> requestContext)
2028 throws PortalException {
2029
2030 return getPortal().getVirtualLayoutFriendlyURLComposite(
2031 privateLayout, friendlyURL, params, requestContext);
2032 }
2033
2034 public static String getWidgetURL(
2035 Portlet portlet, ThemeDisplay themeDisplay)
2036 throws PortalException {
2037
2038 return getPortal().getWidgetURL(portlet, themeDisplay);
2039 }
2040
2041 public static void initCustomSQL() {
2042 getPortal().initCustomSQL();
2043 }
2044
2045 public static User initUser(HttpServletRequest request) throws Exception {
2046 return getPortal().initUser(request);
2047 }
2048
2049
2052 @Deprecated
2053 public static void invokeTaglibDiscussion(
2054 PortletConfig portletConfig, ActionRequest actionRequest,
2055 ActionResponse actionResponse)
2056 throws Exception {
2057
2058 getPortal().invokeTaglibDiscussion(
2059 portletConfig, actionRequest, actionResponse);
2060 }
2061
2062
2065 @Deprecated
2066 public static void invokeTaglibDiscussionPagination(
2067 PortletConfig portletConfig, ResourceRequest resourceRequest,
2068 ResourceResponse resourceResponse)
2069 throws IOException, PortletException {
2070
2071 getPortal().invokeTaglibDiscussionPagination(
2072 portletConfig, resourceRequest, resourceResponse);
2073 }
2074
2075
2078 @Deprecated
2079 public static boolean isAllowAddPortletDefaultResource(
2080 HttpServletRequest request, Portlet portlet)
2081 throws PortalException {
2082
2083 return getPortal().isAllowAddPortletDefaultResource(request, portlet);
2084 }
2085
2086 public static boolean isCDNDynamicResourcesEnabled(
2087 HttpServletRequest request)
2088 throws PortalException {
2089
2090 return getPortal().isCDNDynamicResourcesEnabled(request);
2091 }
2092
2093 public static boolean isCDNDynamicResourcesEnabled(long companyId) {
2094 return getPortal().isCDNDynamicResourcesEnabled(companyId);
2095 }
2096
2097
2100 @Deprecated
2101 public static boolean isCommunityAdmin(User user, long groupId)
2102 throws Exception {
2103
2104 return getPortal().isCommunityAdmin(user, groupId);
2105 }
2106
2107
2110 @Deprecated
2111 public static boolean isCommunityOwner(User user, long groupId)
2112 throws Exception {
2113
2114 return getPortal().isCommunityOwner(user, groupId);
2115 }
2116
2117 public static boolean isCompanyAdmin(User user) throws Exception {
2118 return getPortal().isCompanyAdmin(user);
2119 }
2120
2121 public static boolean isCompanyControlPanelPortlet(
2122 String portletId, String category, ThemeDisplay themeDisplay)
2123 throws PortalException {
2124
2125 return getPortal().isCompanyControlPanelPortlet(
2126 portletId, category, themeDisplay);
2127 }
2128
2129 public static boolean isCompanyControlPanelPortlet(
2130 String portletId, ThemeDisplay themeDisplay)
2131 throws PortalException {
2132
2133 return getPortal().isCompanyControlPanelPortlet(
2134 portletId, themeDisplay);
2135 }
2136
2137 public static boolean isControlPanelPortlet(
2138 String portletId, String category, ThemeDisplay themeDisplay) {
2139
2140 return getPortal().isControlPanelPortlet(
2141 portletId, category, themeDisplay);
2142 }
2143
2144 public static boolean isControlPanelPortlet(
2145 String portletId, ThemeDisplay themeDisplay) {
2146
2147 return getPortal().isControlPanelPortlet(portletId, themeDisplay);
2148 }
2149
2150 public static boolean isGroupAdmin(User user, long groupId)
2151 throws Exception {
2152
2153 return getPortal().isGroupAdmin(user, groupId);
2154 }
2155
2156 public static boolean isGroupFriendlyURL(
2157 String fullURL, String groupFriendlyURL, String layoutFriendlyURL) {
2158
2159 return getPortal().isGroupFriendlyURL(
2160 fullURL, groupFriendlyURL, layoutFriendlyURL);
2161 }
2162
2163 public static boolean isGroupOwner(User user, long groupId)
2164 throws Exception {
2165
2166 return getPortal().isGroupOwner(user, groupId);
2167 }
2168
2169 public static boolean isLayoutDescendant(Layout layout, long layoutId)
2170 throws PortalException {
2171
2172 return getPortal().isLayoutDescendant(layout, layoutId);
2173 }
2174
2175 public static boolean isLayoutSitemapable(Layout layout) {
2176 return getPortal().isLayoutSitemapable(layout);
2177 }
2178
2179 public static boolean isLoginRedirectRequired(HttpServletRequest request) {
2180 return getPortal().isLoginRedirectRequired(request);
2181 }
2182
2183 public static boolean isMethodGet(PortletRequest portletRequest) {
2184 return getPortal().isMethodGet(portletRequest);
2185 }
2186
2187 public static boolean isMethodPost(PortletRequest portletRequest) {
2188 return getPortal().isMethodPost(portletRequest);
2189 }
2190
2191 public static boolean isMultipartRequest(HttpServletRequest request) {
2192 return getPortal().isMultipartRequest(request);
2193 }
2194
2195 public static boolean isOmniadmin(long userId) {
2196 return getPortal().isOmniadmin(userId);
2197 }
2198
2199 public static boolean isOmniadmin(User user) {
2200 return getPortal().isOmniadmin(user);
2201 }
2202
2203 public static boolean isReservedParameter(String name) {
2204 return getPortal().isReservedParameter(name);
2205 }
2206
2207 public static boolean isRightToLeft(HttpServletRequest request) {
2208 return getPortal().isRightToLeft(request);
2209 }
2210
2211 public static boolean isRSSFeedsEnabled() {
2212 return getPortal().isRSSFeedsEnabled();
2213 }
2214
2215 public static boolean isSecure(HttpServletRequest request) {
2216 return getPortal().isSecure(request);
2217 }
2218
2219 public static boolean isSystemGroup(String groupName) {
2220 return getPortal().isSystemGroup(groupName);
2221 }
2222
2223 public static boolean isSystemRole(String roleName) {
2224 return getPortal().isSystemRole(roleName);
2225 }
2226
2227 public static boolean isUpdateAvailable() {
2228 return getPortal().isUpdateAvailable();
2229 }
2230
2231 public static boolean isValidResourceId(String resourceId) {
2232 return getPortal().isValidResourceId(resourceId);
2233 }
2234
2235 public static boolean removePortalEventListener(
2236 PortalInetSocketAddressEventListener
2237 portalInetSocketAddressEventListener) {
2238
2239 return getPortal().removePortalInetSocketAddressEventListener(
2240 portalInetSocketAddressEventListener);
2241 }
2242
2243 public static void resetCDNHosts() {
2244 getPortal().resetCDNHosts();
2245 }
2246
2247
2251 @Deprecated
2252 public static Set<String> resetPortletAddDefaultResourceCheckWhitelist() {
2253 return getPortal().resetPortletAddDefaultResourceCheckWhitelist();
2254 }
2255
2256
2260 @Deprecated
2261 public static Set<String>
2262 resetPortletAddDefaultResourceCheckWhitelistActions() {
2263
2264 return getPortal().
2265 resetPortletAddDefaultResourceCheckWhitelistActions();
2266 }
2267
2268 public static String resetPortletParameters(String url, String portletId) {
2269 return getPortal().resetPortletParameters(url, portletId);
2270 }
2271
2272
2275 @Deprecated
2276 public static void runSQL(String sql) throws IOException, SQLException {
2277 DBFactoryUtil.getDB().runSQL(sql);
2278 }
2279
2280 public static void sendError(
2281 Exception e, ActionRequest actionRequest,
2282 ActionResponse actionResponse)
2283 throws IOException {
2284
2285 getPortal().sendError(e, actionRequest, actionResponse);
2286 }
2287
2288 public static void sendError(
2289 Exception e, HttpServletRequest request,
2290 HttpServletResponse response)
2291 throws IOException, ServletException {
2292
2293 getPortal().sendError(e, request, response);
2294 }
2295
2296 public static void sendError(
2297 int status, Exception e, ActionRequest actionRequest,
2298 ActionResponse actionResponse)
2299 throws IOException {
2300
2301 getPortal().sendError(status, e, actionRequest, actionResponse);
2302 }
2303
2304 public static void sendError(
2305 int status, Exception e, HttpServletRequest request,
2306 HttpServletResponse response)
2307 throws IOException, ServletException {
2308
2309 getPortal().sendError(status, e, request, response);
2310 }
2311
2312 public static void sendRSSFeedsDisabledError(
2313 HttpServletRequest request, HttpServletResponse response)
2314 throws IOException, ServletException {
2315
2316 getPortal().sendRSSFeedsDisabledError(request, response);
2317 }
2318
2319 public static void sendRSSFeedsDisabledError(
2320 PortletRequest portletRequest, PortletResponse portletResponse)
2321 throws IOException, ServletException {
2322
2323 getPortal().sendRSSFeedsDisabledError(portletRequest, portletResponse);
2324 }
2325
2326
2330 public static void setPageDescription(
2331 String description, HttpServletRequest request) {
2332
2333 getPortal().setPageDescription(description, request);
2334 }
2335
2336
2339 public static void setPageKeywords(
2340 String keywords, HttpServletRequest request) {
2341
2342 getPortal().setPageKeywords(keywords, request);
2343 }
2344
2345
2348 public static void setPageSubtitle(
2349 String subtitle, HttpServletRequest request) {
2350
2351 getPortal().setPageSubtitle(subtitle, request);
2352 }
2353
2354
2358 public static void setPageTitle(String title, HttpServletRequest request) {
2359 getPortal().setPageTitle(title, request);
2360 }
2361
2362 public static void setPortalInetSocketAddresses(
2363 HttpServletRequest request) {
2364
2365 getPortal().setPortalInetSocketAddresses(request);
2366 }
2367
2368
2374 @Deprecated
2375 public static void setPortalPort(HttpServletRequest request) {
2376 getPortal().setPortalPort(request);
2377 }
2378
2379 public static void storePreferences(PortletPreferences portletPreferences)
2380 throws IOException, ValidatorException {
2381
2382 getPortal().storePreferences(portletPreferences);
2383 }
2384
2385 public static String[] stripURLAnchor(String url, String separator) {
2386 return getPortal().stripURLAnchor(url, separator);
2387 }
2388
2389 public static String transformCustomSQL(String sql) {
2390 return getPortal().transformCustomSQL(sql);
2391 }
2392
2393 public static String transformSQL(String sql) {
2394 return getPortal().transformSQL(sql);
2395 }
2396
2397 public static void updateImageId(
2398 BaseModel<?> baseModel, boolean hasImage, byte[] bytes,
2399 String fieldName, long maxSize, int maxHeight, int maxWidth)
2400 throws PortalException {
2401
2402 getPortal().updateImageId(
2403 baseModel, hasImage, bytes, fieldName, maxSize, maxHeight,
2404 maxWidth);
2405 }
2406
2407 public static PortletMode updatePortletMode(
2408 String portletId, User user, Layout layout, PortletMode portletMode,
2409 HttpServletRequest request)
2410 throws PortalException {
2411
2412 return getPortal().updatePortletMode(
2413 portletId, user, layout, portletMode, request);
2414 }
2415
2416 public static String updateRedirect(
2417 String redirect, String oldPath, String newPath) {
2418
2419 return getPortal().updateRedirect(redirect, oldPath, newPath);
2420 }
2421
2422 public static WindowState updateWindowState(
2423 String portletId, User user, Layout layout, WindowState windowState,
2424 HttpServletRequest request) {
2425
2426 return getPortal().updateWindowState(
2427 portletId, user, layout, windowState, request);
2428 }
2429
2430
2435 @Deprecated
2436 public void removePortalPortEventListener(
2437 PortalPortEventListener portalPortEventListener) {
2438
2439 getPortal().removePortalPortEventListener(portalPortEventListener);
2440 }
2441
2442 public void setPortal(Portal portal) {
2443 PortalRuntimePermission.checkSetBeanProperty(getClass());
2444
2445 _portal = portal;
2446 }
2447
2448 private static Portal _portal;
2449
2450 }