public class PortalUtil
extends Object
Constructor and Description |
---|
PortalUtil() |
Modifier and Type | Method and Description |
---|---|
static 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 boolean |
addPortalInetSocketAddressEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener) |
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(javax.servlet.http.HttpServletRequest httpServletRequest,
Portlet portlet)
Adds the default resource permissions for the portlet to the page in the
request.
|
static void |
addPortletDefaultResource(long companyId,
Layout layout,
Portlet portlet) |
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 |
addUserLocaleOptionsMessage(javax.servlet.http.HttpServletRequest httpServletRequest) |
static void |
clearRequestParameters(RenderRequest renderRequest)
Clears the render parameters in the request if the portlet is in the
action phase.
|
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.
|
static Map<Locale,String> |
getAlternateURLs(String canonicalURL,
ThemeDisplay themeDisplay,
Layout layout) |
static long[] |
getAncestorSiteGroupIds(long groupId) |
static BaseModel<?> |
getBaseModel(ResourcePermission resourcePermission)
Returns the base model instance for the resource permission.
|
static BaseModel<?> |
getBaseModel(String modelName,
String primKey)
Returns the base model instance for the model name and primary key.
|
static List<Group> |
getBrowsableScopeGroups(long userId,
long companyId,
long groupId,
String portletId) |
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
address
|
static String |
getCDNHostHttps(long companyId)
Returns the secure (HTTPS) content distribution network (CDN) host
address
|
static 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(javax.servlet.http.HttpServletRequest httpServletRequest) |
static Company |
getCompany(PortletRequest portletRequest) |
static long |
getCompanyId(javax.servlet.http.HttpServletRequest httpServletRequest) |
static long |
getCompanyId(PortletRequest portletRequest) |
static long[] |
getCompanyIds() |
static Set<String> |
getComputerAddresses() |
static String |
getComputerName() |
static String |
getControlPanelFullURL(long scopeGroupId,
String ppid,
Map<String,String[]> params) |
static long |
getControlPanelPlid(long companyId) |
static long |
getControlPanelPlid(PortletRequest portletRequest) |
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 PortletURL |
getControlPanelPortletURL(PortletRequest portletRequest,
Group group,
String portletId,
long refererGroupId,
long refererPlid,
String lifecycle) |
static PortletURL |
getControlPanelPortletURL(PortletRequest portletRequest,
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) |
static List<Group> |
getCurrentAndAncestorSiteGroups(long groupId) |
static List<Group> |
getCurrentAndAncestorSiteGroups(long[] groupIds) |
static List<Group> |
getCurrentAndAncestorSiteGroups(long[] groupIds,
boolean checkContentSharingWithChildrenEnabled) |
static List<Group> |
getCurrentAndAncestorSiteGroups(long groupId,
boolean checkContentSharingWithChildrenEnabled) |
static String |
getCurrentCompleteURL(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getCurrentURL(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getCurrentURL(PortletRequest portletRequest) |
static String |
getCustomSQLFunctionIsNotNull() |
static String |
getCustomSQLFunctionIsNull() |
static Date |
getDate(int month,
int day,
int year)
Returns the date object for the specified month, day, and year, or
null 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,
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,
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 |
getDefaultCompanyId() |
static String |
getEmailFromAddress(PortletPreferences preferences,
long companyId,
String defaultValue) |
static String |
getEmailFromName(PortletPreferences preferences,
long companyId,
String defaultValue) |
static Map<String,Serializable> |
getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
javax.servlet.http.HttpServletRequest httpServletRequest) |
static Map<String,Serializable> |
getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
PortletRequest portletRequest) |
static Map<String,Serializable> |
getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
UploadPortletRequest uploadPortletRequest) |
static Serializable |
getExpandoValue(javax.servlet.http.HttpServletRequest httpServletRequest,
String name,
int type,
String displayType) |
static Serializable |
getExpandoValue(PortletRequest portletRequest,
String name,
int type,
String displayType) |
static Serializable |
getExpandoValue(UploadPortletRequest uploadPortletRequest,
String name,
int type,
String displayType) |
static String |
getFirstPageLayoutTypes(javax.servlet.http.HttpServletRequest httpServletRequest) |
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 |
getGlobalLibDir() |
static String |
getGoogleGadgetURL(Portlet portlet,
ThemeDisplay themeDisplay) |
static String |
getGroupFriendlyURL(LayoutSet layoutSet,
ThemeDisplay themeDisplay) |
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(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getHost(PortletRequest portletRequest) |
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(Layout layout) |
static String |
getLayoutActualURL(Layout layout,
String mainPath) |
static String |
getLayoutActualURL(long groupId,
boolean privateLayout,
String mainPath,
String friendlyURL) |
static String |
getLayoutActualURL(long groupId,
boolean privateLayout,
String mainPath,
String friendlyURL,
Map<String,String[]> params,
Map<String,Object> requestContext) |
static String |
getLayoutFriendlyURL(Layout layout,
ThemeDisplay themeDisplay) |
static String |
getLayoutFriendlyURL(Layout layout,
ThemeDisplay themeDisplay,
Locale locale) |
static String |
getLayoutFriendlyURL(ThemeDisplay themeDisplay) |
static LayoutFriendlyURLSeparatorComposite |
getLayoutFriendlyURLSeparatorComposite(long groupId,
boolean privateLayout,
String friendlyURL,
Map<String,String[]> params,
Map<String,Object> requestContext) |
static String |
getLayoutFullURL(Layout layout,
ThemeDisplay themeDisplay) |
static String |
getLayoutFullURL(Layout layout,
ThemeDisplay themeDisplay,
boolean doAsUser) |
static String |
getLayoutFullURL(long groupId,
String portletId) |
static String |
getLayoutFullURL(long groupId,
String portletId,
boolean secure) |
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(javax.servlet.http.HttpServletRequest httpServletRequest) |
static Locale |
getLocale(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
boolean initialize) |
static Locale |
getLocale(PortletRequest portletRequest) |
static String |
getLocalizedFriendlyURL(javax.servlet.http.HttpServletRequest httpServletRequest,
Layout layout,
Locale locale,
Locale originalLocale) |
static String |
getMailId(String mx,
String popPortletPrefix,
Object... ids) |
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 |
getPathContext() |
static String |
getPathContext(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getPathContext(PortletRequest portletRequest) |
static String |
getPathContext(String contextPath) |
static String |
getPathFriendlyURLPrivateGroup() |
static String |
getPathFriendlyURLPrivateUser() |
static String |
getPathFriendlyURLPublic() |
static String |
getPathImage() |
static String |
getPathMain() |
static String |
getPathModule() |
static String |
getPathProxy() |
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 |
getPortal() |
static PortalInetSocketAddressEventListener[] |
getPortalInetSocketAddressEventListeners() |
static String |
getPortalLibDir() |
static InetAddress |
getPortalLocalInetAddress(boolean secure) |
static int |
getPortalLocalPort(boolean secure) |
static Properties |
getPortalProperties() |
static InetAddress |
getPortalServerInetAddress(boolean secure) |
static int |
getPortalServerPort(boolean secure) |
static String |
getPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest,
boolean secure) |
static String |
getPortalURL(LayoutSet layoutSet,
ThemeDisplay themeDisplay) |
static String |
getPortalURL(Layout layout,
ThemeDisplay themeDisplay) |
static String |
getPortalURL(PortletRequest portletRequest) |
static String |
getPortalURL(PortletRequest portletRequest,
boolean secure) |
static String |
getPortalURL(String serverName,
int serverPort,
boolean secure) |
static String |
getPortalURL(ThemeDisplay themeDisplay) |
static String |
getPortalWebDir() |
static PortletConfig |
getPortletConfig(long companyId,
String portletId,
javax.servlet.ServletContext servletContext) |
static String |
getPortletDescription(Portlet portlet,
javax.servlet.ServletContext servletContext,
Locale locale) |
static String |
getPortletDescription(Portlet portlet,
User user) |
static String |
getPortletDescription(String portletId,
Locale locale) |
static String |
getPortletDescription(String portletId,
String languageId) |
static String |
getPortletDescription(String portletId,
User user) |
static String |
getPortletId(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getPortletId(PortletRequest portletRequest) |
static String |
getPortletLongTitle(Portlet portlet,
Locale locale) |
static String |
getPortletLongTitle(Portlet portlet,
javax.servlet.ServletContext servletContext,
Locale locale) |
static String |
getPortletLongTitle(Portlet portlet,
String languageId) |
static String |
getPortletLongTitle(Portlet portlet,
User user) |
static String |
getPortletLongTitle(String portletId,
Locale locale) |
static String |
getPortletLongTitle(String portletId,
String languageId) |
static String |
getPortletLongTitle(String portletId,
User user) |
static String |
getPortletNamespace(String portletId) |
static String |
getPortletTitle(Portlet portlet,
Locale locale) |
static String |
getPortletTitle(PortletRequest portletRequest) |
static String |
getPortletTitle(PortletResponse portletResponse) |
static String |
getPortletTitle(Portlet portlet,
javax.servlet.ServletContext servletContext,
Locale locale) |
static String |
getPortletTitle(Portlet portlet,
String languageId) |
static String |
getPortletTitle(Portlet portlet,
User user) |
static String |
getPortletTitle(String portletId,
Locale locale) |
static String |
getPortletTitle(String portletId,
ResourceBundle resourceBundle) |
static String |
getPortletTitle(String portletId,
String languageId) |
static String |
getPortletTitle(String portletId,
User user) |
static String |
getPortletXmlFileName() |
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(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 long |
getScopeGroupId(Layout layout) |
static long |
getScopeGroupId(Layout layout,
String portletId) |
static long |
getScopeGroupId(long plid) |
static long |
getScopeGroupId(PortletRequest portletRequest) |
static User |
getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest) |
static User |
getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest,
boolean checkPermission) |
static User |
getSelectedUser(PortletRequest portletRequest) |
static User |
getSelectedUser(PortletRequest portletRequest,
boolean checkPermission) |
static String |
getServletContextName() |
static long[] |
getSharedContentSiteGroupIds(long companyId,
long groupId,
long userId) |
static String |
getSiteAdminURL(ThemeDisplay themeDisplay,
String ppid,
Map<String,String[]> params) |
static Locale |
getSiteDefaultLocale(Group group) |
static Locale |
getSiteDefaultLocale(long groupId) |
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[] |
getSystemGroups() |
static String[] |
getSystemOrganizationRoles() |
static String[] |
getSystemRoles() |
static String[] |
getSystemSiteRoles() |
static String |
getUniqueElementId(javax.servlet.http.HttpServletRequest httpServletRequest,
String namespace,
String id) |
static String |
getUniqueElementId(PortletRequest request,
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,
long maxRequestSize,
long maxFileSize) |
static Date |
getUptime() |
static String |
getURLWithSessionId(String url,
String sessionId) |
static User |
getUser(javax.servlet.http.HttpServletRequest httpServletRequest) |
static User |
getUser(PortletRequest portletRequest) |
static String |
getUserEmailAddress(long userId) |
static long |
getUserId(javax.servlet.http.HttpServletRequest httpServletRequest) |
static long |
getUserId(PortletRequest portletRequest) |
static String |
getUserName(BaseModel<?> baseModel) |
static String |
getUserName(long userId,
String defaultUserName) |
static String |
getUserName(long userId,
String defaultUserName,
javax.servlet.http.HttpServletRequest httpServletRequest) |
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 |
getUserPassword(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getUserPassword(javax.servlet.http.HttpSession session) |
static String |
getUserPassword(PortletRequest portletRequest) |
static String |
getValidPortalDomain(long companyId,
String domain) |
static long |
getValidUserId(long companyId,
long userId) |
static String |
getVirtualHostname(LayoutSet layoutSet)
Deprecated.
As of Mueller (7.2.x), replaced by
getVirtualHostnames(LayoutSet) |
static TreeMap<String,String> |
getVirtualHostnames(LayoutSet layoutSet) |
static String |
getWidgetURL(Portlet portlet,
ThemeDisplay themeDisplay) |
static void |
initCustomSQL() |
static User |
initUser(javax.servlet.http.HttpServletRequest httpServletRequest) |
static boolean |
isCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest httpServletRequest) |
static boolean |
isCDNDynamicResourcesEnabled(long companyId) |
static boolean |
isCompanyAdmin(User user) |
static boolean |
isCompanyControlPanelPortlet(String portletId,
String category,
ThemeDisplay themeDisplay) |
static boolean |
isCompanyControlPanelPortlet(String portletId,
ThemeDisplay themeDisplay) |
static boolean |
isControlPanelPortlet(String portletId,
String category,
ThemeDisplay themeDisplay) |
static boolean |
isControlPanelPortlet(String portletId,
ThemeDisplay themeDisplay) |
static boolean |
isCustomPortletMode(PortletMode portletMode) |
static boolean |
isForwardedSecure(javax.servlet.http.HttpServletRequest httpServletRequest) |
static boolean |
isGroupAdmin(User user,
long groupId) |
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 |
isMethodGet(PortletRequest portletRequest) |
static boolean |
isMethodPost(PortletRequest portletRequest) |
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 |
isRSSFeedsEnabled() |
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 |
isUpdateAvailable() |
static boolean |
isValidResourceId(String resourceId) |
static boolean |
removePortalEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener) |
static void |
resetCDNHosts() |
static String |
resetPortletParameters(String url,
String portletId) |
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 |
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 |
sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
static void |
sendRSSFeedsDisabledError(PortletRequest portletRequest,
PortletResponse portletResponse) |
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 |
setPortal(Portal portal) |
static void |
setPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest httpServletRequest) |
static void |
storePreferences(PortletPreferences portletPreferences) |
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) |
public static void addPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest)
description
- the description to append to the current meta
descriptionhttpServletRequest
- the servlet request for the pagepublic static void addPageKeywords(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest)
keywords
- the keywords to add to the current meta keywords
(comma-separated)httpServletRequest
- the servlet request for the pagepublic static void addPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest)
subtitle
- the subtitle to append to the current subtitlehttpServletRequest
- the servlet request for the pagepublic static void addPageTitle(String title, javax.servlet.http.HttpServletRequest httpServletRequest)
title
- the title to append to the current titlehttpServletRequest
- the servlet request for the pagepublic static boolean addPortalInetSocketAddressEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener)
public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url)
httpServletRequest
- the servlet request for the pagetitle
- the title of the new breadcrumb entryurl
- the URL of the new breadcrumb entrypublic static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url, Map<String,Object> data)
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 entrypublic static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest httpServletRequest, String title, String url, Map<String,Object> data, boolean portletBreadcrumbEntry)
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
entrypublic static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest httpServletRequest, Portlet portlet) throws PortalException
httpServletRequest
- the servlet request for the pageportlet
- the portletPortalException
- if a portal exception occurredpublic static void addPortletDefaultResource(long companyId, Layout layout, Portlet portlet) throws PortalException
PortalException
public static String addPreservedParameters(ThemeDisplay themeDisplay, Layout layout, String url, boolean doAsUser)
Preserved parameters are parameters that should be sent with every request as the user navigates the portal.
themeDisplay
- the current theme displaylayout
- the current pageurl
- the URLdoAsUser
- whether to include doAsUserId and doAsLanguageId in the
URL if they are available. If false
, doAsUserId and
doAsUserLanguageId will never be added.public static String addPreservedParameters(ThemeDisplay themeDisplay, String url)
themeDisplay
- the current theme displayurl
- the URLpublic static String addPreservedParameters(ThemeDisplay themeDisplay, String url, boolean typeControlPanel, boolean doAsUser)
public static void addUserLocaleOptionsMessage(javax.servlet.http.HttpServletRequest httpServletRequest)
public static void clearRequestParameters(RenderRequest renderRequest)
renderRequest
- the render requestpublic static void copyRequestParameters(ActionRequest actionRequest, ActionResponse actionResponse)
actionRequest
- the request from which to get the request parametersactionResponse
- the response to receive the render parameterspublic static String escapeRedirect(String url)
url
- the URL to escapenull
if the URL is not allowed
for redirectspublic static String generateRandomKey(javax.servlet.http.HttpServletRequest httpServletRequest, String input)
httpServletRequest
- the servlet request for the pageinput
- the input stringpublic static String getAbsoluteURL(javax.servlet.http.HttpServletRequest httpServletRequest, String url)
public static LayoutQueryStringComposite getActualLayoutQueryStringComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext) throws PortalException
PortalException
public static String getActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext) throws PortalException
PortalException
public static String getAlternateURL(String canonicalURL, ThemeDisplay themeDisplay, Locale locale, Layout layout) throws PortalException
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.
canonicalURL
- the canonical URL being requested. For more
information, see getCanonicalURL(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 requestedPortalException
- if a portal exception occurredpublic static Map<Locale,String> getAlternateURLs(String canonicalURL, ThemeDisplay themeDisplay, Layout layout) throws PortalException
PortalException
public static long[] getAncestorSiteGroupIds(long groupId)
public static BaseModel<?> getBaseModel(ResourcePermission resourcePermission) throws PortalException
resourcePermission
- the resource permissionnull
if the resource
permission does not have a base model instance (such as if it's a
portlet)PortalException
- if a portal exception occurredpublic static BaseModel<?> getBaseModel(String modelName, String primKey) throws PortalException
modelName
- the fully qualified class name of the modelprimKey
- the primary key of the model instance to getnull
if the model does
not have a base model instance (such as if it's a portlet)PortalException
- if a portal exception occurredpublic static List<Group> getBrowsableScopeGroups(long userId, long companyId, long groupId, String portletId) throws PortalException
PortalException
public static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout) throws PortalException
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.
completeURL
- the complete URL of the pagethemeDisplay
- the theme displaylayout
- the page being requested (optionally null
).
If null
is specified, the current page is used.PortalException
- if a portal exception occurredpublic static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL) throws PortalException
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.
completeURL
- the complete URL of the pagethemeDisplay
- the current theme displaylayout
- the page. If it is null
, then it is generated
for the current page.forceLayoutFriendlyURL
- whether to add the page's friendly URL to
the canonical URLPortalException
- if a portal exception occurredpublic static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL, boolean includeQueryString) throws PortalException
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.
completeURL
- the complete URL of the pagethemeDisplay
- the theme displaylayout
- the page being requested (optionally null
).
If null
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 URLPortalException
- if a portal exception occurredpublic static String getCDNHost(boolean secure)
secure
- whether to get the secure CDN host addresspublic static String getCDNHost(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static String getCDNHostHttp(long companyId)
companyId
- the company ID of a sitepublic static String getCDNHostHttps(long companyId)
companyId
- the company ID of a sitepublic static String getClassName(long classNameId)
classNameId
- the ID of the classpublic static long getClassNameId(Class<?> clazz)
clazz
- the class objectpublic static long getClassNameId(String value)
value
- the fully qualified name of the classpublic static Company getCompany(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static Company getCompany(PortletRequest portletRequest) throws PortalException
PortalException
public static long getCompanyId(javax.servlet.http.HttpServletRequest httpServletRequest)
public static long getCompanyId(PortletRequest portletRequest)
public static long[] getCompanyIds()
public static Set<String> getComputerAddresses()
public static String getComputerName()
public static String getControlPanelFullURL(long scopeGroupId, String ppid, Map<String,String[]> params) throws PortalException
PortalException
public static long getControlPanelPlid(long companyId) throws PortalException
PortalException
public static long getControlPanelPlid(PortletRequest portletRequest) throws PortalException
PortalException
public static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle)
public static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, String lifecycle)
public static PortletURL getControlPanelPortletURL(PortletRequest portletRequest, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle)
public static PortletURL getControlPanelPortletURL(PortletRequest portletRequest, String portletId, String lifecycle)
public static String getCreateAccountURL(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay) throws Exception
Exception
public static long[] getCurrentAndAncestorSiteGroupIds(long groupId) throws PortalException
PortalException
public static long[] getCurrentAndAncestorSiteGroupIds(long groupId, boolean checkContentSharingWithChildrenEnabled) throws PortalException
PortalException
public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds) throws PortalException
PortalException
public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) throws PortalException
PortalException
public static List<Group> getCurrentAndAncestorSiteGroups(long groupId) throws PortalException
PortalException
public static List<Group> getCurrentAndAncestorSiteGroups(long groupId, boolean checkContentSharingWithChildrenEnabled) throws PortalException
PortalException
public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds) throws PortalException
PortalException
public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds, boolean checkContentSharingWithChildrenEnabled) throws PortalException
PortalException
public static String getCurrentCompleteURL(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getCurrentURL(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getCurrentURL(PortletRequest portletRequest)
public static String getCustomSQLFunctionIsNotNull()
public static String getCustomSQLFunctionIsNull()
public static Date getDate(int month, int day, int year)
null
if the date is invalid.month
- the month (0-based, meaning 0 for January)day
- the day of the monthyear
- the yearnull
if the date is invalidpublic static Date getDate(int month, int day, int year, Class<? extends PortalException> clazz) throws PortalException
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. If
null
, no exception will be thrown for an invalid
date.null
if the date is invalid and
no exception to throw was providedPortalException
- if a portal exception occurredpublic static Date getDate(int month, int day, int year, int hour, int min, Class<? extends PortalException> clazz) throws PortalException
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. If
null
, no exception will be thrown for an invalid
date.null
if the date is invalid and
no exception to throw was providedPortalException
- if a portal exception occurredpublic static Date getDate(int month, int day, int year, int hour, int min, TimeZone timeZone, Class<? extends PortalException> clazz) throws PortalException
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. If
null
, no exception will be thrown for an invalid
date.null
if the date is invalid and
no exception to throw was providedPortalException
- if a portal exception occurredpublic static Date getDate(int month, int day, int year, TimeZone timeZone, Class<? extends PortalException> clazz) throws PortalException
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. If
null
, no exception will be thrown for an invalid
date.null
if the date is invalid and
no exception to throw was providedPortalException
- if a portal exception occurredpublic static long getDefaultCompanyId()
public static String getEmailFromAddress(PortletPreferences preferences, long companyId, String defaultValue)
public static String getEmailFromName(PortletPreferences preferences, long companyId, String defaultValue)
public static Map<String,Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge, javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static Map<String,Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge, PortletRequest portletRequest) throws PortalException
PortalException
public static Map<String,Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge, UploadPortletRequest uploadPortletRequest) throws PortalException
PortalException
public static Serializable getExpandoValue(javax.servlet.http.HttpServletRequest httpServletRequest, String name, int type, String displayType) throws PortalException
PortalException
public static Serializable getExpandoValue(PortletRequest portletRequest, String name, int type, String displayType) throws PortalException
PortalException
public static Serializable getExpandoValue(UploadPortletRequest uploadPortletRequest, String name, int type, String displayType) throws PortalException
PortalException
public static String getFirstPageLayoutTypes(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getForwardedHost(javax.servlet.http.HttpServletRequest httpServletRequest)
public static int getForwardedPort(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getFullName(String firstName, String middleName, String lastName)
public static String getGlobalLibDir()
public static String getGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getGroupFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay, Locale locale) throws PortalException
PortalException
public static int[] getGroupFriendlyURLIndex(String requestURI)
public static String getHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static String getHost(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getHost(PortletRequest portletRequest)
public static javax.servlet.http.HttpServletRequest getHttpServletRequest(PortletRequest portletRequest)
public static javax.servlet.http.HttpServletResponse getHttpServletResponse(PortletResponse portletResponse)
public static String getI18nPathLanguageId(Locale locale, String defaultI18nPathLanguageId)
public static String getJsSafePortletId(String portletId)
public static String getLayoutActualURL(Layout layout)
public static String getLayoutActualURL(Layout layout, String mainPath)
public static String getLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL) throws PortalException
PortalException
public static String getLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext) throws PortalException
PortalException
public static String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) throws PortalException
PortalException
public static String getLayoutFriendlyURL(ThemeDisplay themeDisplay) throws PortalException
PortalException
public static LayoutFriendlyURLSeparatorComposite getLayoutFriendlyURLSeparatorComposite(long groupId, boolean privateLayout, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext) throws PortalException
PortalException
public static String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException
PortalException
public static String getLayoutFullURL(long groupId, String portletId) throws PortalException
PortalException
public static String getLayoutFullURL(long groupId, String portletId, boolean secure) throws PortalException
PortalException
public static String getLayoutFullURL(ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException
PortalException
public static String getLayoutSetDisplayURL(LayoutSet layoutSet, boolean secureConnection) throws PortalException
PortalException
public static String getLayoutSetFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getLayoutTarget(Layout layout)
public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser) throws PortalException
PortalException
public static String getLayoutURL(Layout layout, ThemeDisplay themeDisplay, Locale locale) throws PortalException
PortalException
public static String getLayoutURL(ThemeDisplay themeDisplay) throws PortalException
PortalException
public static LiferayPortletRequest getLiferayPortletRequest(PortletRequest portletRequest)
public static LiferayPortletResponse getLiferayPortletResponse(PortletResponse portletResponse)
public static Locale getLocale(javax.servlet.http.HttpServletRequest httpServletRequest)
public static Locale getLocale(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean initialize)
public static Locale getLocale(PortletRequest portletRequest)
public static String getLocalizedFriendlyURL(javax.servlet.http.HttpServletRequest httpServletRequest, Layout layout, Locale locale, Locale originalLocale)
public static String getMailId(String mx, String popPortletPrefix, Object... ids)
public static String getNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getNewPortletTitle(String portletTitle, String oldScopeName, String newScopeName)
public static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getPathContext()
public static String getPathContext(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getPathContext(PortletRequest portletRequest)
public static String getPathContext(String contextPath)
public static String getPathFriendlyURLPrivateGroup()
public static String getPathFriendlyURLPrivateUser()
public static String getPathFriendlyURLPublic()
public static String getPathImage()
public static String getPathMain()
public static String getPathModule()
public static String getPathProxy()
public static long getPlidFromFriendlyURL(long companyId, String friendlyURL)
public static long getPlidFromPortletId(long groupId, boolean privateLayout, String portletId) throws PortalException
PortalException
public static long getPlidFromPortletId(long groupId, String portletId) throws PortalException
PortalException
public static Portal getPortal()
public static PortalInetSocketAddressEventListener[] getPortalInetSocketAddressEventListeners()
public static String getPortalLibDir()
public static InetAddress getPortalLocalInetAddress(boolean secure)
public static int getPortalLocalPort(boolean secure)
public static Properties getPortalProperties()
public static InetAddress getPortalServerInetAddress(boolean secure)
public static int getPortalServerPort(boolean secure)
public static String getPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getPortalURL(javax.servlet.http.HttpServletRequest httpServletRequest, boolean secure)
public static String getPortalURL(Layout layout, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getPortalURL(LayoutSet layoutSet, ThemeDisplay themeDisplay)
public static String getPortalURL(PortletRequest portletRequest)
public static String getPortalURL(PortletRequest portletRequest, boolean secure)
public static String getPortalURL(String serverName, int serverPort, boolean secure)
public static String getPortalURL(ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getPortalWebDir()
public static PortletConfig getPortletConfig(long companyId, String portletId, javax.servlet.ServletContext servletContext) throws PortletException
PortletException
public static String getPortletDescription(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale)
public static String getPortletDescription(String portletId, Locale locale)
public static String getPortletDescription(String portletId, String languageId)
public static String getPortletDescription(String portletId, User user)
public static String getPortletId(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getPortletId(PortletRequest portletRequest)
public static String getPortletLongTitle(Portlet portlet, Locale locale)
public static String getPortletLongTitle(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale)
public static String getPortletLongTitle(Portlet portlet, String languageId)
public static String getPortletLongTitle(String portletId, Locale locale)
public static String getPortletLongTitle(String portletId, String languageId)
public static String getPortletLongTitle(String portletId, User user)
public static String getPortletNamespace(String portletId)
public static String getPortletTitle(Portlet portlet, Locale locale)
public static String getPortletTitle(Portlet portlet, javax.servlet.ServletContext servletContext, Locale locale)
public static String getPortletTitle(Portlet portlet, String languageId)
public static String getPortletTitle(PortletRequest portletRequest)
public static String getPortletTitle(PortletResponse portletResponse)
public static String getPortletTitle(String portletId, Locale locale)
public static String getPortletTitle(String portletId, ResourceBundle resourceBundle)
public static String getPortletTitle(String portletId, String languageId)
public static String getPortletTitle(String portletId, User user)
public static String getPortletXmlFileName()
public static PortletPreferences getPreferences(javax.servlet.http.HttpServletRequest httpServletRequest)
public static PreferencesValidator getPreferencesValidator(Portlet portlet)
public static String getRelativeHomeURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static ResourceBundle getResourceBundle(Locale locale)
public static long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId) throws PortalException
PortalException
public static long getScopeGroupId(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId, boolean checkStagingGroup) throws PortalException
PortalException
public static long getScopeGroupId(Layout layout)
public static long getScopeGroupId(Layout layout, String portletId)
public static long getScopeGroupId(long plid)
public static long getScopeGroupId(PortletRequest portletRequest) throws PortalException
PortalException
public static User getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static User getSelectedUser(javax.servlet.http.HttpServletRequest httpServletRequest, boolean checkPermission) throws PortalException
PortalException
public static User getSelectedUser(PortletRequest portletRequest) throws PortalException
PortalException
public static User getSelectedUser(PortletRequest portletRequest, boolean checkPermission) throws PortalException
PortalException
public static String getServletContextName()
public static long[] getSharedContentSiteGroupIds(long companyId, long groupId, long userId) throws PortalException
PortalException
public static String getSiteAdminURL(ThemeDisplay themeDisplay, String ppid, Map<String,String[]> params) throws PortalException
PortalException
public static Locale getSiteDefaultLocale(Group group) throws PortalException
PortalException
public static Locale getSiteDefaultLocale(long groupId) throws PortalException
PortalException
public static long getSiteGroupId(long scopeGroupId)
public static String getSiteLoginURL(ThemeDisplay themeDisplay) throws PortalException
PortalException
public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri)
public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, long timestamp)
public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString)
public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest httpServletRequest, String uri, String queryString, long timestamp)
public static String getStrutsAction(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String[] getSystemGroups()
public static String[] getSystemOrganizationRoles()
public static String[] getSystemRoles()
public static String[] getSystemSiteRoles()
public static String getUniqueElementId(javax.servlet.http.HttpServletRequest httpServletRequest, String namespace, String id)
public static String getUniqueElementId(PortletRequest request, String namespace, String id)
public static UploadPortletRequest getUploadPortletRequest(PortletRequest portletRequest)
public static UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
public static UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest, int fileSizeThreshold, String location, long maxRequestSize, long maxFileSize)
public static Date getUptime()
public static String getURLWithSessionId(String url, String sessionId)
public static User getUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static User getUser(PortletRequest portletRequest) throws PortalException
PortalException
public static String getUserEmailAddress(long userId)
public static long getUserId(javax.servlet.http.HttpServletRequest httpServletRequest)
public static long getUserId(PortletRequest portletRequest)
public static String getUserName(BaseModel<?> baseModel)
public static String getUserName(long userId, String defaultUserName)
public static String getUserName(long userId, String defaultUserName, javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getUserName(long userId, String defaultUserName, String userAttribute)
public static String getUserName(long userId, String defaultUserName, String userAttribute, javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getUserPassword(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getUserPassword(javax.servlet.http.HttpSession session)
public static String getUserPassword(PortletRequest portletRequest)
public static String getValidPortalDomain(long companyId, String domain)
public static long getValidUserId(long companyId, long userId) throws PortalException
PortalException
@Deprecated public static String getVirtualHostname(LayoutSet layoutSet)
getVirtualHostnames(LayoutSet)
public static TreeMap<String,String> getVirtualHostnames(LayoutSet layoutSet)
public static String getWidgetURL(Portlet portlet, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static void initCustomSQL()
public static User initUser(javax.servlet.http.HttpServletRequest httpServletRequest) throws Exception
Exception
public static boolean isCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static boolean isCDNDynamicResourcesEnabled(long companyId)
public static boolean isCompanyAdmin(User user) throws Exception
Exception
public static boolean isCompanyControlPanelPortlet(String portletId, String category, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static boolean isCompanyControlPanelPortlet(String portletId, ThemeDisplay themeDisplay) throws PortalException
PortalException
public static boolean isControlPanelPortlet(String portletId, String category, ThemeDisplay themeDisplay)
public static boolean isControlPanelPortlet(String portletId, ThemeDisplay themeDisplay)
public static boolean isCustomPortletMode(PortletMode portletMode)
public static boolean isForwardedSecure(javax.servlet.http.HttpServletRequest httpServletRequest)
public static boolean isGroupAdmin(User user, long groupId) throws Exception
Exception
public static boolean isGroupFriendlyURL(String fullURL, String groupFriendlyURL, String layoutFriendlyURL)
public static boolean isGroupOwner(User user, long groupId) throws Exception
Exception
public static boolean isLayoutDescendant(Layout layout, long layoutId) throws PortalException
PortalException
public static boolean isLayoutSitemapable(Layout layout)
public static boolean isLoginRedirectRequired(javax.servlet.http.HttpServletRequest httpServletRequest)
public static boolean isMethodGet(PortletRequest portletRequest)
public static boolean isMethodPost(PortletRequest portletRequest)
public static boolean isMultipartRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
public static boolean isOmniadmin(long userId)
public static boolean isOmniadmin(User user)
public static boolean isReservedParameter(String name)
public static boolean isRightToLeft(javax.servlet.http.HttpServletRequest httpServletRequest)
public static boolean isRSSFeedsEnabled()
public static boolean isSecure(javax.servlet.http.HttpServletRequest httpServletRequest)
public static boolean isSkipPortletContentRendering(Group group, LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay, String portletName)
public static boolean isSystemGroup(String groupName)
public static boolean isSystemRole(String roleName)
public static boolean isUpdateAvailable()
public static boolean isValidResourceId(String resourceId)
public static boolean removePortalEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener)
public static void resetCDNHosts()
public static String resetPortletParameters(String url, String portletId)
public static void sendError(Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) throws IOException
IOException
public static void sendError(Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public static void sendError(int status, Exception exception, ActionRequest actionRequest, ActionResponse actionResponse) throws IOException
IOException
public static void sendError(int status, Exception exception, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public static void sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public static void sendRSSFeedsDisabledError(PortletRequest portletRequest, PortletResponse portletResponse) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public static void setPageDescription(String description, javax.servlet.http.HttpServletRequest httpServletRequest)
public static void setPageKeywords(String keywords, javax.servlet.http.HttpServletRequest httpServletRequest)
public static void setPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest httpServletRequest)
public static void setPageTitle(String title, javax.servlet.http.HttpServletRequest httpServletRequest)
public static void setPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest httpServletRequest)
public static void storePreferences(PortletPreferences portletPreferences) throws IOException, ValidatorException
IOException
ValidatorException
public static String[] stripURLAnchor(String url, String separator)
public static String transformCustomSQL(String sql)
public static String transformSQL(String sql)
public static void updateImageId(BaseModel<?> baseModel, boolean hasImage, byte[] bytes, String fieldName, long maxSize, int maxHeight, int maxWidth) throws PortalException
PortalException
public static PortletMode updatePortletMode(String portletId, User user, Layout layout, PortletMode portletMode, javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException
PortalException
public static String updateRedirect(String redirect, String oldPath, String newPath)
public static WindowState updateWindowState(String portletId, User user, Layout layout, WindowState windowState, javax.servlet.http.HttpServletRequest httpServletRequest)
public void setPortal(Portal portal)