Class PortalUtil
- Author:
- Brian Wing Shun Chan, Eduardo Lundgren, Juan Fernández
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addPageDescription
(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the description to the current meta description of the page in the request.static void
addPageKeywords
(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the keywords to the current meta keywords of the page in the request.static void
addPageSubtitle
(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the subtitle to the current subtitle of the page in the request.static void
addPageTitle
(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the title to the current title of the page in the request.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.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.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.static void
addPortletDefaultResource
(long companyId, Layout layout, Portlet portlet) static void
addPortletDefaultResource
(javax.servlet.http.HttpServletRequest httpServletRequest, Portlet portlet) Adds the default resource permissions for the portlet to the page in the request.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.static String
addPreservedParameters
(ThemeDisplay themeDisplay, String url) Adds the preserved parameters doAsUserId, doAsUserLanguageId, doAsGroupId, and refererPlid to the URL.static String
addPreservedParameters
(ThemeDisplay themeDisplay, String url, boolean typeControlPanel, boolean doAsUser) 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.static String
escapeRedirect
(String url) Escapes the URL for use in a redirect and checks that security settings allow the URL is allowed for redirects.static String
generateRandomKey
(javax.servlet.http.HttpServletRequest httpServletRequest, String input) Generates a random key to identify the request based on the input string.static String
getAbsoluteURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String url) static LayoutQueryStringComposite
getActualLayoutQueryStringComposite
(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static String
getActualURL
(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static String
getAlternateURL
(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 String
getCanonicalURL
(String completeURL, ThemeDisplay themeDisplay, Layout layout) Returns the canonical URL for the page.static String
getCanonicalURL
(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL) Returns the canonical URL of the page, optionally including the page's friendly URL.static String
getCanonicalURL
(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL, boolean includeQueryString) Returns the canonical URL of the page.static String
getCDNHost
(boolean secure) Returns the secure (HTTPS) or insecure (HTTP) content distribution network (CDN) host address for this portal.static String
getCDNHost
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getCDNHostHttp
(long companyId) Returns the insecure (HTTP) content distribution network (CDN) host addressstatic String
getCDNHostHttps
(long companyId) Returns the secure (HTTPS) content distribution network (CDN) host addressstatic String
getClassName
(long classNameId) Returns the fully qualified name of the class from its ID.static long
getClassNameId
(Class<?> clazz) Returns the ID of the class from its class object.static long
getClassNameId
(String value) Returns the ID of the class from its fully qualified name.static Company
getCompany
(PortletRequest portletRequest) static Company
getCompany
(javax.servlet.http.HttpServletRequest httpServletRequest) static long
getCompanyId
(PortletRequest portletRequest) static long
getCompanyId
(javax.servlet.http.HttpServletRequest httpServletRequest) static long[]
static String
static String
getControlPanelFullURL
(long scopeGroupId, String ppid, Map<String, String[]> params) static long
getControlPanelPlid
(long companyId) static long
getControlPanelPlid
(PortletRequest portletRequest) static PortletURL
getControlPanelPortletURL
(PortletRequest portletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) static PortletURL
getControlPanelPortletURL
(PortletRequest portletRequest, String portletId, String lifecycle) static PortletURL
getControlPanelPortletURL
(javax.servlet.http.HttpServletRequest httpServletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) static PortletURL
getControlPanelPortletURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, String lifecycle) static String
getCreateAccountURL
(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 String
getCurrentCompleteURL
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getCurrentURL
(PortletRequest portletRequest) static String
getCurrentURL
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
static String
static Date
getDate
(int month, int day, int year) Returns the date object for the specified month, day, and year, ornull
if the date is invalid.static Date
getDate
(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 Date
getDate
(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 Date
getDate
(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 Date
getDate
(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 long
static String
getEmailFromAddress
(PortletPreferences portletPreferences, long companyId, String defaultValue) static String
getEmailFromName
(PortletPreferences portletPreferences, long companyId, String defaultValue) static String
getForwardedHost
(javax.servlet.http.HttpServletRequest httpServletRequest) static int
getForwardedPort
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getFullName
(String firstName, String middleName, String lastName) static String
getGoogleGadgetURL
(Portlet portlet, ThemeDisplay themeDisplay) static String
getGroupFriendlyURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay, boolean canonicalURL, boolean controlPanel) static String
getGroupFriendlyURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale) static int[]
getGroupFriendlyURLIndex
(String requestURI) static String
getHomeURL
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getHost
(PortletRequest portletRequest) static String
getHost
(javax.servlet.http.HttpServletRequest httpServletRequest) static javax.servlet.http.HttpServletRequest
getHttpServletRequest
(PortletRequest portletRequest) static javax.servlet.http.HttpServletResponse
getHttpServletResponse
(PortletResponse portletResponse) static String
getI18nPathLanguageId
(Locale locale, String defaultI18nPathLanguageId) static String
getJsSafePortletId
(String portletId) static String
getLayoutActualURL
(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static String
getLayoutActualURL
(Layout layout) static String
getLayoutActualURL
(Layout layout, String mainPath) static String
getLayoutFriendlyURL
(Layout layout, ThemeDisplay themeDisplay) static String
getLayoutFriendlyURL
(Layout layout, ThemeDisplay themeDisplay, Locale locale) static String
getLayoutFriendlyURL
(ThemeDisplay themeDisplay) getLayoutFriendlyURLSeparatorComposite
(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) static String
getLayoutFullURL
(long groupId, String portletId) static String
getLayoutFullURL
(long groupId, String portletId, boolean secure) static String
getLayoutFullURL
(Layout layout, ThemeDisplay themeDisplay) static String
getLayoutFullURL
(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) static String
getLayoutFullURL
(ThemeDisplay themeDisplay) static String
getLayoutRelativeURL
(Layout layout, ThemeDisplay themeDisplay) static String
getLayoutRelativeURL
(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) static String
getLayoutSetDisplayURL
(LayoutSet layoutSet, boolean secureConnection) static String
getLayoutSetFriendlyURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay) static String
getLayoutTarget
(Layout layout) static String
getLayoutURL
(Layout layout, ThemeDisplay themeDisplay) static String
getLayoutURL
(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) static String
getLayoutURL
(Layout layout, ThemeDisplay themeDisplay, Locale locale) static String
getLayoutURL
(ThemeDisplay themeDisplay) static LiferayPortletRequest
getLiferayPortletRequest
(PortletRequest portletRequest) static LiferayPortletResponse
getLiferayPortletResponse
(PortletResponse portletResponse) static Locale
getLocale
(PortletRequest portletRequest) static Locale
getLocale
(javax.servlet.http.HttpServletRequest httpServletRequest) static Locale
getLocale
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean initialize) static String
static String
getNetvibesURL
(Portlet portlet, ThemeDisplay themeDisplay) static String
getNewPortletTitle
(String portletTitle, String oldScopeName, String newScopeName) static javax.servlet.http.HttpServletRequest
getOriginalServletRequest
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
static String
getPathContext
(String contextPath) static String
getPathContext
(PortletRequest portletRequest) static String
getPathContext
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
static String
static String
static String
static String
static String
static String
static long
getPlidFromFriendlyURL
(long companyId, String friendlyURL) static long
getPlidFromPortletId
(long groupId, boolean privateLayout, String portletId) static long
getPlidFromPortletId
(long groupId, String portletId) static Portal
static int
getPortalLocalPort
(boolean secure) static Properties
static int
getPortalServerPort
(boolean secure) static String
getPortalURL
(Layout layout, ThemeDisplay themeDisplay) static String
getPortalURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay) static String
getPortalURL
(ThemeDisplay themeDisplay) static String
getPortalURL
(String serverName, int serverPort, boolean secure) static String
getPortalURL
(PortletRequest portletRequest) static String
getPortalURL
(PortletRequest portletRequest, boolean secure) static String
getPortalURL
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getPortalURL
(javax.servlet.http.HttpServletRequest httpServletRequest, boolean secure) static PortletConfig
getPortletConfig
(long companyId, String portletId, javax.servlet.ServletContext servletContext) static String
getPortletDescription
(Portlet portlet, User user) static String
getPortletDescription
(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) static String
getPortletDescription
(String portletId, User user) static String
getPortletDescription
(String portletId, String languageId) static String
getPortletDescription
(String portletId, Locale locale) static String
getPortletId
(PortletRequest portletRequest) static String
getPortletId
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getPortletLongTitle
(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) static String
getPortletLongTitle
(String portletId, Locale locale) static String
getPortletNamespace
(String portletId) static String
getPortletTitle
(Portlet portlet, User user) static String
getPortletTitle
(Portlet portlet, String languageId) static String
getPortletTitle
(Portlet portlet, Locale locale) static String
getPortletTitle
(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) static String
getPortletTitle
(String portletId, User user) static String
getPortletTitle
(String portletId, String languageId) static String
getPortletTitle
(String portletId, Locale locale) static String
getPortletTitle
(String portletId, ResourceBundle resourceBundle) static String
getPortletTitle
(PortletRequest portletRequest) static String
getPortletTitle
(PortletResponse portletResponse) static PortletPreferences
getPreferences
(javax.servlet.http.HttpServletRequest httpServletRequest) static PreferencesValidator
getPreferencesValidator
(Portlet portlet) static String
getRelativeHomeURL
(javax.servlet.http.HttpServletRequest httpServletRequest) static ResourceBundle
getResourceBundle
(Locale locale) static long
getScopeGroupId
(long plid) static long
getScopeGroupId
(Layout layout) static long
getScopeGroupId
(Layout layout, String portletId) static long
getScopeGroupId
(PortletRequest portletRequest) static long
getScopeGroupId
(javax.servlet.http.HttpServletRequest httpServletRequest) static long
getScopeGroupId
(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId) static long
getScopeGroupId
(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, boolean checkStagingGroup) static User
getSelectedUser
(PortletRequest portletRequest) static User
getSelectedUser
(PortletRequest portletRequest, boolean checkPermission) static User
getSelectedUser
(javax.servlet.http.HttpServletRequest httpServletRequest) static User
getSelectedUser
(javax.servlet.http.HttpServletRequest httpServletRequest, boolean checkPermission) static String
static long[]
getSharedContentSiteGroupIds
(long companyId, long groupId, long userId) static String
getSiteAdminURL
(ThemeDisplay themeDisplay, String ppid, Map<String, String[]> params) static Locale
getSiteDefaultLocale
(long groupId) static Locale
getSiteDefaultLocale
(Group group) static long
getSiteGroupId
(long scopeGroupId) static String
getSiteLoginURL
(ThemeDisplay themeDisplay) static String
getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri) static String
getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, long timestamp) static String
getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString) static String
getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString, long timestamp) static String
getStrutsAction
(javax.servlet.http.HttpServletRequest httpServletRequest) static String[]
static String[]
static String[]
static String[]
static String
getUniqueElementId
(PortletRequest request, String namespace, String id) static String
getUniqueElementId
(javax.servlet.http.HttpServletRequest httpServletRequest, String namespace, String id) static UploadPortletRequest
getUploadPortletRequest
(PortletRequest portletRequest) static UploadServletRequest
getUploadServletRequest
(javax.servlet.http.HttpServletRequest httpServletRequest) static UploadServletRequest
getUploadServletRequest
(javax.servlet.http.HttpServletRequest httpServletRequest, int fileSizeThreshold, String location) static Date
static String
getURLWithSessionId
(String url, String sessionId) static User
getUser
(PortletRequest portletRequest) static User
getUser
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getUserEmailAddress
(long userId) static long
getUserId
(PortletRequest portletRequest) static long
getUserId
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getUserName
(long userId, String defaultUserName) static String
getUserName
(long userId, String defaultUserName, String userAttribute) static String
getUserName
(long userId, String defaultUserName, String userAttribute, javax.servlet.http.HttpServletRequest httpServletRequest) static String
getUserName
(long userId, String defaultUserName, javax.servlet.http.HttpServletRequest httpServletRequest) static String
getUserName
(BaseModel<?> baseModel) static String
getUserPassword
(PortletRequest portletRequest) static String
getUserPassword
(javax.servlet.http.HttpServletRequest httpServletRequest) static String
getUserPassword
(javax.servlet.http.HttpSession httpSession) static String
getValidPortalDomain
(long companyId, String domain) static long
getValidUserId
(long companyId, long userId) getVirtualHostnames
(LayoutSet layoutSet) static String
getWidgetURL
(Portlet portlet, ThemeDisplay themeDisplay) static User
initUser
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
isCDNDynamicResourcesEnabled
(long companyId) static boolean
isCDNDynamicResourcesEnabled
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
isCompanyAdmin
(User user) static boolean
isCustomPortletMode
(PortletMode portletMode) static boolean
isForwardedSecure
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
isGroupAdmin
(User user, long groupId) static boolean
static boolean
isGroupFriendlyURL
(String fullURL, String groupFriendlyURL, String layoutFriendlyURL) static boolean
isGroupOwner
(User user, long groupId) static boolean
isLayoutDescendant
(Layout layout, long layoutId) static boolean
isLayoutSitemapable
(Layout layout) static boolean
isLoginRedirectRequired
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
isMultipartRequest
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
isOmniadmin
(long userId) static boolean
isOmniadmin
(User user) static boolean
isReservedParameter
(String name) static boolean
isRightToLeft
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
static boolean
isSecure
(javax.servlet.http.HttpServletRequest httpServletRequest) static boolean
isSkipPortletContentRendering
(Group group, LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay, String portletName) static boolean
isSystemGroup
(String groupName) static boolean
isSystemRole
(String roleName) static boolean
isValidPortalDomain
(long companyId, String domain) static boolean
isValidResourceId
(String resourceId) static void
static void
sendError
(int status, Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) static void
sendError
(int status, Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) static void
sendError
(Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) static void
sendError
(Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) static void
sendRSSFeedsDisabledError
(PortletRequest portletRequest, PortletResponse portletResponse) static void
sendRSSFeedsDisabledError
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) static void
setPageDescription
(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the description for a page.static void
setPageKeywords
(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the keywords for a page.static void
setPageSubtitle
(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the subtitle for a page.static void
setPageTitle
(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the whole title for a page.void
static void
setPortalInetSocketAddresses
(javax.servlet.http.HttpServletRequest httpServletRequest) static String[]
stripURLAnchor
(String url, String separator) static String
transformCustomSQL
(String sql) static String
transformSQL
(String sql) static void
updateImageId
(BaseModel<?> baseModel, boolean hasImage, byte[] bytes, String fieldName, long maxSize, int maxHeight, int maxWidth) static PortletMode
updatePortletMode
(String portletId, User user, Layout layout, PortletMode portletMode, javax.servlet.http.HttpServletRequest httpServletRequest) static String
updateRedirect
(String redirect, String oldPath, String newPath) static WindowState
updateWindowState
(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
null
if 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
). Ifnull
is 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
). Ifnull
is 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, ornull
if 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
null
if 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
null
if 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
null
if 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
null
if 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
null
if 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:
IOException
javax.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:
IOException
javax.servlet.ServletException
-
sendRSSFeedsDisabledError
public static void sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
sendRSSFeedsDisabledError
public static void sendRSSFeedsDisabledError(PortletRequest portletRequest, PortletResponse portletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.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
-