Class PortalUtil
- Author:
- Brian Wing Shun Chan, Eduardo Lundgren, Juan Fernández
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the description to the current meta description of the page in the request.static voidaddPageKeywords(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the keywords to the current meta keywords of the page in the request.static voidaddPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the subtitle to the current subtitle of the page in the request.static voidaddPageTitle(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the title to the current title of the page in the request.static voidaddPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url) Adds an entry to the portlet breadcrumbs for the page in the request.static voidaddPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url, Map<String, Object> data) Adds an entry to the portlet breadcrumbs for the page in the request.static voidaddPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url, Map<String, Object> data, boolean portletBreadcrumbEntry) Adds an entry to the portlet breadcrumbs for the page in the request.static voidaddPortletDefaultResource(long companyId, Layout layout, Portlet portlet) static voidaddPortletDefaultResource(javax.servlet.http.HttpServletRequest httpServletRequest, Portlet portlet) Adds the default resource permissions for the portlet to the page in the request.static StringaddPreservedParameters(ThemeDisplay themeDisplay, Layout layout, String url, boolean doAsUser) Adds the preserved parameters doAsGroupId and refererPlid to the URL, optionally adding doAsUserId and doAsUserLanguageId as well.static StringaddPreservedParameters(ThemeDisplay themeDisplay, String url) Adds the preserved parameters doAsUserId, doAsUserLanguageId, doAsGroupId, and refererPlid to the URL.static StringaddPreservedParameters(ThemeDisplay themeDisplay, String url, boolean typeControlPanel, boolean doAsUser) static voidcopyRequestParameters(ActionRequest actionRequest, ActionResponse actionResponse) Copies the request parameters to the render parameters, unless a parameter with that name already exists in the render parameters.static StringescapeRedirect(String url) Escapes the URL for use in a redirect and checks that security settings allow the URL is allowed for redirects.static StringgenerateRandomKey(javax.servlet.http.HttpServletRequest httpServletRequest, String input) Generates a random key to identify the request based on the input string.static StringgetAbsoluteURL(javax.servlet.http.HttpServletRequest httpServletRequest, String url) static LayoutQueryStringCompositegetActualLayoutQueryStringComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static StringgetActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static StringgetAlternateURL(String canonicalURL, ThemeDisplay themeDisplay, Locale locale, Layout layout) Returns the alternate URL for the requested canonical URL in the given locale.getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout) getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout, Set<Locale> availableLocales) static long[]getAncestorSiteGroupIds(long groupId) static StringgetCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout) Returns the canonical URL for the page.static StringgetCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL) Returns the canonical URL of the page, optionally including the page's friendly URL.static StringgetCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL, boolean includeQueryString) Returns the canonical URL of the page.static StringgetCDNHost(boolean secure) Returns the secure (HTTPS) or insecure (HTTP) content distribution network (CDN) host address for this portal.static StringgetCDNHost(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetCDNHostHttp(long companyId) Returns the insecure (HTTP) content distribution network (CDN) host addressstatic StringgetCDNHostHttps(long companyId) Returns the secure (HTTPS) content distribution network (CDN) host addressstatic StringgetClassName(long classNameId) Returns the fully qualified name of the class from its ID.static longgetClassNameId(Class<?> clazz) Returns the ID of the class from its class object.static longgetClassNameId(String value) Returns the ID of the class from its fully qualified name.static CompanygetCompany(PortletRequest portletRequest) static CompanygetCompany(javax.servlet.http.HttpServletRequest httpServletRequest) static longgetCompanyId(PortletRequest portletRequest) static longgetCompanyId(javax.servlet.http.HttpServletRequest httpServletRequest) static long[]static Stringstatic StringgetControlPanelFullURL(long scopeGroupId, String ppid, Map<String, String[]> params) static longgetControlPanelPlid(long companyId) static longgetControlPanelPlid(PortletRequest portletRequest) static PortletURLgetControlPanelPortletURL(PortletRequest portletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) static PortletURLgetControlPanelPortletURL(PortletRequest portletRequest, String portletId, String lifecycle) static PortletURLgetControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) static PortletURLgetControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, String lifecycle) static StringgetCreateAccountURL(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay) static long[]getCurrentAndAncestorSiteGroupIds(long groupId) static long[]getCurrentAndAncestorSiteGroupIds(long[] groupIds) static long[]getCurrentAndAncestorSiteGroupIds(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) static long[]getCurrentAndAncestorSiteGroupIds(long groupId, boolean checkContentSharingWithChildrenEnabled) getCurrentAndAncestorSiteGroups(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) getCurrentAndAncestorSiteGroups(long groupId, boolean checkContentSharingWithChildrenEnabled) static StringgetCurrentCompleteURL(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetCurrentURL(PortletRequest portletRequest) static StringgetCurrentURL(javax.servlet.http.HttpServletRequest httpServletRequest) static Stringstatic Stringstatic DategetDate(int month, int day, int year) Returns the date object for the specified month, day, and year, ornullif the date is invalid.static DategetDate(int month, int day, int year, int hour, int min, Class<? extends PortalException> clazz) Returns the date object for the specified month, day, year, hour, and minute, optionally throwing an exception if the date is invalid.static DategetDate(int month, int day, int year, int hour, int min, TimeZone timeZone, Class<? extends PortalException> clazz) Returns the date object for the specified month, day, year, hour, minute, and time zone, optionally throwing an exception if the date is invalid.static DategetDate(int month, int day, int year, Class<? extends PortalException> clazz) Returns the date object for the specified month, day, and year, optionally throwing an exception if the date is invalid.static DategetDate(int month, int day, int year, TimeZone timeZone, Class<? extends PortalException> clazz) Returns the date object for the specified month, day, year, and time zone, optionally throwing an exception if the date is invalid.static longstatic StringgetEmailFromAddress(PortletPreferences portletPreferences, long companyId, String defaultValue) static StringgetEmailFromName(PortletPreferences portletPreferences, long companyId, String defaultValue) static StringgetForwardedHost(javax.servlet.http.HttpServletRequest httpServletRequest) static intgetForwardedPort(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetFullName(String firstName, String middleName, String lastName) static StringgetGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay) static StringgetGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, boolean canonicalURL, boolean controlPanel) static StringgetGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale) static int[]getGroupFriendlyURLIndex(String requestURI) static StringgetHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetHost(PortletRequest portletRequest) static StringgetHost(javax.servlet.http.HttpServletRequest httpServletRequest) static javax.servlet.http.HttpServletRequestgetHttpServletRequest(PortletRequest portletRequest) static javax.servlet.http.HttpServletResponsegetHttpServletResponse(PortletResponse portletResponse) static StringgetI18nPathLanguageId(Locale locale, String defaultI18nPathLanguageId) static StringgetJsSafePortletId(String portletId) static StringgetLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static StringgetLayoutActualURL(Layout layout) static StringgetLayoutActualURL(Layout layout, String mainPath) static StringgetLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay) static StringgetLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) static StringgetLayoutFriendlyURL(ThemeDisplay themeDisplay) getLayoutFriendlyURLSeparatorComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static StringgetLayoutFullURL(long groupId, String portletId) static StringgetLayoutFullURL(long groupId, String portletId, boolean secure) static StringgetLayoutFullURL(Layout layout, ThemeDisplay themeDisplay) static StringgetLayoutFullURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) static StringgetLayoutFullURL(ThemeDisplay themeDisplay) static StringgetLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay) static StringgetLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) static StringgetLayoutSetDisplayURL(LayoutSet layoutSet, boolean secureConnection) static StringgetLayoutSetFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay) static StringgetLayoutTarget(Layout layout) static StringgetLayoutURL(Layout layout, ThemeDisplay themeDisplay) static StringgetLayoutURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) static StringgetLayoutURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) static StringgetLayoutURL(ThemeDisplay themeDisplay) static LiferayPortletRequestgetLiferayPortletRequest(PortletRequest portletRequest) static LiferayPortletResponsegetLiferayPortletResponse(PortletResponse portletResponse) static LocalegetLocale(PortletRequest portletRequest) static LocalegetLocale(javax.servlet.http.HttpServletRequest httpServletRequest) static LocalegetLocale(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean initialize) static Stringstatic StringgetNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay) static StringgetNewPortletTitle(String portletTitle, String oldScopeName, String newScopeName) static javax.servlet.http.HttpServletRequestgetOriginalServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest) static Stringstatic StringgetPathContext(String contextPath) static StringgetPathContext(PortletRequest portletRequest) static StringgetPathContext(javax.servlet.http.HttpServletRequest httpServletRequest) static Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic longgetPlidFromFriendlyURL(long companyId, String friendlyURL) static longgetPlidFromPortletId(long groupId, boolean privateLayout, String portletId) static longgetPlidFromPortletId(long groupId, String portletId) static Portalstatic intgetPortalLocalPort(boolean secure) static Propertiesstatic intgetPortalServerPort(boolean secure) static StringgetPortalURL(Layout layout, ThemeDisplay themeDisplay) static StringgetPortalURL(LayoutSet layoutSet, ThemeDisplay themeDisplay) static StringgetPortalURL(ThemeDisplay themeDisplay) static StringgetPortalURL(String serverName, int serverPort, boolean secure) static StringgetPortalURL(PortletRequest portletRequest) static StringgetPortalURL(PortletRequest portletRequest, boolean secure) static StringgetPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest, boolean secure) static PortletConfiggetPortletConfig(long companyId, String portletId, javax.servlet.ServletContext servletContext) static StringgetPortletDescription(Portlet portlet, User user) static StringgetPortletDescription(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) static StringgetPortletDescription(String portletId, User user) static StringgetPortletDescription(String portletId, String languageId) static StringgetPortletDescription(String portletId, Locale locale) static StringgetPortletId(PortletRequest portletRequest) static StringgetPortletId(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetPortletLongTitle(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) static StringgetPortletLongTitle(String portletId, Locale locale) static StringgetPortletNamespace(String portletId) static StringgetPortletTitle(Portlet portlet, User user) static StringgetPortletTitle(Portlet portlet, String languageId) static StringgetPortletTitle(Portlet portlet, Locale locale) static StringgetPortletTitle(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) static StringgetPortletTitle(String portletId, User user) static StringgetPortletTitle(String portletId, String languageId) static StringgetPortletTitle(String portletId, Locale locale) static StringgetPortletTitle(String portletId, ResourceBundle resourceBundle) static StringgetPortletTitle(PortletRequest portletRequest) static StringgetPortletTitle(PortletResponse portletResponse) static PortletPreferencesgetPreferences(javax.servlet.http.HttpServletRequest httpServletRequest) static PreferencesValidatorgetPreferencesValidator(Portlet portlet) static StringgetRelativeHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) static ResourceBundlegetResourceBundle(Locale locale) static longgetScopeGroupId(long plid) static longgetScopeGroupId(Layout layout) static longgetScopeGroupId(Layout layout, String portletId) static longgetScopeGroupId(PortletRequest portletRequest) static longgetScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest) static longgetScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId) static longgetScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, boolean checkStagingGroup) static UsergetSelectedUser(PortletRequest portletRequest) static UsergetSelectedUser(PortletRequest portletRequest, boolean checkPermission) static UsergetSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest) static UsergetSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest, boolean checkPermission) static Stringstatic long[]getSharedContentSiteGroupIds(long companyId, long groupId, long userId) static StringgetSiteAdminURL(ThemeDisplay themeDisplay, String ppid, Map<String, String[]> params) static LocalegetSiteDefaultLocale(long groupId) static LocalegetSiteDefaultLocale(Group group) static longgetSiteGroupId(long scopeGroupId) static StringgetSiteLoginURL(ThemeDisplay themeDisplay) static StringgetStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri) static StringgetStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, long timestamp) static StringgetStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString) static StringgetStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString, long timestamp) static StringgetStrutsAction(javax.servlet.http.HttpServletRequest httpServletRequest) static String[]static String[]static String[]static String[]static StringgetUniqueElementId(PortletRequest request, String namespace, String id) static StringgetUniqueElementId(javax.servlet.http.HttpServletRequest httpServletRequest, String namespace, String id) static UploadPortletRequestgetUploadPortletRequest(PortletRequest portletRequest) static UploadServletRequestgetUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest) static UploadServletRequestgetUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest, int fileSizeThreshold, String location) static Datestatic StringgetURLWithSessionId(String url, String sessionId) static UsergetUser(PortletRequest portletRequest) static UsergetUser(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetUserEmailAddress(long userId) static longgetUserId(PortletRequest portletRequest) static longgetUserId(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetUserName(long userId, String defaultUserName) static StringgetUserName(long userId, String defaultUserName, String userAttribute) static StringgetUserName(long userId, String defaultUserName, String userAttribute, javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetUserName(long userId, String defaultUserName, javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetUserName(BaseModel<?> baseModel) static StringgetUserPassword(PortletRequest portletRequest) static StringgetUserPassword(javax.servlet.http.HttpServletRequest httpServletRequest) static StringgetUserPassword(javax.servlet.http.HttpSession httpSession) static StringgetValidPortalDomain(long companyId, String domain) static longgetValidUserId(long companyId, long userId) getVirtualHostnames(LayoutSet layoutSet) static StringgetWidgetURL(Portlet portlet, ThemeDisplay themeDisplay) static UserinitUser(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanisCDNDynamicResourcesEnabled(long companyId) static booleanisCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanisCompanyAdmin(User user) static booleanisCustomPortletMode(PortletMode portletMode) static booleanisForwardedSecure(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanisGroupAdmin(User user, long groupId) static booleanstatic booleanisGroupFriendlyURL(String fullURL, String groupFriendlyURL, String layoutFriendlyURL) static booleanisGroupOwner(User user, long groupId) static booleanisLayoutDescendant(Layout layout, long layoutId) static booleanisLayoutSitemapable(Layout layout) static booleanisLoginRedirectRequired(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanisMultipartRequest(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanisOmniadmin(long userId) static booleanisOmniadmin(User user) static booleanisReservedParameter(String name) static booleanisRightToLeft(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanstatic booleanisSecure(javax.servlet.http.HttpServletRequest httpServletRequest) static booleanisSkipPortletContentRendering(Group group, LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay, String portletName) static booleanisSystemGroup(String groupName) static booleanisSystemRole(String roleName) static booleanisValidPortalDomain(long companyId, String domain) static booleanisValidResourceId(String resourceId) static voidstatic voidsendError(int status, Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) static voidsendError(int status, Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) static voidsendError(Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) static voidsendError(Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) static voidsendRSSFeedsDisabledError(PortletRequest portletRequest, PortletResponse portletResponse) static voidsendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) static voidsetPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the description for a page.static voidsetPageKeywords(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the keywords for a page.static voidsetPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the subtitle for a page.static voidsetPageTitle(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the whole title for a page.voidstatic voidsetPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest httpServletRequest) static String[]stripURLAnchor(String url, String separator) static StringtransformCustomSQL(String sql) static StringtransformSQL(String sql) static voidupdateImageId(BaseModel<?> baseModel, boolean hasImage, byte[] bytes, String fieldName, long maxSize, int maxHeight, int maxWidth) static PortletModeupdatePortletMode(String portletId, User user, Layout layout, PortletMode portletMode, javax.servlet.http.HttpServletRequest httpServletRequest) static StringupdateRedirect(String redirect, String oldPath, String newPath) static WindowStateupdateWindowState(String portletId, User user, Layout layout, WindowState windowState, javax.servlet.http.HttpServletRequest httpServletRequest)
-
Constructor Details
-
PortalUtil
public PortalUtil()
-
-
Method Details
-
addPageDescription
public static void addPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the description to the current meta description of the page in the request.- Parameters:
description- the description to append to the current meta descriptionhttpServletRequest- the servlet request for the page
-
addPageKeywords
public static void addPageKeywords(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the keywords to the current meta keywords of the page in the request.- Parameters:
keywords- the keywords to add to the current meta keywords (comma-separated)httpServletRequest- the servlet request for the page
-
addPageSubtitle
public static void addPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the subtitle to the current subtitle of the page in the request.- Parameters:
subtitle- the subtitle to append to the current subtitlehttpServletRequest- the servlet request for the page
-
addPageTitle
public static void addPageTitle(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the title to the current title of the page in the request.- Parameters:
title- the title to append to the current titlehttpServletRequest- the servlet request for the page
-
addPortletBreadcrumbEntry
public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url) Adds an entry to the portlet breadcrumbs for the page in the request.- Parameters:
httpServletRequest- the servlet request for the pagetitle- the title of the new breadcrumb entryurl- the URL of the new breadcrumb entry
-
addPortletBreadcrumbEntry
public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url, Map<String, Object> data) Adds an entry to the portlet breadcrumbs for the page in the request.- Parameters:
httpServletRequest- the servlet request for the pagetitle- the title of the new breadcrumb entryurl- the URL of the new breadcrumb entrydata- the HTML5 data parameters of the new breadcrumb entry
-
addPortletBreadcrumbEntry
public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url, Map<String, Object> data, boolean portletBreadcrumbEntry) Adds an entry to the portlet breadcrumbs for the page in the request.- Parameters:
httpServletRequest- the servlet request for the pagetitle- the title of the new breadcrumb entryurl- the URL of the new breadcrumb entrydata- the HTML5 data parameters of the new breadcrumb entryportletBreadcrumbEntry- whether the entry is a portlet breadcrumb entry
-
addPortletDefaultResource
public static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest httpServletRequest, Portlet portlet) throws PortalException Adds the default resource permissions for the portlet to the page in the request.- Parameters:
httpServletRequest- the servlet request for the pageportlet- the portlet- Throws:
PortalException- if a portal exception occurred
-
addPortletDefaultResource
public static void addPortletDefaultResource(long companyId, Layout layout, Portlet portlet) throws PortalException - Throws:
PortalException
-
addPreservedParameters
public static String addPreservedParameters(ThemeDisplay themeDisplay, Layout layout, String url, boolean doAsUser) Adds the preserved parameters doAsGroupId and refererPlid to the URL, optionally adding doAsUserId and doAsUserLanguageId as well.Preserved parameters are parameters that should be sent with every request as the user navigates the portal.
- Parameters:
themeDisplay- the current theme displaylayout- the current pageurl- the URLdoAsUser- whether to include doAsUserId and doAsLanguageId in the URL if they are available. Iffalse, doAsUserId and doAsUserLanguageId will never be added.- Returns:
- the URL with the preserved parameters added
-
addPreservedParameters
Adds the preserved parameters doAsUserId, doAsUserLanguageId, doAsGroupId, and refererPlid to the URL.- Parameters:
themeDisplay- the current theme displayurl- the URL- Returns:
- the URL with the preserved parameters added
-
addPreservedParameters
public static String addPreservedParameters(ThemeDisplay themeDisplay, String url, boolean typeControlPanel, boolean doAsUser) -
copyRequestParameters
public static void copyRequestParameters(ActionRequest actionRequest, ActionResponse actionResponse) Copies the request parameters to the render parameters, unless a parameter with that name already exists in the render parameters.- Parameters:
actionRequest- the request from which to get the request parametersactionResponse- the response to receive the render parameters
-
escapeRedirect
Escapes the URL for use in a redirect and checks that security settings allow the URL is allowed for redirects.- Parameters:
url- the URL to escape- Returns:
- the escaped URL, or
nullif the URL is not allowed for redirects
-
generateRandomKey
public static String generateRandomKey(javax.servlet.http.HttpServletRequest httpServletRequest, String input) Generates a random key to identify the request based on the input string.- Parameters:
httpServletRequest- the servlet request for the pageinput- the input string- Returns:
- the generated key
-
getAbsoluteURL
-
getActualLayoutQueryStringComposite
public static LayoutQueryStringComposite getActualLayoutQueryStringComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getActualURL
public static String getActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getAlternateURL
public static String getAlternateURL(String canonicalURL, ThemeDisplay themeDisplay, Locale locale, Layout layout) throws PortalException Returns the alternate URL for the requested canonical URL in the given locale.The alternate URL lets search engines know that an equivalent page is available for the given locale. For more information, see https://support.google.com/webmasters/answer/189077?hl=en.
- Parameters:
canonicalURL- the canonical URL being requested. For more information, seegetCanonicalURL(java.lang.String, com.liferay.portal.kernel.theme.ThemeDisplay, com.liferay.portal.kernel.model.Layout).themeDisplay- the theme displaylocale- the locale of the alternate URL being generatedlayout- the page being requested- Returns:
- the alternate URL for the requested canonical URL in the given locale
- Throws:
PortalException- if a portal exception occurred
-
getAlternateURLs
public static Map<Locale,String> getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout) throws PortalException - Throws:
PortalException
-
getAlternateURLs
public static Map<Locale,String> getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout, Set<Locale> availableLocales) throws PortalException - Throws:
PortalException
-
getAncestorSiteGroupIds
public static long[] getAncestorSiteGroupIds(long groupId) -
getCanonicalURL
public static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout) throws PortalException Returns the canonical URL for the page. The canonical URL is often used to distinguish a preferred page from its translations.A canonical URL for the page is the preferred URL to specify for a set of pages with similar or identical content. The canonical URL is used to inform search engines that several URLs point to the same page. It is also used to generate the URLs for site maps, the URLs that social bookmarks publish (Twitter, Facebook links, etc.), and the URLs in sent email. For more information, see https://support.google.com/webmasters/answer/139394?hl=en.
- Parameters:
completeURL- the complete URL of the pagethemeDisplay- the theme displaylayout- the page being requested (optionallynull). Ifnullis specified, the current page is used.- Returns:
- the canonical URL for the page
- Throws:
PortalException- if a portal exception occurred
-
getCanonicalURL
public static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL) throws PortalException Returns the canonical URL of the page, optionally including the page's friendly URL. The canonical URL is often used to distinguish a preferred page from its translations.A canonical URL for the page is the preferred URL to specify for a set of pages with similar or identical content. The canonical URL is used to inform search engines that several URLs point to the same page. It is also used to generate the URLs for site maps, the URLs that social bookmarks publish (Twitter, Facebook links, etc.), and the URLs in sent email. For more information, see https://support.google.com/webmasters/answer/139394?hl=en.
- Parameters:
completeURL- the complete URL of the pagethemeDisplay- the current theme displaylayout- the page. If it isnull, then it is generated for the current page.forceLayoutFriendlyURL- whether to add the page's friendly URL to the canonical URL- Returns:
- the canonical URL of the page
- Throws:
PortalException- if a portal exception occurred
-
getCanonicalURL
public static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL, boolean includeQueryString) throws PortalException Returns the canonical URL of the page. The canonical URL is often used to distinguish a preferred page from its translations.A page's canonical URL is the preferred URL to specify for a set of pages with similar or identical content. The canonical URL is used to inform search engines that several URLs point to the same page. It is also used to generate the URLs for site maps, the URLs that social bookmarks publish (Twitter, Facebook links, etc.), and the URLs in sent email. For more information, see https://support.google.com/webmasters/answer/139394?hl=en.
- Parameters:
completeURL- the complete URL of the pagethemeDisplay- the theme displaylayout- the page being requested (optionallynull). Ifnullis specified, the current page is used.forceLayoutFriendlyURL- whether to add the page's friendly URL to the canonical URLincludeQueryString- whether to add the URL query string to the canonical URL- Returns:
- the canonical URL
- Throws:
PortalException- if a portal exception occurred
-
getCDNHost
Returns the secure (HTTPS) or insecure (HTTP) content distribution network (CDN) host address for this portal.- Parameters:
secure- whether to get the secure CDN host address- Returns:
- the CDN host address
-
getCDNHost
public static String getCDNHost(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getCDNHostHttp
Returns the insecure (HTTP) content distribution network (CDN) host address- Parameters:
companyId- the company ID of a site- Returns:
- the CDN host address
-
getCDNHostHttps
Returns the secure (HTTPS) content distribution network (CDN) host address- Parameters:
companyId- the company ID of a site- Returns:
- the CDN host address
-
getClassName
Returns the fully qualified name of the class from its ID.- Parameters:
classNameId- the ID of the class- Returns:
- the fully qualified name of the class
-
getClassNameId
Returns the ID of the class from its class object.- Parameters:
clazz- the class object- Returns:
- the ID of the class
-
getClassNameId
Returns the ID of the class from its fully qualified name.- Parameters:
value- the fully qualified name of the class- Returns:
- the ID of the class
-
getCompany
public static Company getCompany(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getCompany
- Throws:
PortalException
-
getCompanyId
public static long getCompanyId(javax.servlet.http.HttpServletRequest httpServletRequest) -
getCompanyId
-
getCompanyIds
public static long[] getCompanyIds() -
getComputerAddresses
-
getComputerName
-
getControlPanelFullURL
public static String getControlPanelFullURL(long scopeGroupId, String ppid, Map<String, String[]> params) throws PortalException- Throws:
PortalException
-
getControlPanelPlid
- Throws:
PortalException
-
getControlPanelPlid
- Throws:
PortalException
-
getControlPanelPortletURL
public static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) -
getControlPanelPortletURL
public static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, String lifecycle) -
getControlPanelPortletURL
public static PortletURL getControlPanelPortletURL(PortletRequest portletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) -
getControlPanelPortletURL
public static PortletURL getControlPanelPortletURL(PortletRequest portletRequest, String portletId, String lifecycle) -
getCreateAccountURL
public static String getCreateAccountURL(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay) throws Exception - Throws:
Exception
-
getCurrentAndAncestorSiteGroupIds
public static long[] getCurrentAndAncestorSiteGroupIds(long groupId) -
getCurrentAndAncestorSiteGroupIds
public static long[] getCurrentAndAncestorSiteGroupIds(long groupId, boolean checkContentSharingWithChildrenEnabled) -
getCurrentAndAncestorSiteGroupIds
public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds) -
getCurrentAndAncestorSiteGroupIds
public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) -
getCurrentAndAncestorSiteGroups
-
getCurrentAndAncestorSiteGroups
-
getCurrentCompleteURL
public static String getCurrentCompleteURL(javax.servlet.http.HttpServletRequest httpServletRequest) -
getCurrentURL
-
getCurrentURL
-
getCustomSQLFunctionIsNotNull
-
getCustomSQLFunctionIsNull
-
getDate
Returns the date object for the specified month, day, and year, ornullif the date is invalid.- Parameters:
month- the month (0-based, meaning 0 for January)day- the day of the monthyear- the year- Returns:
- the date object, or
nullif the date is invalid
-
getDate
public static Date getDate(int month, int day, int year, Class<? extends PortalException> clazz) throws PortalException Returns the date object for the specified month, day, and year, optionally throwing an exception if the date is invalid.- Parameters:
month- the month (0-based, meaning 0 for January)day- the day of the monthyear- the yearclazz- the exception class to throw if the date is invalid. Ifnull, no exception will be thrown for an invalid date.- Returns:
- the date object, or
nullif the date is invalid and no exception to throw was provided - Throws:
PortalException- if a portal exception occurred
-
getDate
public static Date getDate(int month, int day, int year, int hour, int min, Class<? extends PortalException> clazz) throws PortalException Returns the date object for the specified month, day, year, hour, and minute, optionally throwing an exception if the date is invalid.- Parameters:
month- the month (0-based, meaning 0 for January)day- the day of the monthyear- the yearhour- the hour (0-24)min- the minute of the hourclazz- the exception class to throw if the date is invalid. Ifnull, no exception will be thrown for an invalid date.- Returns:
- the date object, or
nullif the date is invalid and no exception to throw was provided - Throws:
PortalException- if a portal exception occurred
-
getDate
public static Date getDate(int month, int day, int year, int hour, int min, TimeZone timeZone, Class<? extends PortalException> clazz) throws PortalException Returns the date object for the specified month, day, year, hour, minute, and time zone, optionally throwing an exception if the date is invalid.- Parameters:
month- the month (0-based, meaning 0 for January)day- the day of the monthyear- the yearhour- the hour (0-24)min- the minute of the hourtimeZone- the time zone of the dateclazz- the exception class to throw if the date is invalid. Ifnull, no exception will be thrown for an invalid date.- Returns:
- the date object, or
nullif the date is invalid and no exception to throw was provided - Throws:
PortalException- if a portal exception occurred
-
getDate
public static Date getDate(int month, int day, int year, TimeZone timeZone, Class<? extends PortalException> clazz) throws PortalException Returns the date object for the specified month, day, year, and time zone, optionally throwing an exception if the date is invalid.- Parameters:
month- the month (0-based, meaning 0 for January)day- the day of the monthyear- the yeartimeZone- the time zone of the dateclazz- the exception class to throw if the date is invalid. Ifnull, no exception will be thrown for an invalid date.- Returns:
- the date object, or
nullif the date is invalid and no exception to throw was provided - Throws:
PortalException- if a portal exception occurred
-
getDefaultCompanyId
public static long getDefaultCompanyId() -
getEmailFromAddress
public static String getEmailFromAddress(PortletPreferences portletPreferences, long companyId, String defaultValue) -
getEmailFromName
public static String getEmailFromName(PortletPreferences portletPreferences, long companyId, String defaultValue) -
getForwardedHost
-
getForwardedPort
public static int getForwardedPort(javax.servlet.http.HttpServletRequest httpServletRequest) -
getFullName
-
getGoogleGadgetURL
public static String getGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getGroupFriendlyURL
public static String getGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, boolean canonicalURL, boolean controlPanel) throws PortalException - Throws:
PortalException
-
getGroupFriendlyURL
public static String getGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale) throws PortalException - Throws:
PortalException
-
getGroupFriendlyURLIndex
-
getHomeURL
public static String getHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getHost
-
getHost
-
getHttpServletRequest
public static javax.servlet.http.HttpServletRequest getHttpServletRequest(PortletRequest portletRequest) -
getHttpServletResponse
public static javax.servlet.http.HttpServletResponse getHttpServletResponse(PortletResponse portletResponse) -
getI18nPathLanguageId
-
getJsSafePortletId
-
getLayoutActualURL
-
getLayoutActualURL
-
getLayoutActualURL
public static String getLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getLayoutFriendlyURL
public static String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getLayoutFriendlyURL
public static String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) throws PortalException - Throws:
PortalException
-
getLayoutFriendlyURL
- Throws:
PortalException
-
getLayoutFriendlyURLSeparatorComposite
public static LayoutFriendlyURLSeparatorComposite getLayoutFriendlyURLSeparatorComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getLayoutFullURL
public static String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getLayoutFullURL
public static String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException - Throws:
PortalException
-
getLayoutFullURL
- Throws:
PortalException
-
getLayoutFullURL
public static String getLayoutFullURL(long groupId, String portletId, boolean secure) throws PortalException - Throws:
PortalException
-
getLayoutFullURL
- Throws:
PortalException
-
getLayoutRelativeURL
public static String getLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getLayoutRelativeURL
public static String getLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException - Throws:
PortalException
-
getLayoutSetDisplayURL
public static String getLayoutSetDisplayURL(LayoutSet layoutSet, boolean secureConnection) throws PortalException - Throws:
PortalException
-
getLayoutSetFriendlyURL
public static String getLayoutSetFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getLayoutTarget
-
getLayoutURL
- Throws:
PortalException
-
getLayoutURL
public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException - Throws:
PortalException
-
getLayoutURL
public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) throws PortalException - Throws:
PortalException
-
getLayoutURL
- Throws:
PortalException
-
getLiferayPortletRequest
-
getLiferayPortletResponse
-
getLocale
-
getLocale
public static Locale getLocale(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean initialize) -
getLocale
-
getMailId
-
getNetvibesURL
public static String getNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getNewPortletTitle
-
getOriginalServletRequest
public static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest) -
getPathContext
-
getPathContext
-
getPathContext
-
getPathContext
-
getPathFriendlyURLPrivateGroup
-
getPathFriendlyURLPrivateUser
-
getPathFriendlyURLPublic
-
getPathImage
-
getPathMain
-
getPathModule
-
getPathProxy
-
getPlidFromFriendlyURL
-
getPlidFromPortletId
public static long getPlidFromPortletId(long groupId, boolean privateLayout, String portletId) throws PortalException - Throws:
PortalException
-
getPlidFromPortletId
- Throws:
PortalException
-
getPortal
-
getPortalLocalPort
public static int getPortalLocalPort(boolean secure) -
getPortalProperties
-
getPortalServerPort
public static int getPortalServerPort(boolean secure) -
getPortalURL
-
getPortalURL
public static String getPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest, boolean secure) -
getPortalURL
- Throws:
PortalException
-
getPortalURL
-
getPortalURL
-
getPortalURL
-
getPortalURL
-
getPortalURL
- Throws:
PortalException
-
getPortletConfig
public static PortletConfig getPortletConfig(long companyId, String portletId, javax.servlet.ServletContext servletContext) throws PortletException - Throws:
PortletException
-
getPortletDescription
-
getPortletDescription
-
getPortletDescription
-
getPortletDescription
-
getPortletDescription
-
getPortletId
-
getPortletId
-
getPortletLongTitle
-
getPortletLongTitle
-
getPortletNamespace
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPreferences
public static PortletPreferences getPreferences(javax.servlet.http.HttpServletRequest httpServletRequest) -
getPreferencesValidator
-
getRelativeHomeURL
public static String getRelativeHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getResourceBundle
-
getScopeGroupId
public static long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getScopeGroupId
public static long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId) throws PortalException - Throws:
PortalException
-
getScopeGroupId
public static long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, boolean checkStagingGroup) throws PortalException - Throws:
PortalException
-
getScopeGroupId
-
getScopeGroupId
-
getScopeGroupId
public static long getScopeGroupId(long plid) -
getScopeGroupId
- Throws:
PortalException
-
getSelectedUser
public static User getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getSelectedUser
public static User getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest, boolean checkPermission) throws PortalException - Throws:
PortalException
-
getSelectedUser
- Throws:
PortalException
-
getSelectedUser
public static User getSelectedUser(PortletRequest portletRequest, boolean checkPermission) throws PortalException - Throws:
PortalException
-
getServletContextName
-
getSiteAdminURL
public static String getSiteAdminURL(ThemeDisplay themeDisplay, String ppid, Map<String, String[]> params) throws PortalException- Throws:
PortalException
-
getSiteDefaultLocale
- Throws:
PortalException
-
getSiteDefaultLocale
- Throws:
PortalException
-
getSiteGroupId
public static long getSiteGroupId(long scopeGroupId) -
getSiteLoginURL
- Throws:
PortalException
-
getStaticResourceURL
-
getStaticResourceURL
-
getStaticResourceURL
-
getStaticResourceURL
-
getStrutsAction
-
getSystemGroups
-
getSystemOrganizationRoles
-
getSystemRoles
-
getSystemSiteRoles
-
getUniqueElementId
-
getUniqueElementId
-
getUploadPortletRequest
-
getUploadServletRequest
public static UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest) -
getUploadServletRequest
public static UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest, int fileSizeThreshold, String location) -
getUptime
-
getURLWithSessionId
-
getUser
public static User getUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getUser
- Throws:
PortalException
-
getUserEmailAddress
-
getUserId
public static long getUserId(javax.servlet.http.HttpServletRequest httpServletRequest) -
getUserId
-
getUserName
-
getUserName
-
getUserName
-
getUserName
-
getUserName
-
getUserPassword
-
getUserPassword
-
getUserPassword
-
getValidPortalDomain
-
getValidUserId
- Throws:
PortalException
-
getVirtualHostnames
-
getWidgetURL
public static String getWidgetURL(Portlet portlet, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
initUser
public static User initUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws Exception - Throws:
Exception
-
isCDNDynamicResourcesEnabled
public static boolean isCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
isCDNDynamicResourcesEnabled
public static boolean isCDNDynamicResourcesEnabled(long companyId) -
isCompanyAdmin
- Throws:
Exception
-
isCustomPortletMode
-
isForwardedSecure
public static boolean isForwardedSecure(javax.servlet.http.HttpServletRequest httpServletRequest) -
isGroupAdmin
- Throws:
Exception
-
isGroupControlPanelPath
-
isGroupFriendlyURL
-
isGroupOwner
- Throws:
Exception
-
isLayoutDescendant
- Throws:
PortalException
-
isLayoutSitemapable
-
isLoginRedirectRequired
public static boolean isLoginRedirectRequired(javax.servlet.http.HttpServletRequest httpServletRequest) -
isMultipartRequest
public static boolean isMultipartRequest(javax.servlet.http.HttpServletRequest httpServletRequest) -
isOmniadmin
public static boolean isOmniadmin(long userId) -
isOmniadmin
-
isReservedParameter
-
isRightToLeft
public static boolean isRightToLeft(javax.servlet.http.HttpServletRequest httpServletRequest) -
isRSSFeedsEnabled
public static boolean isRSSFeedsEnabled() -
isSecure
public static boolean isSecure(javax.servlet.http.HttpServletRequest httpServletRequest) -
isSkipPortletContentRendering
public static boolean isSkipPortletContentRendering(Group group, LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay, String portletName) -
isSystemGroup
-
isSystemRole
-
isValidPortalDomain
-
isValidResourceId
-
resetCDNHosts
public static void resetCDNHosts() -
sendError
public static void sendError(Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) throws IOException - Throws:
IOException
-
sendError
public static void sendError(Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
sendError
public static void sendError(int status, Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) throws IOException - Throws:
IOException
-
sendError
public static void sendError(int status, Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
sendRSSFeedsDisabledError
public static void sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
sendRSSFeedsDisabledError
public static void sendRSSFeedsDisabledError(PortletRequest portletRequest, PortletResponse portletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
setPageDescription
public static void setPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the description for a page. This overrides the existing page description. -
setPageKeywords
public static void setPageKeywords(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the keywords for a page. This overrides the existing page keywords. -
setPageSubtitle
public static void setPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the subtitle for a page. This overrides the existing page subtitle. -
setPageTitle
public static void setPageTitle(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the whole title for a page. This overrides the existing page whole title. -
setPortalInetSocketAddresses
public static void setPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest httpServletRequest) -
stripURLAnchor
-
transformCustomSQL
-
transformSQL
-
updateImageId
public static void updateImageId(BaseModel<?> baseModel, boolean hasImage, byte[] bytes, String fieldName, long maxSize, int maxHeight, int maxWidth) throws PortalException - Throws:
PortalException
-
updatePortletMode
public static PortletMode updatePortletMode(String portletId, User user, Layout layout, PortletMode portletMode, javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
updateRedirect
-
updateWindowState
public static WindowState updateWindowState(String portletId, User user, Layout layout, WindowState windowState, javax.servlet.http.HttpServletRequest httpServletRequest) -
setPortal
-