Interface Portal
- Author:
- Brian Wing Shun Chan, Eduardo Lundgren, Marco Leo
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPageDescription
(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the description to the current meta description of the page.void
addPageKeywords
(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the keywords to the current meta keywords of the page.void
addPageSubtitle
(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the subtitle to the current subtitle of the page.void
addPageTitle
(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the title to the current title of the page.void
addPortletBreadcrumbEntry
(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url) Adds an entry to the portlet breadcrumbs for the page.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.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.void
addPortletDefaultResource
(long companyId, Layout layout, Portlet portlet) void
addPortletDefaultResource
(javax.servlet.http.HttpServletRequest httpServletRequest, Portlet portlet) Adds the default resource permissions for the portlet to the page.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.addPreservedParameters
(ThemeDisplay themeDisplay, String url) Adds the preserved parameters doAsUserId, doAsUserLanguageId, doAsGroupId, and refererPlid to the URL.addPreservedParameters
(ThemeDisplay themeDisplay, String url, boolean typeControlPanel, boolean doAsUser) 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.escapeRedirect
(String url) Escapes the URL for use in a redirect and checks that security settings allow the URL is allowed for redirects.generateRandomKey
(javax.servlet.http.HttpServletRequest httpServletRequest, String input) Generates a random key to identify the request based on the input string.getAbsoluteURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String url) getActualLayoutQueryStringComposite
(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) getActualURL
(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) 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) long[]
getAncestorSiteGroupIds
(long groupId) getCanonicalURL
(String completeURL, ThemeDisplay themeDisplay, Layout layout) Returns the canonical URL of the page, to distinguish it among its translations.getCanonicalURL
(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL) Returns the canonical URL of the page, to distinguish it among its translations.getCanonicalURL
(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL, boolean includeQueryString) Returns the canonical URL of the page.getCDNHost
(boolean secure) Returns the secure (HTTPS) or insecure (HTTP) content distribution network (CDN) host address for this portal.getCDNHost
(javax.servlet.http.HttpServletRequest httpServletRequest) getCDNHostHttp
(long companyId) Returns the insecure (HTTP) content distribution network (CDN) host addressgetCDNHostHttps
(long companyId) Returns the secure (HTTPS) content distribution network (CDN) host addressgetClassName
(long classNameId) Returns the fully qualified name of the class from its ID.long
getClassNameId
(Class<?> clazz) Returns the ID of the class from its class object.long
getClassNameId
(String value) Returns the ID of the class from its fully qualified name.getCompany
(PortletRequest portletRequest) getCompany
(javax.servlet.http.HttpServletRequest httpServletRequest) long
getCompanyId
(PortletRequest portletRequest) long
getCompanyId
(javax.servlet.http.HttpServletRequest httpServletRequest) long[]
getControlPanelFullURL
(long scopeGroupId, String ppid, Map<String, String[]> params) long
getControlPanelPlid
(long companyId) long
getControlPanelPlid
(PortletRequest portletRequest) getControlPanelPortletURL
(PortletRequest portletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) getControlPanelPortletURL
(PortletRequest portletRequest, String portletId, String lifecycle) getControlPanelPortletURL
(javax.servlet.http.HttpServletRequest httpServletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) getControlPanelPortletURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, String lifecycle) getCreateAccountURL
(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay) long[]
getCurrentAndAncestorSiteGroupIds
(long groupId) long[]
getCurrentAndAncestorSiteGroupIds
(long[] groupIds) long[]
getCurrentAndAncestorSiteGroupIds
(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) long[]
getCurrentAndAncestorSiteGroupIds
(long groupId, boolean checkContentSharingWithChildrenEnabled) getCurrentAndAncestorSiteGroups
(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) getCurrentAndAncestorSiteGroups
(long groupId, boolean checkContentSharingWithChildrenEnabled) getCurrentCompleteURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getCurrentURL
(PortletRequest portletRequest) getCurrentURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getDate
(int month, int day, int year) Returns the date object for the specified month, day, and year, ornull
if the date is invalid.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.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.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.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.long
getEmailFromAddress
(PortletPreferences portletPreferences, long companyId, String defaultValue) getEmailFromName
(PortletPreferences portletPreferences, long companyId, String defaultValue) getForwardedHost
(javax.servlet.http.HttpServletRequest httpServletRequest) int
getForwardedPort
(javax.servlet.http.HttpServletRequest httpServletRequest) getFullName
(String firstName, String middleName, String lastName) getGoogleGadgetURL
(Portlet portlet, ThemeDisplay themeDisplay) getGroupFriendlyURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay, boolean canonicalURL, boolean controlPanel) getGroupFriendlyURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale) int[]
getGroupFriendlyURLIndex
(String requestURI) getHomeURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getHost
(PortletRequest portletRequest) getHost
(javax.servlet.http.HttpServletRequest httpServletRequest) javax.servlet.http.HttpServletRequest
getHttpServletRequest
(PortletRequest portletRequest) javax.servlet.http.HttpServletResponse
getHttpServletResponse
(PortletResponse portletResponse) getI18nPathLanguageId
(Locale locale, String defaultI18nPathLanguageId) getJsSafePortletId
(String portletId) getLayoutActualURL
(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) getLayoutActualURL
(Layout layout) getLayoutActualURL
(Layout layout, String mainPath) getLayoutFriendlyURL
(Layout layout, ThemeDisplay themeDisplay) getLayoutFriendlyURL
(Layout layout, ThemeDisplay themeDisplay, Locale locale) getLayoutFriendlyURL
(ThemeDisplay themeDisplay) getLayoutFriendlyURLSeparatorComposite
(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, Object> requestContext) getLayoutFullURL
(long groupId, String portletId) getLayoutFullURL
(long groupId, String portletId, boolean secure) getLayoutFullURL
(Layout layout, ThemeDisplay themeDisplay) getLayoutFullURL
(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) getLayoutFullURL
(ThemeDisplay themeDisplay) getLayoutRelativeURL
(Layout layout, ThemeDisplay themeDisplay) getLayoutRelativeURL
(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) getLayoutSetDisplayURL
(LayoutSet layoutSet, boolean secureConnection) getLayoutSetFriendlyURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay) getLayoutTarget
(Layout layout) getLayoutURL
(Layout layout, ThemeDisplay themeDisplay) getLayoutURL
(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) getLayoutURL
(Layout layout, ThemeDisplay themeDisplay, Locale locale) getLayoutURL
(ThemeDisplay themeDisplay) getLiferayPortletRequest
(PortletRequest portletRequest) getLiferayPortletResponse
(PortletResponse portletResponse) getLocale
(PortletRequest portletRequest) getLocale
(javax.servlet.http.HttpServletRequest httpServletRequest) getLocale
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean initialize) getNetvibesURL
(Portlet portlet, ThemeDisplay themeDisplay) getNewPortletTitle
(String portletTitle, String oldScopeName, String newScopeName) javax.servlet.http.HttpServletRequest
getOriginalServletRequest
(javax.servlet.http.HttpServletRequest httpServletRequest) getPathContext
(String contextPath) getPathContext
(PortletRequest portletRequest) getPathContext
(javax.servlet.http.HttpServletRequest httpServletRequest) long
getPlidFromFriendlyURL
(long companyId, String friendlyURL) long
getPlidFromPortletId
(long groupId, boolean privateLayout, String portletId) long
getPlidFromPortletId
(long groupId, String portletId) int
getPortalLocalPort
(boolean secure) int
getPortalServerPort
(boolean secure) getPortalURL
(Layout layout, ThemeDisplay themeDisplay) getPortalURL
(LayoutSet layoutSet, ThemeDisplay themeDisplay) getPortalURL
(ThemeDisplay themeDisplay) getPortalURL
(String serverName, int serverPort, boolean secure) getPortalURL
(PortletRequest portletRequest) getPortalURL
(PortletRequest portletRequest, boolean secure) getPortalURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getPortalURL
(javax.servlet.http.HttpServletRequest httpServletRequest, boolean secure) getPortletConfig
(long companyId, String portletId, javax.servlet.ServletContext servletContext) getPortletDescription
(Portlet portlet, User user) getPortletDescription
(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) getPortletDescription
(String portletId, User user) getPortletDescription
(String portletId, String languageId) getPortletDescription
(String portletId, Locale locale) getPortletFriendlyURLMapperLayoutQueryStringComposite
(String url, Map<String, String[]> params, Map<String, Object> requestContext) getPortletId
(PortletRequest portletRequest) getPortletId
(javax.servlet.http.HttpServletRequest httpServletRequest) getPortletLongTitle
(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) getPortletLongTitle
(String portletId, Locale locale) getPortletNamespace
(String portletId) getPortletTitle
(Portlet portlet, User user) getPortletTitle
(Portlet portlet, String languageId) getPortletTitle
(Portlet portlet, Locale locale) getPortletTitle
(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale) getPortletTitle
(String portletId, User user) getPortletTitle
(String portletId, String languageId) getPortletTitle
(String portletId, Locale locale) getPortletTitle
(String portletId, ResourceBundle resourceBundle) getPortletTitle
(PortletRequest portletRequest) getPortletTitle
(PortletResponse portletResponse) getPreferences
(javax.servlet.http.HttpServletRequest httpServletRequest) getPreferencesValidator
(Portlet portlet) getRelativeHomeURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getResourceBundle
(Locale locale) long
getScopeGroupId
(long plid) long
getScopeGroupId
(Layout layout) long
getScopeGroupId
(Layout layout, String portletId) long
getScopeGroupId
(PortletRequest portletRequest) long
getScopeGroupId
(javax.servlet.http.HttpServletRequest httpServletRequest) long
getScopeGroupId
(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId) long
getScopeGroupId
(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, boolean checkStagingGroup) getSelectedUser
(PortletRequest portletRequest) getSelectedUser
(PortletRequest portletRequest, boolean checkPermission) getSelectedUser
(javax.servlet.http.HttpServletRequest httpServletRequest) getSelectedUser
(javax.servlet.http.HttpServletRequest httpServletRequest, boolean checkPermission) long[]
getSharedContentSiteGroupIds
(long companyId, long groupId, long userId) getSiteAdminURL
(ThemeDisplay themeDisplay, String ppid, Map<String, String[]> params) getSiteDefaultLocale
(long groupId) getSiteDefaultLocale
(Group group) long
getSiteGroupId
(long groupId) getSiteLoginURL
(ThemeDisplay themeDisplay) Returns the URL of the login page for the current site if one is available.getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri) getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, long timestamp) getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString) getStaticResourceURL
(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString, long timestamp) getStrutsAction
(javax.servlet.http.HttpServletRequest httpServletRequest) String[]
String[]
String[]
String[]
getUniqueElementId
(PortletRequest request, String namespace, String id) getUniqueElementId
(javax.servlet.http.HttpServletRequest httpServletRequest, String namespace, String id) getUploadPortletRequest
(PortletRequest portletRequest) getUploadServletRequest
(javax.servlet.http.HttpServletRequest httpServletRequest) getUploadServletRequest
(javax.servlet.http.HttpServletRequest httpServletRequest, int fileSizeThreshold, String location) getURLWithSessionId
(String url, String sessionId) getUser
(PortletRequest portletRequest) getUser
(javax.servlet.http.HttpServletRequest httpServletRequest) getUserEmailAddress
(long userId) long
getUserId
(PortletRequest portletRequest) long
getUserId
(javax.servlet.http.HttpServletRequest httpServletRequest) getUserName
(long userId, String defaultUserName) getUserName
(long userId, String defaultUserName, String userAttribute) getUserName
(long userId, String defaultUserName, String userAttribute, javax.servlet.http.HttpServletRequest httpServletRequest) getUserName
(long userId, String defaultUserName, javax.servlet.http.HttpServletRequest httpServletRequest) getUserName
(BaseModel<?> baseModel) getUserPassword
(PortletRequest portletRequest) getUserPassword
(javax.servlet.http.HttpServletRequest httpServletRequest) getUserPassword
(javax.servlet.http.HttpSession httpSession) getValidPortalDomain
(long companyId, String domain) long
getValidUserId
(long companyId, long userId) getVirtualHostnames
(LayoutSet layoutSet) getWidgetURL
(Portlet portlet, ThemeDisplay themeDisplay) initUser
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
isCDNDynamicResourcesEnabled
(long companyId) boolean
isCDNDynamicResourcesEnabled
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
isCompanyAdmin
(User user) boolean
isCustomPortletMode
(PortletMode portletMode) boolean
isForwardedSecure
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
isGroupAdmin
(User user, long groupId) boolean
boolean
isGroupFriendlyURL
(String fullURL, String groupFriendlyURL, String layoutFriendlyURL) boolean
isGroupOwner
(User user, long groupId) boolean
isLayoutDescendant
(Layout layout, long layoutId) boolean
isLayoutSitemapable
(Layout layout) boolean
isLoginRedirectRequired
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
isMultipartRequest
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
isOmniadmin
(long userId) boolean
isOmniadmin
(User user) boolean
isReservedParameter
(String name) boolean
isRightToLeft
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
boolean
isSecure
(javax.servlet.http.HttpServletRequest httpServletRequest) boolean
isSkipPortletContentRendering
(Group group, LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay, String portletName) boolean
isSystemGroup
(String groupName) boolean
isSystemRole
(String roleName) boolean
isValidPortalDomain
(long companyId, String domain) boolean
isValidResourceId
(String resourceId) void
void
sendError
(int status, Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) void
sendError
(int status, Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) void
sendError
(Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) void
sendError
(Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) void
sendRSSFeedsDisabledError
(PortletRequest portletRequest, PortletResponse portletResponse) void
sendRSSFeedsDisabledError
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) void
setPageDescription
(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the description for the page, overriding the existing page description.void
setPageKeywords
(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the keywords for the page, overriding the existing page keywords.void
setPageSubtitle
(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the subtitle for the page, overriding the existing page subtitle.void
setPageTitle
(String title, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the whole title for the page, overriding the existing page whole title.void
setPortalInetSocketAddresses
(javax.servlet.http.HttpServletRequest httpServletRequest) String[]
stripURLAnchor
(String url, String separator) transformCustomSQL
(String sql) transformSQL
(String sql) void
updateImageId
(BaseModel<?> baseModel, boolean image, byte[] bytes, String fieldName, long maxSize, int maxHeight, int maxWidth) updatePortletMode
(String portletId, User user, Layout layout, PortletMode portletMode, javax.servlet.http.HttpServletRequest httpServletRequest) updateRedirect
(String redirect, String oldPath, String newPath) updateWindowState
(String portletId, User user, Layout layout, WindowState windowState, javax.servlet.http.HttpServletRequest httpServletRequest)
-
Field Details
-
FRIENDLY_URL_SEPARATOR
- See Also:
-
JSESSIONID
- See Also:
-
PATH_IMAGE
- See Also:
-
PATH_MAIN
- See Also:
-
PATH_MODULE
- See Also:
-
PATH_PORTAL_LAYOUT
- See Also:
-
PORTAL_REALM
- See Also:
-
PORTLET_XML_FILE_NAME_CUSTOM
- See Also:
-
PORTLET_XML_FILE_NAME_STANDARD
- See Also:
-
TEMP_OBFUSCATION_VALUE
- See Also:
-
-
Method Details
-
addPageDescription
void addPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Appends the description to the current meta description of the page.- Parameters:
description
- the description to append to the current meta descriptionhttpServletRequest
- the servlet request for the page
-
addPageKeywords
Appends the keywords to the current meta keywords of the page.- Parameters:
keywords
- the keywords to add to the current meta keywords (comma-separated)httpServletRequest
- the servlet request for the page
-
addPageSubtitle
Appends the subtitle to the current subtitle of the page.- Parameters:
subtitle
- the subtitle to append to the current subtitlehttpServletRequest
- the servlet request for the page
-
addPageTitle
Appends the title to the current title of the page.- Parameters:
title
- the title to append to the current titlehttpServletRequest
- the servlet request for the page
-
addPortletBreadcrumbEntry
void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url) Adds an entry to the portlet breadcrumbs for the page.- Parameters:
httpServletRequest
- the servlet request for the pagetitle
- the title of the new breakcrumb entryurl
- the URL of the new breadcrumb entry
-
addPortletBreadcrumbEntry
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.- Parameters:
httpServletRequest
- the servlet request for the pagetitle
- the title of the new breakcrumb entryurl
- the URL of the new breadcrumb entrydata
- the HTML5 data parameters of the new breadcrumb entry
-
addPortletBreadcrumbEntry
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.- Parameters:
httpServletRequest
- the servlet request for the pagetitle
- the title of the new breakcrumb 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
void addPortletDefaultResource(javax.servlet.http.HttpServletRequest httpServletRequest, Portlet portlet) throws PortalException Adds the default resource permissions for the portlet to the page.- Parameters:
httpServletRequest
- the servlet request for the pageportlet
- the portlet- Throws:
PortalException
- if a portal exception occurred
-
addPortletDefaultResource
void addPortletDefaultResource(long companyId, Layout layout, Portlet portlet) throws PortalException - Throws:
PortalException
-
addPreservedParameters
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 layouturl
- 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
String addPreservedParameters(ThemeDisplay themeDisplay, String url, boolean typeControlPanel, boolean doAsUser) -
copyRequestParameters
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 an allowed for redirects
-
generateRandomKey
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
LayoutQueryStringComposite getActualLayoutQueryStringComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getActualURL
String getActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getAlternateURL
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 (translated) pagelayout
- 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
Map<Locale,String> getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout) throws PortalException - Throws:
PortalException
-
getAlternateURLs
Map<Locale,String> getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout, Set<Locale> availableLocales) throws PortalException - Throws:
PortalException
-
getAncestorSiteGroupIds
long[] getAncestorSiteGroupIds(long groupId) -
getCanonicalURL
String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout) throws PortalException Returns the canonical URL of the page, to distinguish it among its translations.- Parameters:
completeURL
- the complete URL of the pagethemeDisplay
- the current theme displaylayout
- the layout. If it isnull
, then it is generated for the current layout- Returns:
- the canonical URL
- Throws:
PortalException
- if a portal exception occurred
-
getCanonicalURL
String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL) throws PortalException Returns the canonical URL of the page, to distinguish it among its translations.- Parameters:
completeURL
- the complete URL of the pagethemeDisplay
- the current theme displaylayout
- the layout. If it isnull
, then it is generated for the current layoutforceLayoutFriendlyURL
- adds the page friendly URL to the canonical URL even if it is not needed- Returns:
- the canonical URL
- Throws:
PortalException
- if a portal exception occurred
-
getCanonicalURL
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 or insecure CDN host address- Returns:
- the CDN host address
-
getCDNHost
- 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
- Throws:
PortalException
-
getCompany
- Throws:
PortalException
-
getCompanyId
long getCompanyId(javax.servlet.http.HttpServletRequest httpServletRequest) -
getCompanyId
-
getCompanyIds
long[] getCompanyIds() -
getComputerAddresses
-
getComputerName
String getComputerName() -
getControlPanelFullURL
String getControlPanelFullURL(long scopeGroupId, String ppid, Map<String, String[]> params) throws PortalException- Throws:
PortalException
-
getControlPanelPlid
- Throws:
PortalException
-
getControlPanelPlid
- Throws:
PortalException
-
getControlPanelPortletURL
PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) -
getControlPanelPortletURL
PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, String lifecycle) -
getControlPanelPortletURL
PortletURL getControlPanelPortletURL(PortletRequest portletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle) -
getControlPanelPortletURL
PortletURL getControlPanelPortletURL(PortletRequest portletRequest, String portletId, String lifecycle) -
getCreateAccountURL
String getCreateAccountURL(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay) throws Exception - Throws:
Exception
-
getCurrentAndAncestorSiteGroupIds
long[] getCurrentAndAncestorSiteGroupIds(long groupId) -
getCurrentAndAncestorSiteGroupIds
long[] getCurrentAndAncestorSiteGroupIds(long groupId, boolean checkContentSharingWithChildrenEnabled) -
getCurrentAndAncestorSiteGroupIds
long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds) -
getCurrentAndAncestorSiteGroupIds
long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) -
getCurrentAndAncestorSiteGroups
-
getCurrentAndAncestorSiteGroups
-
getCurrentCompleteURL
-
getCurrentURL
-
getCurrentURL
-
getCustomSQLFunctionIsNotNull
String getCustomSQLFunctionIsNotNull() -
getCustomSQLFunctionIsNull
String 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
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
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
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
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
long getDefaultCompanyId() -
getEmailFromAddress
String getEmailFromAddress(PortletPreferences portletPreferences, long companyId, String defaultValue) -
getEmailFromName
-
getForwardedHost
-
getForwardedPort
int getForwardedPort(javax.servlet.http.HttpServletRequest httpServletRequest) -
getFullName
-
getGoogleGadgetURL
- Throws:
PortalException
-
getGroupFriendlyURL
String getGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, boolean canonicalURL, boolean controlPanel) throws PortalException - Throws:
PortalException
-
getGroupFriendlyURL
String getGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale) throws PortalException - Throws:
PortalException
-
getGroupFriendlyURLIndex
-
getHomeURL
- Throws:
PortalException
-
getHost
-
getHost
-
getHttpServletRequest
-
getHttpServletResponse
-
getI18nPathLanguageId
-
getJsSafePortletId
-
getLayoutActualURL
-
getLayoutActualURL
-
getLayoutActualURL
String getLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getLayoutFriendlyURL
- Throws:
PortalException
-
getLayoutFriendlyURL
String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) throws PortalException - Throws:
PortalException
-
getLayoutFriendlyURL
- Throws:
PortalException
-
getLayoutFriendlyURLSeparatorComposite
LayoutFriendlyURLSeparatorComposite getLayoutFriendlyURLSeparatorComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String, String[]> params, Map<String, throws PortalExceptionObject> requestContext) - Throws:
PortalException
-
getLayoutFullURL
- Throws:
PortalException
-
getLayoutFullURL
String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException - Throws:
PortalException
-
getLayoutFullURL
- Throws:
PortalException
-
getLayoutFullURL
- Throws:
PortalException
-
getLayoutFullURL
- Throws:
PortalException
-
getLayoutRelativeURL
- Throws:
PortalException
-
getLayoutRelativeURL
String getLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException - Throws:
PortalException
-
getLayoutSetDisplayURL
- Throws:
PortalException
-
getLayoutSetFriendlyURL
String getLayoutSetFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
getLayoutTarget
-
getLayoutURL
- Throws:
PortalException
-
getLayoutURL
String getLayoutURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException - Throws:
PortalException
-
getLayoutURL
- Throws:
PortalException
-
getLayoutURL
- Throws:
PortalException
-
getLiferayPortletRequest
-
getLiferayPortletResponse
-
getLocale
-
getLocale
Locale getLocale(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean initialize) -
getLocale
-
getMailId
-
getNetvibesURL
- Throws:
PortalException
-
getNewPortletTitle
-
getOriginalServletRequest
javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest) -
getPathContext
String getPathContext() -
getPathContext
-
getPathContext
-
getPathContext
-
getPathFriendlyURLPrivateGroup
String getPathFriendlyURLPrivateGroup() -
getPathFriendlyURLPrivateUser
String getPathFriendlyURLPrivateUser() -
getPathFriendlyURLPublic
String getPathFriendlyURLPublic() -
getPathImage
String getPathImage() -
getPathMain
String getPathMain() -
getPathModule
String getPathModule() -
getPathProxy
String getPathProxy() -
getPlidFromFriendlyURL
-
getPlidFromPortletId
long getPlidFromPortletId(long groupId, boolean privateLayout, String portletId) throws PortalException - Throws:
PortalException
-
getPlidFromPortletId
- Throws:
PortalException
-
getPortalLocalPort
int getPortalLocalPort(boolean secure) -
getPortalProperties
Properties getPortalProperties() -
getPortalServerPort
int getPortalServerPort(boolean secure) -
getPortalURL
-
getPortalURL
-
getPortalURL
- Throws:
PortalException
-
getPortalURL
-
getPortalURL
-
getPortalURL
-
getPortalURL
-
getPortalURL
- Throws:
PortalException
-
getPortletConfig
PortletConfig getPortletConfig(long companyId, String portletId, javax.servlet.ServletContext servletContext) throws PortletException - Throws:
PortletException
-
getPortletDescription
-
getPortletDescription
-
getPortletDescription
-
getPortletDescription
-
getPortletDescription
-
getPortletFriendlyURLMapperLayoutQueryStringComposite
-
getPortletId
-
getPortletId
-
getPortletLongTitle
-
getPortletLongTitle
-
getPortletNamespace
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPortletTitle
-
getPreferences
-
getPreferencesValidator
-
getRelativeHomeURL
String getRelativeHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getResourceBundle
-
getScopeGroupId
long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getScopeGroupId
long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId) throws PortalException - Throws:
PortalException
-
getScopeGroupId
long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, boolean checkStagingGroup) throws PortalException - Throws:
PortalException
-
getScopeGroupId
-
getScopeGroupId
-
getScopeGroupId
long getScopeGroupId(long plid) -
getScopeGroupId
- Throws:
PortalException
-
getSelectedUser
User getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getSelectedUser
User getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest, boolean checkPermission) throws PortalException - Throws:
PortalException
-
getSelectedUser
- Throws:
PortalException
-
getSelectedUser
- Throws:
PortalException
-
getServletContextName
String getServletContextName() -
getSiteAdminURL
String getSiteAdminURL(String portalURL, Group group, String ppid, Map<String, String[]> params) throws PortalException- Throws:
PortalException
-
getSiteAdminURL
String getSiteAdminURL(ThemeDisplay themeDisplay, String ppid, Map<String, String[]> params) throws PortalException- Throws:
PortalException
-
getSiteDefaultLocale
- Throws:
PortalException
-
getSiteDefaultLocale
- Throws:
PortalException
-
getSiteGroupId
long getSiteGroupId(long groupId) -
getSiteLoginURL
Returns the URL of the login page for the current site if one is available.- Parameters:
themeDisplay
- the theme display for the current page- Returns:
- the URL of the login page for the current site, or
null
if one is not available - Throws:
PortalException
- if a portal exception occurred
-
getStaticResourceURL
-
getStaticResourceURL
-
getStaticResourceURL
-
getStaticResourceURL
-
getStrutsAction
-
getSystemGroups
String[] getSystemGroups() -
getSystemOrganizationRoles
String[] getSystemOrganizationRoles() -
getSystemRoles
String[] getSystemRoles() -
getSystemSiteRoles
String[] getSystemSiteRoles() -
getUniqueElementId
-
getUniqueElementId
-
getUploadPortletRequest
-
getUploadServletRequest
UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest) -
getUploadServletRequest
UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest, int fileSizeThreshold, String location) -
getUptime
Date getUptime() -
getURLWithSessionId
-
getUser
- Throws:
PortalException
-
getUser
- Throws:
PortalException
-
getUserEmailAddress
-
getUserId
long getUserId(javax.servlet.http.HttpServletRequest httpServletRequest) -
getUserId
-
getUserName
-
getUserName
-
getUserName
-
getUserName
-
getUserName
-
getUserPassword
-
getUserPassword
-
getUserPassword
-
getValidPortalDomain
-
getValidUserId
- Throws:
PortalException
-
getVirtualHostnames
-
getWidgetURL
- Throws:
PortalException
-
initUser
- Throws:
Exception
-
isCDNDynamicResourcesEnabled
boolean isCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
isCDNDynamicResourcesEnabled
boolean isCDNDynamicResourcesEnabled(long companyId) -
isCompanyAdmin
- Throws:
Exception
-
isCustomPortletMode
-
isForwardedSecure
boolean isForwardedSecure(javax.servlet.http.HttpServletRequest httpServletRequest) -
isGroupAdmin
- Throws:
Exception
-
isGroupControlPanelPath
-
isGroupFriendlyURL
-
isGroupOwner
- Throws:
Exception
-
isLayoutDescendant
- Throws:
PortalException
-
isLayoutSitemapable
-
isLoginRedirectRequired
boolean isLoginRedirectRequired(javax.servlet.http.HttpServletRequest httpServletRequest) -
isMultipartRequest
boolean isMultipartRequest(javax.servlet.http.HttpServletRequest httpServletRequest) -
isOmniadmin
boolean isOmniadmin(long userId) -
isOmniadmin
-
isReservedParameter
-
isRightToLeft
boolean isRightToLeft(javax.servlet.http.HttpServletRequest httpServletRequest) -
isRSSFeedsEnabled
boolean isRSSFeedsEnabled() -
isSecure
boolean isSecure(javax.servlet.http.HttpServletRequest httpServletRequest) -
isSkipPortletContentRendering
boolean isSkipPortletContentRendering(Group group, LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay, String portletName) -
isSystemGroup
-
isSystemRole
-
isValidPortalDomain
-
isValidResourceId
-
resetCDNHosts
void resetCDNHosts() -
sendError
void sendError(Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) throws IOException - Throws:
IOException
-
sendError
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
void sendError(int status, Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) throws IOException - Throws:
IOException
-
sendError
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
void sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
sendRSSFeedsDisabledError
void sendRSSFeedsDisabledError(PortletRequest portletRequest, PortletResponse portletResponse) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
setPageDescription
void setPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest) Sets the description for the page, overriding the existing page description. -
setPageKeywords
Sets the keywords for the page, overriding the existing page keywords. -
setPageSubtitle
Sets the subtitle for the page, overriding the existing page subtitle. -
setPageTitle
Sets the whole title for the page, overriding the existing page whole title. -
setPortalInetSocketAddresses
void setPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest httpServletRequest) -
stripURLAnchor
-
transformCustomSQL
-
transformSQL
-
updateImageId
void updateImageId(BaseModel<?> baseModel, boolean image, byte[] bytes, String fieldName, long maxSize, int maxHeight, int maxWidth) throws PortalException - Throws:
PortalException
-
updatePortletMode
PortletMode updatePortletMode(String portletId, User user, Layout layout, PortletMode portletMode, javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
updateRedirect
-
updateWindowState
WindowState updateWindowState(String portletId, User user, Layout layout, WindowState windowState, javax.servlet.http.HttpServletRequest httpServletRequest)
-