Liferay 7.0-ce-b4

com.liferay.portal.util
Class PortalUtil

java.lang.Object
  extended by com.liferay.portal.util.PortalUtil

@ProviderType
public class PortalUtil
extends Object


Constructor Summary
PortalUtil()
           
 
Method Summary
static void addPageDescription(String description, javax.servlet.http.HttpServletRequest request)
          Appends the description to the current meta description of the page in the request.
static void addPageKeywords(String keywords, javax.servlet.http.HttpServletRequest request)
          Appends the keywords to the current meta keywords of the page in the request.
static void addPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest request)
          Appends the subtitle to the current subtitle of the page in the request.
static void addPageTitle(String title, javax.servlet.http.HttpServletRequest request)
          Appends the title to the current title of the page in the request.
static boolean addPortalInetSocketAddressEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener)
           
static void addPortalPortEventListener(PortalPortEventListener portalPortEventListener)
          Deprecated. As of 7.0.0, replaced by addPortalInetSocketAddressEventListener( PortalInetSocketAddressEventListener)
static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request, String title, String url)
          Adds an entry to the portlet breadcrumbs for the page in the request.
static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request, String title, String url, Map<String,Object> data)
          Adds an entry to the portlet breadcrumbs for the page in the request.
static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest request, 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 void addUserLocaleOptionsMessage(javax.servlet.http.HttpServletRequest request)
           
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 request, String input)
          Generates a random key to identify the request based on the input string.
static String getAbsoluteURL(javax.servlet.http.HttpServletRequest request, 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 long[] getAncestorSiteGroupIds(long groupId)
           
static Set<String> getAuthTokenIgnoreActions()
          Deprecated. As of 6.2.0, replaced by AuthTokenWhitelistUtil.getPortletCSRFWhitelistActions()
static Set<String> getAuthTokenIgnorePortlets()
          Deprecated. As of 6.2.0, replaced by AuthTokenWhitelistUtil.getPortletCSRFWhitelist()
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 long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request)
          Deprecated. As of 7.0.0, replaced by HttpAuthManagerUtil.getBasicUserId( HttpServletRequest)
static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request, long companyId)
          Deprecated. As of 7.0.0, replaced by HttpAuthManagerUtil.getBasicUserId( HttpServletRequest)
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 getCDNHost()
          Deprecated. As of 6.1.0, replaced by getCDNHost(boolean)
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 request)
           
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 request)
           
static Company getCompany(PortletRequest portletRequest)
           
static long getCompanyId(javax.servlet.http.HttpServletRequest request)
           
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 request, Group group, String portletId, long refererGroupId, long refererPlid, String lifecycle)
           
static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest request, 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 request, 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 request)
           
static String getCurrentURL(javax.servlet.http.HttpServletRequest request)
           
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 DB getDB()
          Deprecated. As of 6.1.0, replaced by DBManagerUtil.getDB()
static long getDefaultCompanyId()
           
static long getDigestAuthUserId(javax.servlet.http.HttpServletRequest request)
          Deprecated. As of 7.0.0, replaced by HttpAuthManagerUtil.getDigestUserId( HttpServletRequest)
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 request)
           
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 request, 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 getFacebookURL(Portlet portlet, String facebookCanvasPageURL, ThemeDisplay themeDisplay)
           
static String getFirstPageLayoutTypes(javax.servlet.http.HttpServletRequest request)
           
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[] getGroupPermissions(javax.servlet.http.HttpServletRequest request)
           
static String[] getGroupPermissions(javax.servlet.http.HttpServletRequest request, String className)
           
static String[] getGroupPermissions(PortletRequest portletRequest)
           
static String[] getGroupPermissions(PortletRequest portletRequest, String className)
           
static String[] getGuestPermissions(javax.servlet.http.HttpServletRequest request)
           
static String[] getGuestPermissions(javax.servlet.http.HttpServletRequest request, String className)
           
static String[] getGuestPermissions(PortletRequest portletRequest)
           
static String[] getGuestPermissions(PortletRequest portletRequest, String className)
           
static String getHomeURL(javax.servlet.http.HttpServletRequest request)
           
static String getHost(javax.servlet.http.HttpServletRequest request)
           
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 getJournalArticleActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext)
          Deprecated. As of 7.0.0, with no direct replacement
static Layout getJournalArticleLayout(long groupId, boolean privateLayout, String friendlyURL)
          Deprecated. As of 7.0.0, with no direct replacement
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 LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(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 request)
           
static Locale getLocale(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean initialize)
           
static Locale getLocale(PortletRequest portletRequest)
           
static String getLocalizedFriendlyURL(javax.servlet.http.HttpServletRequest request, Layout layout, Locale locale, Locale originalLocale)
           
static String getMailId(String mx, String popPortletPrefix, Object... ids)
           
static BaseModel<?> getModel(ResourcePermission resourcePermission)
          Deprecated. As of 6.1.0, replaced by getBaseModel(ResourcePermission)
static BaseModel<?> getModel(String modelName, String primKey)
          Deprecated. As of 6.1.0, replaced by getBaseModel(String, String)
static String getNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static String getNewPortletTitle(String portletTitle, String oldScopeName, String newScopeName)
           
static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest request)
           
static long getParentGroupId(long scopeGroupId)
          Deprecated. As of 6.2.0 renamed to getSiteGroupId(long)
static String getPathContext()
           
static String getPathContext(javax.servlet.http.HttpServletRequest request)
           
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 int getPortalPort()
          Deprecated. As of 6.1.0, replaced by getPortalPort(boolean)
static int getPortalPort(boolean secure)
          Deprecated. As of 7.0.0, replaced by getPortalServerPort(boolean)
static Properties getPortalProperties()
           
static InetAddress getPortalServerInetAddress(boolean secure)
           
static int getPortalServerPort(boolean secure)
           
static String getPortalURL(javax.servlet.http.HttpServletRequest request)
           
static String getPortalURL(javax.servlet.http.HttpServletRequest request, boolean secure)
           
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 Set<String> getPortletAddDefaultResourceCheckWhitelist()
          Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.getPortletInvocationWhitelist()
static Set<String> getPortletAddDefaultResourceCheckWhitelistActions()
          Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.getPortletInvocationWhitelistActions()
static List<BreadcrumbEntry> getPortletBreadcrumbList(javax.servlet.http.HttpServletRequest request)
          Deprecated. As of 6.1.0, replaced by getPortletBreadcrumbs(HttpServletRequest)
static List<BreadcrumbEntry> getPortletBreadcrumbs(javax.servlet.http.HttpServletRequest request)
          Deprecated. As of 7.0.0, replaced by BreadcrumbUtil.getPortletBreadcrumbEntries( HttpServletRequest)
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 request)
           
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 request)
           
static PreferencesValidator getPreferencesValidator(Portlet portlet)
           
static String getRelativeHomeURL(javax.servlet.http.HttpServletRequest request)
           
static ResourceBundle getResourceBundle(Locale locale)
           
static long getScopeGroupId(javax.servlet.http.HttpServletRequest request)
           
static long getScopeGroupId(javax.servlet.http.HttpServletRequest request, String portletId)
           
static long getScopeGroupId(javax.servlet.http.HttpServletRequest request, 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 request)
           
static User getSelectedUser(javax.servlet.http.HttpServletRequest request, 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 PortletURL getSiteAdministrationURL(javax.servlet.http.HttpServletRequest request, ThemeDisplay themeDisplay, String portletId)
          Deprecated. As of 7.0.0, replaced by #getControlPanelPortletURL(PortletRequest, Group, String, long, String)
static PortletURL getSiteAdministrationURL(PortletResponse portletResponse, ThemeDisplay themeDisplay, String portletName)
          Deprecated. As of 7.0.0, replaced by #getControlPanelPortletURL(PortletRequest, Group, String, long, String)
static long[] getSiteAndCompanyGroupIds(long groupId)
          Deprecated. As of 7.0.0, replaced by getCurrentAndAncestorSiteGroupIds(long)
static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
          Deprecated. As of 7.0.0, replaced by getCurrentAndAncestorSiteGroupIds(long)
static Locale getSiteDefaultLocale(long groupId)
           
static long getSiteGroupId(long scopeGroupId)
           
static String getSiteLoginURL(ThemeDisplay themeDisplay)
           
static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, String uri)
           
static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, String uri, long timestamp)
           
static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, String uri, String queryString)
           
static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, String uri, String queryString, long timestamp)
           
static String getStrutsAction(javax.servlet.http.HttpServletRequest request)
           
static String[] getSystemGroups()
           
static String[] getSystemOrganizationRoles()
           
static String[] getSystemRoles()
           
static String[] getSystemSiteRoles()
           
static String getUniqueElementId(javax.servlet.http.HttpServletRequest request, 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 request)
           
static Date getUptime()
           
static String getURLWithSessionId(String url, String sessionId)
           
static User getUser(javax.servlet.http.HttpServletRequest request)
           
static User getUser(PortletRequest portletRequest)
           
static String getUserEmailAddress(long userId)
           
static long getUserId(javax.servlet.http.HttpServletRequest request)
           
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 request)
           
static String getUserName(long userId, String defaultUserName, String userAttribute)
           
static String getUserName(long userId, String defaultUserName, String userAttribute, javax.servlet.http.HttpServletRequest request)
           
static String getUserPassword(javax.servlet.http.HttpServletRequest request)
           
static String getUserPassword(javax.servlet.http.HttpSession session)
           
static String getUserPassword(PortletRequest portletRequest)
           
static String getUserValue(long userId, String param, String defaultValue)
          Deprecated. As of 7.0.0, with no direct replacement
static String getValidPortalDomain(long companyId, String domain)
           
static long getValidUserId(long companyId, long userId)
           
static String getVirtualHostname(LayoutSet layoutSet)
           
static String getVirtualLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext)
          Deprecated. As of 7.0.0, with no direct replacement
static LayoutFriendlyURLComposite getVirtualLayoutFriendlyURLComposite(boolean privateLayout, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext)
          Deprecated. As of 7.0.0, with no direct replacement
static String getWidgetURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static void initCustomSQL()
           
static User initUser(javax.servlet.http.HttpServletRequest request)
           
static void invokeTaglibDiscussion(PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse)
          Deprecated. As of 7.0.0, with no direct replacement
static void invokeTaglibDiscussionPagination(PortletConfig portletConfig, ResourceRequest resourceRequest, ResourceResponse resourceResponse)
          Deprecated. As of 7.0.0, with no direct replacement
static boolean isAllowAddPortletDefaultResource(javax.servlet.http.HttpServletRequest request, Portlet portlet)
          Deprecated. As of 6.2.0, with no direct replacement
static boolean isCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest request)
           
static boolean isCDNDynamicResourcesEnabled(long companyId)
           
static boolean isCommunityAdmin(User user, long groupId)
          Deprecated. As of 6.1.0, renamed to isGroupAdmin(User, long)
static boolean isCommunityOwner(User user, long groupId)
          Deprecated. As of 6.1.0, renamed to isGroupOwner(User, long)
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 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 request)
           
static boolean isMethodGet(PortletRequest portletRequest)
           
static boolean isMethodPost(PortletRequest portletRequest)
           
static boolean isMultipartRequest(javax.servlet.http.HttpServletRequest request)
           
static boolean isOmniadmin(long userId)
           
static boolean isOmniadmin(User user)
           
static boolean isReservedParameter(String name)
           
static boolean isRightToLeft(javax.servlet.http.HttpServletRequest request)
           
static boolean isRSSFeedsEnabled()
           
static boolean isSecure(javax.servlet.http.HttpServletRequest request)
           
static boolean isSystemGroup(String groupName)
           
static boolean isSystemRole(String roleName)
           
static boolean isUpdateAvailable()
           
static boolean isValidResourceId(String resourceId)
           
static boolean removePortalEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener)
           
 void removePortalPortEventListener(PortalPortEventListener portalPortEventListener)
          Deprecated. As of 7.0.0, replaced by removePortalEventListener( PortalInetSocketAddressEventListener)
static void resetCDNHosts()
           
static Set<String> resetPortletAddDefaultResourceCheckWhitelist()
          Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.resetPortletInvocationWhitelist()
static Set<String> resetPortletAddDefaultResourceCheckWhitelistActions()
          Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.resetPortletInvocationWhitelistActions()
static String resetPortletParameters(String url, String portletId)
           
static void runSQL(String sql)
          Deprecated. As of 6.1.0, replaced by DB.runSQL(String)
static void sendError(Exception e, ActionRequest actionRequest, ActionResponse actionResponse)
           
static void sendError(Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static void sendError(int status, Exception e, ActionRequest actionRequest, ActionResponse actionResponse)
           
static void sendError(int status, Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static void sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static void sendRSSFeedsDisabledError(PortletRequest portletRequest, PortletResponse portletResponse)
           
static void setPageDescription(String description, javax.servlet.http.HttpServletRequest request)
          Sets the description for a page.
static void setPageKeywords(String keywords, javax.servlet.http.HttpServletRequest request)
          Sets the keywords for a page.
static void setPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest request)
          Sets the subtitle for a page.
static void setPageTitle(String title, javax.servlet.http.HttpServletRequest request)
          Sets the whole title for a page.
 void setPortal(Portal portal)
           
static void setPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest request)
           
static void setPortalPort(javax.servlet.http.HttpServletRequest request)
          Deprecated. As of 7.0.0, replaced by setPortalInetSocketAddresses(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 request)
           
static String updateRedirect(String redirect, String oldPath, String newPath)
           
static WindowState updateWindowState(String portletId, User user, Layout layout, WindowState windowState, javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalUtil

public PortalUtil()
Method Detail

addPageDescription

public static void addPageDescription(String description,
                                      javax.servlet.http.HttpServletRequest request)
Appends the description to the current meta description of the page in the request.

Parameters:
description - the description to append to the current meta description
request - the servlet request for the page

addPageKeywords

public static void addPageKeywords(String keywords,
                                   javax.servlet.http.HttpServletRequest request)
Appends the keywords to the current meta keywords of the page in the request.

Parameters:
keywords - the keywords to add to the current meta keywords (comma-separated)
request - the servlet request for the page

addPageSubtitle

public static void addPageSubtitle(String subtitle,
                                   javax.servlet.http.HttpServletRequest request)
Appends the subtitle to the current subtitle of the page in the request.

Parameters:
subtitle - the subtitle to append to the current subtitle
request - the servlet request for the page

addPageTitle

public static void addPageTitle(String title,
                                javax.servlet.http.HttpServletRequest request)
Appends the title to the current title of the page in the request.

Parameters:
title - the title to append to the current title
request - the servlet request for the page

addPortalInetSocketAddressEventListener

public static boolean addPortalInetSocketAddressEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener)

addPortalPortEventListener

@Deprecated
public static void addPortalPortEventListener(PortalPortEventListener portalPortEventListener)
Deprecated. As of 7.0.0, replaced by addPortalInetSocketAddressEventListener( PortalInetSocketAddressEventListener)

Adds the portal port event listener to the portal. The listener is notified whenever the portal port is set.

Parameters:
portalPortEventListener - the portal port event listener to add

addPortletBreadcrumbEntry

public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request,
                                             String title,
                                             String url)
Adds an entry to the portlet breadcrumbs for the page in the request.

Parameters:
request - the servlet request for the page
title - the title of the new breadcrumb entry
url - the URL of the new breadcrumb entry

addPortletBreadcrumbEntry

public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request,
                                             String title,
                                             String url,
                                             Map<String,Object> data)
Adds an entry to the portlet breadcrumbs for the page in the request.

Parameters:
request - the servlet request for the page
title - the title of the new breadcrumb entry
url - the URL of the new breadcrumb entry
data - the HTML5 data parameters of the new breadcrumb entry

addPortletDefaultResource

public static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest request,
                                             Portlet portlet)
                                      throws PortalException
Adds the default resource permissions for the portlet to the page in the request.

Parameters:
request - the servlet request for the page
portlet - the portlet
Throws:
PortalException

addPortletDefaultResource

public static void addPortletDefaultResource(long companyId,
                                             Layout layout,
                                             Portlet portlet)
                                      throws PortalException
Throws:
PortalException

addPreservedParameters

public static String addPreservedParameters(ThemeDisplay themeDisplay,
                                            Layout layout,
                                            String url,
                                            boolean doAsUser)
Adds the preserved parameters doAsGroupId and refererPlid to the URL, optionally adding doAsUserId and doAsUserLanguageId as well.

Preserved parameters are parameters that should be sent with every request as the user navigates the portal.

Parameters:
themeDisplay - the current theme display
layout - the current page
url - the URL
doAsUser - whether to include doAsUserId and doAsLanguageId in the URL if they are available. If false, doAsUserId and doAsUserLanguageId will never be added.
Returns:
the URL with the preserved parameters added

addPreservedParameters

public static String addPreservedParameters(ThemeDisplay themeDisplay,
                                            String url)
Adds the preserved parameters doAsUserId, doAsUserLanguageId, doAsGroupId, and refererPlid to the URL.

Parameters:
themeDisplay - the current theme display
url - the URL
Returns:
the URL with the preserved parameters added

addUserLocaleOptionsMessage

public static void addUserLocaleOptionsMessage(javax.servlet.http.HttpServletRequest request)

clearRequestParameters

public static void clearRequestParameters(RenderRequest renderRequest)
Clears the render parameters in the request if the portlet is in the action phase.

Parameters:
renderRequest - the render request

copyRequestParameters

public static void copyRequestParameters(ActionRequest actionRequest,
                                         ActionResponse actionResponse)
Copies the request parameters to the render parameters, unless a parameter with that name already exists in the render parameters.

Parameters:
actionRequest - the request from which to get the request parameters
actionResponse - the response to receive the render parameters

escapeRedirect

public 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.

Parameters:
url - the URL to escape
Returns:
the escaped URL, or null if the URL is not allowed for redirects

generateRandomKey

public static String generateRandomKey(javax.servlet.http.HttpServletRequest request,
                                       String input)
Generates a random key to identify the request based on the input string.

Parameters:
request - the servlet request for the page
input - the input string
Returns:
the generated key

getAbsoluteURL

public static String getAbsoluteURL(javax.servlet.http.HttpServletRequest request,
                                    String url)

getActualLayoutQueryStringComposite

public static LayoutQueryStringComposite getActualLayoutQueryStringComposite(long groupId,
                                                                             boolean privateLayout,
                                                                             String friendlyURL,
                                                                             Map<String,String[]> params,
                                                                             Map<String,Object> requestContext)
                                                                      throws PortalException
Throws:
PortalException

getActualURL

public static String getActualURL(long groupId,
                                  boolean privateLayout,
                                  String mainPath,
                                  String friendlyURL,
                                  Map<String,String[]> params,
                                  Map<String,Object> requestContext)
                           throws PortalException
Throws:
PortalException

getAlternateURL

public static String getAlternateURL(String canonicalURL,
                                     ThemeDisplay themeDisplay,
                                     Locale locale,
                                     Layout layout)
                              throws PortalException
Returns the alternate URL for the requested canonical URL in the given locale.

The alternate URL lets search engines know that an equivalent page is available for the given locale. For more information, see https://support.google.com/webmasters/answer/189077?hl=en.

Parameters:
canonicalURL - the canonical URL being requested. For more information, see getCanonicalURL(java.lang.String, com.liferay.portal.theme.ThemeDisplay, com.liferay.portal.model.Layout).
themeDisplay - the theme display
locale - the locale of the alternate URL being generated
layout - the page being requested
Returns:
the alternate URL for the requested canonical URL in the given locale
Throws:
PortalException

getAncestorSiteGroupIds

public static long[] getAncestorSiteGroupIds(long groupId)
                                      throws PortalException
Throws:
PortalException

getAuthTokenIgnoreActions

@Deprecated
public static Set<String> getAuthTokenIgnoreActions()
Deprecated. As of 6.2.0, replaced by AuthTokenWhitelistUtil.getPortletCSRFWhitelistActions()


getAuthTokenIgnorePortlets

@Deprecated
public static Set<String> getAuthTokenIgnorePortlets()
Deprecated. As of 6.2.0, replaced by AuthTokenWhitelistUtil.getPortletCSRFWhitelist()


getBaseModel

public static BaseModel<?> getBaseModel(ResourcePermission resourcePermission)
                                 throws PortalException
Returns the base model instance for the resource permission.

Parameters:
resourcePermission - the resource permission
Returns:
the base model instance, or null if the resource permission does not have a base model instance (such as if it's a portlet)
Throws:
PortalException

getBaseModel

public static BaseModel<?> getBaseModel(String modelName,
                                        String primKey)
                                 throws PortalException
Returns the base model instance for the model name and primary key.

Parameters:
modelName - the fully qualified class name of the model
primKey - the primary key of the model instance to get
Returns:
the base model instance, or null if the model does not have a base model instance (such as if it's a portlet)
Throws:
PortalException

getBasicAuthUserId

@Deprecated
public static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request)
                               throws PortalException
Deprecated. As of 7.0.0, replaced by HttpAuthManagerUtil.getBasicUserId( HttpServletRequest)

Throws:
PortalException

getBasicAuthUserId

@Deprecated
public static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request,
                                                 long companyId)
                               throws PortalException
Deprecated. As of 7.0.0, replaced by HttpAuthManagerUtil.getBasicUserId( HttpServletRequest)

Throws:
PortalException

getBrowsableScopeGroups

public static List<Group> getBrowsableScopeGroups(long userId,
                                                  long companyId,
                                                  long groupId,
                                                  String portletId)
                                           throws PortalException
Throws:
PortalException

getCanonicalURL

public static String getCanonicalURL(String completeURL,
                                     ThemeDisplay themeDisplay,
                                     Layout layout)
                              throws PortalException
Returns the canonical URL for the page. The canonical URL is often used to distinguish a preferred page from its translations.

A canonical URL for the page is the preferred URL to specify for a set of pages with similar or identical content. The canonical URL is used to inform search engines that several URLs point to the same page. It is also used to generate the URLs for site maps, the URLs that social bookmarks publish (Twitter, Facebook links, etc.), and the URLs in sent email. For more information, see https://support.google.com/webmasters/answer/139394?hl=en.

Parameters:
completeURL - the complete URL of the page
themeDisplay - the theme display
layout - the page being requested (optionally null). If null is specified, the current page is used.
Returns:
the canonical URL for the page
Throws:
PortalException

getCanonicalURL

public static String getCanonicalURL(String completeURL,
                                     ThemeDisplay themeDisplay,
                                     Layout layout,
                                     boolean forceLayoutFriendlyURL)
                              throws PortalException
Returns the canonical URL of the page, optionally including the page's friendly URL. The canonical URL is often used to distinguish a preferred page from its translations.

A canonical URL for the page is the preferred URL to specify for a set of pages with similar or identical content. The canonical URL is used to inform search engines that several URLs point to the same page. It is also used to generate the URLs for site maps, the URLs that social bookmarks publish (Twitter, Facebook links, etc.), and the URLs in sent email. For more information, see https://support.google.com/webmasters/answer/139394?hl=en.

Parameters:
completeURL - the complete URL of the page
themeDisplay - the current theme display
layout - 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 URL
Returns:
the canonical URL of the page
Throws:
PortalException

getCDNHost

@Deprecated
public static String getCDNHost()
Deprecated. As of 6.1.0, replaced by getCDNHost(boolean)


getCDNHost

public static String getCDNHost(boolean secure)
Returns the secure (HTTPS) or insecure (HTTP) content distribution network (CDN) host address for this portal.

Parameters:
secure - whether to get the secure CDN host address
Returns:
the CDN host address

getCDNHost

public static String getCDNHost(javax.servlet.http.HttpServletRequest request)
                         throws PortalException
Throws:
PortalException

getCDNHostHttp

public static String getCDNHostHttp(long companyId)
Returns the insecure (HTTP) content distribution network (CDN) host address

Parameters:
companyId - the company ID of a site
Returns:
the CDN host address

getCDNHostHttps

public static String getCDNHostHttps(long companyId)
Returns the secure (HTTPS) content distribution network (CDN) host address

Parameters:
companyId - the company ID of a site
Returns:
the CDN host address

getClassName

public static String getClassName(long classNameId)
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

public static long getClassNameId(Class<?> clazz)
Returns the ID of the class from its class object.

Parameters:
clazz - the class object
Returns:
the ID of the class

getClassNameId

public static long getClassNameId(String value)
Returns the ID of the class from its fully qualified name.

Parameters:
value - the fully qualified name of the class
Returns:
the ID of the class

getCompany

public static Company getCompany(javax.servlet.http.HttpServletRequest request)
                          throws PortalException
Throws:
PortalException

getCompany

public static Company getCompany(PortletRequest portletRequest)
                          throws PortalException
Throws:
PortalException

getCompanyId

public static long getCompanyId(javax.servlet.http.HttpServletRequest request)

getCompanyId

public static long getCompanyId(PortletRequest portletRequest)

getCompanyIds

public static long[] getCompanyIds()

getComputerAddresses

public static Set<String> getComputerAddresses()

getComputerName

public static String getComputerName()

getControlPanelFullURL

public static String getControlPanelFullURL(long scopeGroupId,
                                            String ppid,
                                            Map<String,String[]> params)
                                     throws PortalException
Throws:
PortalException

getControlPanelPlid

public static long getControlPanelPlid(long companyId)
                                throws PortalException
Throws:
PortalException

getControlPanelPlid

public static long getControlPanelPlid(PortletRequest portletRequest)
                                throws PortalException
Throws:
PortalException

getControlPanelPortletURL

public static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest request,
                                                   Group group,
                                                   String portletId,
                                                   long refererGroupId,
                                                   long refererPlid,
                                                   String lifecycle)

getControlPanelPortletURL

public static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest request,
                                                   String portletId,
                                                   String lifecycle)

getControlPanelPortletURL

public static PortletURL getControlPanelPortletURL(PortletRequest portletRequest,
                                                   Group group,
                                                   String portletId,
                                                   long refererGroupId,
                                                   long refererPlid,
                                                   String lifecycle)

getControlPanelPortletURL

public static PortletURL getControlPanelPortletURL(PortletRequest portletRequest,
                                                   String portletId,
                                                   String lifecycle)

getCreateAccountURL

public static String getCreateAccountURL(javax.servlet.http.HttpServletRequest request,
                                         ThemeDisplay themeDisplay)
                                  throws Exception
Throws:
Exception

getCurrentAndAncestorSiteGroupIds

public static long[] getCurrentAndAncestorSiteGroupIds(long groupId)
                                                throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroupIds

public static long[] getCurrentAndAncestorSiteGroupIds(long groupId,
                                                       boolean checkContentSharingWithChildrenEnabled)
                                                throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroupIds

public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds)
                                                throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroupIds

public static long[] getCurrentAndAncestorSiteGroupIds(long[] groupIds,
                                                       boolean checkContentSharingWithChildrenEnabled)
                                                throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroups

public static List<Group> getCurrentAndAncestorSiteGroups(long groupId)
                                                   throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroups

public static List<Group> getCurrentAndAncestorSiteGroups(long groupId,
                                                          boolean checkContentSharingWithChildrenEnabled)
                                                   throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroups

public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds)
                                                   throws PortalException
Throws:
PortalException

getCurrentAndAncestorSiteGroups

public static List<Group> getCurrentAndAncestorSiteGroups(long[] groupIds,
                                                          boolean checkContentSharingWithChildrenEnabled)
                                                   throws PortalException
Throws:
PortalException

getCurrentCompleteURL

public static String getCurrentCompleteURL(javax.servlet.http.HttpServletRequest request)

getCurrentURL

public static String getCurrentURL(javax.servlet.http.HttpServletRequest request)

getCurrentURL

public static String getCurrentURL(PortletRequest portletRequest)

getCustomSQLFunctionIsNotNull

public static String getCustomSQLFunctionIsNotNull()

getCustomSQLFunctionIsNull

public static String getCustomSQLFunctionIsNull()

getDate

public 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.

Parameters:
month - the month (0-based, meaning 0 for January)
day - the day of the month
year - the year
Returns:
the date object, or null if the date is invalid

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           Class<? extends PortalException> clazz)
                    throws PortalException
Returns the date object for the specified month, day, and year, optionally throwing an exception if the date is invalid.

Parameters:
month - the month (0-based, meaning 0 for January)
day - the day of the month
year - the year
clazz - the exception class to throw if the date is invalid. If null, 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

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           int hour,
                           int min,
                           Class<? extends PortalException> clazz)
                    throws PortalException
Returns the date object for the specified month, day, year, hour, and minute, optionally throwing an exception if the date is invalid.

Parameters:
month - the month (0-based, meaning 0 for January)
day - the day of the month
year - the year
hour - the hour (0-24)
min - the minute of the hour
clazz - the exception class to throw if the date is invalid. If null, 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

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           int hour,
                           int min,
                           TimeZone timeZone,
                           Class<? extends PortalException> clazz)
                    throws PortalException
Returns the date object for the specified month, day, year, hour, minute, and time zone, optionally throwing an exception if the date is invalid.

Parameters:
month - the month (0-based, meaning 0 for January)
day - the day of the month
year - the year
hour - the hour (0-24)
min - the minute of the hour
timeZone - the time zone of the date
clazz - the exception class to throw if the date is invalid. If null, 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

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           TimeZone timeZone,
                           Class<? extends PortalException> clazz)
                    throws PortalException
Returns the date object for the specified month, day, year, and time zone, optionally throwing an exception if the date is invalid.

Parameters:
month - the month (0-based, meaning 0 for January)
day - the day of the month
year - the year
timeZone - the time zone of the date
clazz - the exception class to throw if the date is invalid. If null, 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

getDB

@Deprecated
public static DB getDB()
Deprecated. As of 6.1.0, replaced by DBManagerUtil.getDB()


getDefaultCompanyId

public static long getDefaultCompanyId()

getDigestAuthUserId

@Deprecated
public static long getDigestAuthUserId(javax.servlet.http.HttpServletRequest request)
                                throws PortalException
Deprecated. As of 7.0.0, replaced by HttpAuthManagerUtil.getDigestUserId( HttpServletRequest)

Throws:
PortalException

getEmailFromAddress

public static String getEmailFromAddress(PortletPreferences preferences,
                                         long companyId,
                                         String defaultValue)

getEmailFromName

public static String getEmailFromName(PortletPreferences preferences,
                                      long companyId,
                                      String defaultValue)

getExpandoBridgeAttributes

public static Map<String,Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
                                                                  javax.servlet.http.HttpServletRequest request)
                                                           throws PortalException
Throws:
PortalException

getExpandoBridgeAttributes

public static Map<String,Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
                                                                  PortletRequest portletRequest)
                                                           throws PortalException
Throws:
PortalException

getExpandoBridgeAttributes

public static Map<String,Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
                                                                  UploadPortletRequest uploadPortletRequest)
                                                           throws PortalException
Throws:
PortalException

getExpandoValue

public static Serializable getExpandoValue(javax.servlet.http.HttpServletRequest request,
                                           String name,
                                           int type,
                                           String displayType)
                                    throws PortalException
Throws:
PortalException

getExpandoValue

public static Serializable getExpandoValue(PortletRequest portletRequest,
                                           String name,
                                           int type,
                                           String displayType)
                                    throws PortalException
Throws:
PortalException

getExpandoValue

public static Serializable getExpandoValue(UploadPortletRequest uploadPortletRequest,
                                           String name,
                                           int type,
                                           String displayType)
                                    throws PortalException
Throws:
PortalException

getFacebookURL

public static String getFacebookURL(Portlet portlet,
                                    String facebookCanvasPageURL,
                                    ThemeDisplay themeDisplay)
                             throws PortalException
Throws:
PortalException

getFirstPageLayoutTypes

public static String getFirstPageLayoutTypes(javax.servlet.http.HttpServletRequest request)

getFullName

public static String getFullName(String firstName,
                                 String middleName,
                                 String lastName)

getGlobalLibDir

public static String getGlobalLibDir()

getGoogleGadgetURL

public static String getGoogleGadgetURL(Portlet portlet,
                                        ThemeDisplay themeDisplay)
                                 throws PortalException
Throws:
PortalException

getGroupFriendlyURL

public static String getGroupFriendlyURL(LayoutSet layoutSet,
                                         ThemeDisplay themeDisplay)
                                  throws PortalException
Throws:
PortalException

getGroupFriendlyURL

public static String getGroupFriendlyURL(LayoutSet layoutSet,
                                         ThemeDisplay themeDisplay,
                                         Locale locale)
                                  throws PortalException
Throws:
PortalException

getGroupFriendlyURLIndex

public static int[] getGroupFriendlyURLIndex(String requestURI)

getGroupPermissions

public static String[] getGroupPermissions(javax.servlet.http.HttpServletRequest request)

getGroupPermissions

public static String[] getGroupPermissions(javax.servlet.http.HttpServletRequest request,
                                           String className)

getGroupPermissions

public static String[] getGroupPermissions(PortletRequest portletRequest)

getGroupPermissions

public static String[] getGroupPermissions(PortletRequest portletRequest,
                                           String className)

getGuestPermissions

public static String[] getGuestPermissions(javax.servlet.http.HttpServletRequest request)

getGuestPermissions

public static String[] getGuestPermissions(javax.servlet.http.HttpServletRequest request,
                                           String className)

getGuestPermissions

public static String[] getGuestPermissions(PortletRequest portletRequest)

getGuestPermissions

public static String[] getGuestPermissions(PortletRequest portletRequest,
                                           String className)

getHomeURL

public static String getHomeURL(javax.servlet.http.HttpServletRequest request)
                         throws PortalException
Throws:
PortalException

getHost

public static String getHost(javax.servlet.http.HttpServletRequest request)

getHost

public static String getHost(PortletRequest portletRequest)

getHttpServletRequest

public static javax.servlet.http.HttpServletRequest getHttpServletRequest(PortletRequest portletRequest)

getHttpServletResponse

public static javax.servlet.http.HttpServletResponse getHttpServletResponse(PortletResponse portletResponse)

getI18nPathLanguageId

public static String getI18nPathLanguageId(Locale locale,
                                           String defaultI18nPathLanguageId)

getJournalArticleActualURL

@Deprecated
public static String getJournalArticleActualURL(long groupId,
                                                           boolean privateLayout,
                                                           String mainPath,
                                                           String friendlyURL,
                                                           Map<String,String[]> params,
                                                           Map<String,Object> requestContext)
                                         throws PortalException
Deprecated. As of 7.0.0, with no direct replacement

Throws:
PortalException

getJournalArticleLayout

@Deprecated
public static Layout getJournalArticleLayout(long groupId,
                                                        boolean privateLayout,
                                                        String friendlyURL)
                                      throws PortalException
Deprecated. As of 7.0.0, with no direct replacement

Throws:
PortalException

getJsSafePortletId

public static String getJsSafePortletId(String portletId)

getLayoutActualURL

public static String getLayoutActualURL(Layout layout)

getLayoutActualURL

public static String getLayoutActualURL(Layout layout,
                                        String mainPath)

getLayoutActualURL

public static String getLayoutActualURL(long groupId,
                                        boolean privateLayout,
                                        String mainPath,
                                        String friendlyURL)
                                 throws PortalException
Throws:
PortalException

getLayoutActualURL

public static String getLayoutActualURL(long groupId,
                                        boolean privateLayout,
                                        String mainPath,
                                        String friendlyURL,
                                        Map<String,String[]> params,
                                        Map<String,Object> requestContext)
                                 throws PortalException
Throws:
PortalException

getLayoutFriendlyURL

public static String getLayoutFriendlyURL(Layout layout,
                                          ThemeDisplay themeDisplay)
                                   throws PortalException
Throws:
PortalException

getLayoutFriendlyURL

public static String getLayoutFriendlyURL(Layout layout,
                                          ThemeDisplay themeDisplay,
                                          Locale locale)
                                   throws PortalException
Throws:
PortalException

getLayoutFriendlyURLComposite

public static LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(long groupId,
                                                                       boolean privateLayout,
                                                                       String friendlyURL,
                                                                       Map<String,String[]> params,
                                                                       Map<String,Object> requestContext)
                                                                throws PortalException
Throws:
PortalException

getLayoutFullURL

public static String getLayoutFullURL(Layout layout,
                                      ThemeDisplay themeDisplay)
                               throws PortalException
Throws:
PortalException

getLayoutFullURL

public static String getLayoutFullURL(Layout layout,
                                      ThemeDisplay themeDisplay,
                                      boolean doAsUser)
                               throws PortalException
Throws:
PortalException

getLayoutFullURL

public static String getLayoutFullURL(long groupId,
                                      String portletId)
                               throws PortalException
Throws:
PortalException

getLayoutFullURL

public static String getLayoutFullURL(long groupId,
                                      String portletId,
                                      boolean secure)
                               throws PortalException
Throws:
PortalException

getLayoutFullURL

public static String getLayoutFullURL(ThemeDisplay themeDisplay)
                               throws PortalException
Throws:
PortalException

getLayoutRelativeURL

public static String getLayoutRelativeURL(Layout layout,
                                          ThemeDisplay themeDisplay)
                                   throws PortalException
Throws:
PortalException

getLayoutRelativeURL

public static String getLayoutRelativeURL(Layout layout,
                                          ThemeDisplay themeDisplay,
                                          boolean doAsUser)
                                   throws PortalException
Throws:
PortalException

getLayoutSetDisplayURL

public static String getLayoutSetDisplayURL(LayoutSet layoutSet,
                                            boolean secureConnection)
                                     throws PortalException
Throws:
PortalException

getLayoutSetFriendlyURL

public static String getLayoutSetFriendlyURL(LayoutSet layoutSet,
                                             ThemeDisplay themeDisplay)
                                      throws PortalException
Throws:
PortalException

getLayoutTarget

public static String getLayoutTarget(Layout layout)

getLayoutURL

public static String getLayoutURL(Layout layout,
                                  ThemeDisplay themeDisplay)
                           throws PortalException
Throws:
PortalException

getLayoutURL

public static String getLayoutURL(Layout layout,
                                  ThemeDisplay themeDisplay,
                                  boolean doAsUser)
                           throws PortalException
Throws:
PortalException

getLayoutURL

public static String getLayoutURL(Layout layout,
                                  ThemeDisplay themeDisplay,
                                  Locale locale)
                           throws PortalException
Throws:
PortalException

getLayoutURL

public static String getLayoutURL(ThemeDisplay themeDisplay)
                           throws PortalException
Throws:
PortalException

getLiferayPortletRequest

public static LiferayPortletRequest getLiferayPortletRequest(PortletRequest portletRequest)

getLiferayPortletResponse

public static LiferayPortletResponse getLiferayPortletResponse(PortletResponse portletResponse)

getLocale

public static Locale getLocale(javax.servlet.http.HttpServletRequest request)

getLocale

public static Locale getLocale(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               boolean initialize)

getLocale

public static Locale getLocale(PortletRequest portletRequest)

getLocalizedFriendlyURL

public static String getLocalizedFriendlyURL(javax.servlet.http.HttpServletRequest request,
                                             Layout layout,
                                             Locale locale,
                                             Locale originalLocale)
                                      throws Exception
Throws:
Exception

getMailId

public static String getMailId(String mx,
                               String popPortletPrefix,
                               Object... ids)

getModel

@Deprecated
public static BaseModel<?> getModel(ResourcePermission resourcePermission)
                             throws PortalException
Deprecated. As of 6.1.0, replaced by getBaseModel(ResourcePermission)

Throws:
PortalException

getModel

@Deprecated
public static BaseModel<?> getModel(String modelName,
                                               String primKey)
                             throws PortalException
Deprecated. As of 6.1.0, replaced by getBaseModel(String, String)

Throws:
PortalException

getNetvibesURL

public static String getNetvibesURL(Portlet portlet,
                                    ThemeDisplay themeDisplay)
                             throws PortalException
Throws:
PortalException

getNewPortletTitle

public static String getNewPortletTitle(String portletTitle,
                                        String oldScopeName,
                                        String newScopeName)

getOriginalServletRequest

public static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest request)

getParentGroupId

@Deprecated
public static long getParentGroupId(long scopeGroupId)
Deprecated. As of 6.2.0 renamed to getSiteGroupId(long)


getPathContext

public static String getPathContext()

getPathContext

public static String getPathContext(javax.servlet.http.HttpServletRequest request)

getPathContext

public static String getPathContext(PortletRequest portletRequest)

getPathContext

public static String getPathContext(String contextPath)

getPathFriendlyURLPrivateGroup

public static String getPathFriendlyURLPrivateGroup()

getPathFriendlyURLPrivateUser

public static String getPathFriendlyURLPrivateUser()

getPathFriendlyURLPublic

public static String getPathFriendlyURLPublic()

getPathImage

public static String getPathImage()

getPathMain

public static String getPathMain()

getPathModule

public static String getPathModule()

getPathProxy

public static String getPathProxy()

getPlidFromFriendlyURL

public static long getPlidFromFriendlyURL(long companyId,
                                          String friendlyURL)

getPlidFromPortletId

public static long getPlidFromPortletId(long groupId,
                                        boolean privateLayout,
                                        String portletId)
                                 throws PortalException
Throws:
PortalException

getPlidFromPortletId

public static long getPlidFromPortletId(long groupId,
                                        String portletId)
                                 throws PortalException
Throws:
PortalException

getPortal

public static Portal getPortal()

getPortalInetSocketAddressEventListeners

public static PortalInetSocketAddressEventListener[] getPortalInetSocketAddressEventListeners()

getPortalLibDir

public static String getPortalLibDir()

getPortalLocalInetAddress

public static InetAddress getPortalLocalInetAddress(boolean secure)

getPortalLocalPort

public static int getPortalLocalPort(boolean secure)

getPortalPort

@Deprecated
public static int getPortalPort()
Deprecated. As of 6.1.0, replaced by getPortalPort(boolean)


getPortalPort

@Deprecated
public static int getPortalPort(boolean secure)
Deprecated. As of 7.0.0, replaced by getPortalServerPort(boolean)


getPortalProperties

public static Properties getPortalProperties()

getPortalServerInetAddress

public static InetAddress getPortalServerInetAddress(boolean secure)

getPortalServerPort

public static int getPortalServerPort(boolean secure)

getPortalURL

public static String getPortalURL(javax.servlet.http.HttpServletRequest request)

getPortalURL

public static String getPortalURL(javax.servlet.http.HttpServletRequest request,
                                  boolean secure)

getPortalURL

public static String getPortalURL(Layout layout,
                                  ThemeDisplay themeDisplay)
                           throws PortalException
Throws:
PortalException

getPortalURL

public static String getPortalURL(PortletRequest portletRequest)

getPortalURL

public static String getPortalURL(PortletRequest portletRequest,
                                  boolean secure)

getPortalURL

public static String getPortalURL(String serverName,
                                  int serverPort,
                                  boolean secure)

getPortalURL

public static String getPortalURL(ThemeDisplay themeDisplay)
                           throws PortalException
Throws:
PortalException

getPortalWebDir

public static String getPortalWebDir()

getPortletAddDefaultResourceCheckWhitelist

@Deprecated
public static Set<String> getPortletAddDefaultResourceCheckWhitelist()
Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.getPortletInvocationWhitelist()


getPortletAddDefaultResourceCheckWhitelistActions

@Deprecated
public static Set<String> getPortletAddDefaultResourceCheckWhitelistActions()
Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.getPortletInvocationWhitelistActions()


getPortletBreadcrumbList

@Deprecated
public static List<BreadcrumbEntry> getPortletBreadcrumbList(javax.servlet.http.HttpServletRequest request)
Deprecated. As of 6.1.0, replaced by getPortletBreadcrumbs(HttpServletRequest)


getPortletBreadcrumbs

@Deprecated
public static List<BreadcrumbEntry> getPortletBreadcrumbs(javax.servlet.http.HttpServletRequest request)
Deprecated. As of 7.0.0, replaced by BreadcrumbUtil.getPortletBreadcrumbEntries( HttpServletRequest)


getPortletConfig

public static PortletConfig getPortletConfig(long companyId,
                                             String portletId,
                                             javax.servlet.ServletContext servletContext)
                                      throws PortletException
Throws:
PortletException

getPortletDescription

public static String getPortletDescription(Portlet portlet,
                                           javax.servlet.ServletContext servletContext,
                                           Locale locale)

getPortletDescription

public static String getPortletDescription(Portlet portlet,
                                           User user)

getPortletDescription

public static String getPortletDescription(String portletId,
                                           Locale locale)

getPortletDescription

public static String getPortletDescription(String portletId,
                                           String languageId)

getPortletDescription

public static String getPortletDescription(String portletId,
                                           User user)

getPortletId

public static String getPortletId(javax.servlet.http.HttpServletRequest request)

getPortletId

public static String getPortletId(PortletRequest portletRequest)

getPortletLongTitle

public static String getPortletLongTitle(Portlet portlet,
                                         Locale locale)

getPortletLongTitle

public static String getPortletLongTitle(Portlet portlet,
                                         javax.servlet.ServletContext servletContext,
                                         Locale locale)

getPortletLongTitle

public static String getPortletLongTitle(Portlet portlet,
                                         String languageId)

getPortletLongTitle

public static String getPortletLongTitle(Portlet portlet,
                                         User user)

getPortletLongTitle

public static String getPortletLongTitle(String portletId,
                                         Locale locale)

getPortletLongTitle

public static String getPortletLongTitle(String portletId,
                                         String languageId)

getPortletLongTitle

public static String getPortletLongTitle(String portletId,
                                         User user)

getPortletNamespace

public static String getPortletNamespace(String portletId)

getPortletTitle

public static String getPortletTitle(Portlet portlet,
                                     Locale locale)

getPortletTitle

public static String getPortletTitle(Portlet portlet,
                                     javax.servlet.ServletContext servletContext,
                                     Locale locale)

getPortletTitle

public static String getPortletTitle(Portlet portlet,
                                     String languageId)

getPortletTitle

public static String getPortletTitle(Portlet portlet,
                                     User user)

getPortletTitle

public static String getPortletTitle(PortletRequest portletRequest)

getPortletTitle

public static String getPortletTitle(PortletResponse portletResponse)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     Locale locale)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     ResourceBundle resourceBundle)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     String languageId)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     User user)

getPortletXmlFileName

public static String getPortletXmlFileName()

getPreferences

public static PortletPreferences getPreferences(javax.servlet.http.HttpServletRequest request)

getPreferencesValidator

public static PreferencesValidator getPreferencesValidator(Portlet portlet)

getRelativeHomeURL

public static String getRelativeHomeURL(javax.servlet.http.HttpServletRequest request)
                                 throws PortalException
Throws:
PortalException

getResourceBundle

public static ResourceBundle getResourceBundle(Locale locale)

getScopeGroupId

public static long getScopeGroupId(javax.servlet.http.HttpServletRequest request)
                            throws PortalException
Throws:
PortalException

getScopeGroupId

public static long getScopeGroupId(javax.servlet.http.HttpServletRequest request,
                                   String portletId)
                            throws PortalException
Throws:
PortalException

getScopeGroupId

public static long getScopeGroupId(javax.servlet.http.HttpServletRequest request,
                                   String portletId,
                                   boolean checkStagingGroup)
                            throws PortalException
Throws:
PortalException

getScopeGroupId

public static long getScopeGroupId(Layout layout)

getScopeGroupId

public static long getScopeGroupId(Layout layout,
                                   String portletId)

getScopeGroupId

public static long getScopeGroupId(long plid)

getScopeGroupId

public static long getScopeGroupId(PortletRequest portletRequest)
                            throws PortalException
Throws:
PortalException

getSelectedUser

public static User getSelectedUser(javax.servlet.http.HttpServletRequest request)
                            throws PortalException
Throws:
PortalException

getSelectedUser

public static User getSelectedUser(javax.servlet.http.HttpServletRequest request,
                                   boolean checkPermission)
                            throws PortalException
Throws:
PortalException

getSelectedUser

public static User getSelectedUser(PortletRequest portletRequest)
                            throws PortalException
Throws:
PortalException

getSelectedUser

public static User getSelectedUser(PortletRequest portletRequest,
                                   boolean checkPermission)
                            throws PortalException
Throws:
PortalException

getServletContextName

public static String getServletContextName()

getSharedContentSiteGroupIds

public static long[] getSharedContentSiteGroupIds(long companyId,
                                                  long groupId,
                                                  long userId)
                                           throws PortalException
Throws:
PortalException

getSiteAdministrationURL

@Deprecated
public static PortletURL getSiteAdministrationURL(javax.servlet.http.HttpServletRequest request,
                                                             ThemeDisplay themeDisplay,
                                                             String portletId)
Deprecated. As of 7.0.0, replaced by #getControlPanelPortletURL(PortletRequest, Group, String, long, String)


getSiteAdministrationURL

@Deprecated
public static PortletURL getSiteAdministrationURL(PortletResponse portletResponse,
                                                             ThemeDisplay themeDisplay,
                                                             String portletName)
Deprecated. As of 7.0.0, replaced by #getControlPanelPortletURL(PortletRequest, Group, String, long, String)


getSiteAndCompanyGroupIds

@Deprecated
public static long[] getSiteAndCompanyGroupIds(long groupId)
                                        throws PortalException
Deprecated. As of 7.0.0, replaced by getCurrentAndAncestorSiteGroupIds(long)

Throws:
PortalException

getSiteAndCompanyGroupIds

@Deprecated
public static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
                                        throws PortalException
Deprecated. As of 7.0.0, replaced by getCurrentAndAncestorSiteGroupIds(long)

Throws:
PortalException

getSiteDefaultLocale

public static Locale getSiteDefaultLocale(long groupId)
                                   throws PortalException
Throws:
PortalException

getSiteGroupId

public static long getSiteGroupId(long scopeGroupId)

getSiteLoginURL

public static String getSiteLoginURL(ThemeDisplay themeDisplay)
                              throws PortalException
Throws:
PortalException

getStaticResourceURL

public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request,
                                          String uri)

getStaticResourceURL

public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request,
                                          String uri,
                                          long timestamp)

getStaticResourceURL

public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request,
                                          String uri,
                                          String queryString)

getStaticResourceURL

public static String getStaticResourceURL(javax.servlet.http.HttpServletRequest request,
                                          String uri,
                                          String queryString,
                                          long timestamp)

getStrutsAction

public static String getStrutsAction(javax.servlet.http.HttpServletRequest request)

getSystemGroups

public static String[] getSystemGroups()

getSystemOrganizationRoles

public static String[] getSystemOrganizationRoles()

getSystemRoles

public static String[] getSystemRoles()

getSystemSiteRoles

public static String[] getSystemSiteRoles()

getUniqueElementId

public static String getUniqueElementId(javax.servlet.http.HttpServletRequest request,
                                        String namespace,
                                        String id)

getUniqueElementId

public static String getUniqueElementId(PortletRequest request,
                                        String namespace,
                                        String id)

getUploadPortletRequest

public static UploadPortletRequest getUploadPortletRequest(PortletRequest portletRequest)

getUploadServletRequest

public static UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest request)

getUptime

public static Date getUptime()

getURLWithSessionId

public static String getURLWithSessionId(String url,
                                         String sessionId)

getUser

public static User getUser(javax.servlet.http.HttpServletRequest request)
                    throws PortalException
Throws:
PortalException

getUser

public static User getUser(PortletRequest portletRequest)
                    throws PortalException
Throws:
PortalException

getUserEmailAddress

public static String getUserEmailAddress(long userId)

getUserId

public static long getUserId(javax.servlet.http.HttpServletRequest request)

getUserId

public static long getUserId(PortletRequest portletRequest)

getUserName

public static String getUserName(BaseModel<?> baseModel)

getUserName

public static String getUserName(long userId,
                                 String defaultUserName)

getUserName

public static String getUserName(long userId,
                                 String defaultUserName,
                                 javax.servlet.http.HttpServletRequest request)

getUserName

public static String getUserName(long userId,
                                 String defaultUserName,
                                 String userAttribute)

getUserName

public static String getUserName(long userId,
                                 String defaultUserName,
                                 String userAttribute,
                                 javax.servlet.http.HttpServletRequest request)

getUserPassword

public static String getUserPassword(javax.servlet.http.HttpServletRequest request)

getUserPassword

public static String getUserPassword(javax.servlet.http.HttpSession session)

getUserPassword

public static String getUserPassword(PortletRequest portletRequest)

getUserValue

@Deprecated
public static String getUserValue(long userId,
                                             String param,
                                             String defaultValue)
Deprecated. As of 7.0.0, with no direct replacement


getValidPortalDomain

public static String getValidPortalDomain(long companyId,
                                          String domain)

getValidUserId

public static long getValidUserId(long companyId,
                                  long userId)
                           throws PortalException
Throws:
PortalException

getVirtualHostname

public static String getVirtualHostname(LayoutSet layoutSet)

getVirtualLayoutActualURL

@Deprecated
public static String getVirtualLayoutActualURL(long groupId,
                                                          boolean privateLayout,
                                                          String mainPath,
                                                          String friendlyURL,
                                                          Map<String,String[]> params,
                                                          Map<String,Object> requestContext)
                                        throws PortalException
Deprecated. As of 7.0.0, with no direct replacement

Throws:
PortalException

getVirtualLayoutFriendlyURLComposite

@Deprecated
public static LayoutFriendlyURLComposite getVirtualLayoutFriendlyURLComposite(boolean privateLayout,
                                                                                         String friendlyURL,
                                                                                         Map<String,String[]> params,
                                                                                         Map<String,Object> requestContext)
                                                                       throws PortalException
Deprecated. As of 7.0.0, with no direct replacement

Throws:
PortalException

getWidgetURL

public static String getWidgetURL(Portlet portlet,
                                  ThemeDisplay themeDisplay)
                           throws PortalException
Throws:
PortalException

initCustomSQL

public static void initCustomSQL()

initUser

public static User initUser(javax.servlet.http.HttpServletRequest request)
                     throws Exception
Throws:
Exception

invokeTaglibDiscussion

@Deprecated
public static void invokeTaglibDiscussion(PortletConfig portletConfig,
                                                     ActionRequest actionRequest,
                                                     ActionResponse actionResponse)
                                   throws Exception
Deprecated. As of 7.0.0, with no direct replacement

Throws:
Exception

invokeTaglibDiscussionPagination

@Deprecated
public static void invokeTaglibDiscussionPagination(PortletConfig portletConfig,
                                                               ResourceRequest resourceRequest,
                                                               ResourceResponse resourceResponse)
                                             throws IOException,
                                                    PortletException
Deprecated. As of 7.0.0, with no direct replacement

Throws:
IOException
PortletException

isAllowAddPortletDefaultResource

@Deprecated
public static boolean isAllowAddPortletDefaultResource(javax.servlet.http.HttpServletRequest request,
                                                                  Portlet portlet)
                                                throws PortalException
Deprecated. As of 6.2.0, with no direct replacement

Throws:
PortalException

isCDNDynamicResourcesEnabled

public static boolean isCDNDynamicResourcesEnabled(javax.servlet.http.HttpServletRequest request)
                                            throws PortalException
Throws:
PortalException

isCDNDynamicResourcesEnabled

public static boolean isCDNDynamicResourcesEnabled(long companyId)

isCommunityAdmin

@Deprecated
public static boolean isCommunityAdmin(User user,
                                                  long groupId)
                                throws Exception
Deprecated. As of 6.1.0, renamed to isGroupAdmin(User, long)

Throws:
Exception

isCommunityOwner

@Deprecated
public static boolean isCommunityOwner(User user,
                                                  long groupId)
                                throws Exception
Deprecated. As of 6.1.0, renamed to isGroupOwner(User, long)

Throws:
Exception

isCompanyAdmin

public static boolean isCompanyAdmin(User user)
                              throws Exception
Throws:
Exception

isCompanyControlPanelPortlet

public static boolean isCompanyControlPanelPortlet(String portletId,
                                                   String category,
                                                   ThemeDisplay themeDisplay)
                                            throws PortalException
Throws:
PortalException

isCompanyControlPanelPortlet

public static boolean isCompanyControlPanelPortlet(String portletId,
                                                   ThemeDisplay themeDisplay)
                                            throws PortalException
Throws:
PortalException

isControlPanelPortlet

public static boolean isControlPanelPortlet(String portletId,
                                            String category,
                                            ThemeDisplay themeDisplay)

isControlPanelPortlet

public static boolean isControlPanelPortlet(String portletId,
                                            ThemeDisplay themeDisplay)

isGroupAdmin

public static boolean isGroupAdmin(User user,
                                   long groupId)
                            throws Exception
Throws:
Exception

isGroupFriendlyURL

public static boolean isGroupFriendlyURL(String fullURL,
                                         String groupFriendlyURL,
                                         String layoutFriendlyURL)

isGroupOwner

public static boolean isGroupOwner(User user,
                                   long groupId)
                            throws Exception
Throws:
Exception

isLayoutDescendant

public static boolean isLayoutDescendant(Layout layout,
                                         long layoutId)
                                  throws PortalException
Throws:
PortalException

isLayoutSitemapable

public static boolean isLayoutSitemapable(Layout layout)

isLoginRedirectRequired

public static boolean isLoginRedirectRequired(javax.servlet.http.HttpServletRequest request)

isMethodGet

public static boolean isMethodGet(PortletRequest portletRequest)

isMethodPost

public static boolean isMethodPost(PortletRequest portletRequest)

isMultipartRequest

public static boolean isMultipartRequest(javax.servlet.http.HttpServletRequest request)

isOmniadmin

public static boolean isOmniadmin(long userId)

isOmniadmin

public static boolean isOmniadmin(User user)

isReservedParameter

public static boolean isReservedParameter(String name)

isRightToLeft

public static boolean isRightToLeft(javax.servlet.http.HttpServletRequest request)

isRSSFeedsEnabled

public static boolean isRSSFeedsEnabled()

isSecure

public static boolean isSecure(javax.servlet.http.HttpServletRequest request)

isSystemGroup

public static boolean isSystemGroup(String groupName)

isSystemRole

public static boolean isSystemRole(String roleName)

isUpdateAvailable

public static boolean isUpdateAvailable()

isValidResourceId

public static boolean isValidResourceId(String resourceId)

removePortalEventListener

public static boolean removePortalEventListener(PortalInetSocketAddressEventListener portalInetSocketAddressEventListener)

resetCDNHosts

public static void resetCDNHosts()

resetPortletAddDefaultResourceCheckWhitelist

@Deprecated
public static Set<String> resetPortletAddDefaultResourceCheckWhitelist()
Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.resetPortletInvocationWhitelist()


resetPortletAddDefaultResourceCheckWhitelistActions

@Deprecated
public static Set<String> resetPortletAddDefaultResourceCheckWhitelistActions()
Deprecated. As of 6.2.0 replaced by AuthTokenWhitelistUtil.resetPortletInvocationWhitelistActions()


resetPortletParameters

public static String resetPortletParameters(String url,
                                            String portletId)

runSQL

@Deprecated
public static void runSQL(String sql)
                   throws IOException,
                          SQLException
Deprecated. As of 6.1.0, replaced by DB.runSQL(String)

Throws:
IOException
SQLException

sendError

public static void sendError(Exception e,
                             ActionRequest actionRequest,
                             ActionResponse actionResponse)
                      throws IOException
Throws:
IOException

sendError

public static void sendError(Exception e,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws IOException,
                             javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

sendError

public static void sendError(int status,
                             Exception e,
                             ActionRequest actionRequest,
                             ActionResponse actionResponse)
                      throws IOException
Throws:
IOException

sendError

public static void sendError(int status,
                             Exception e,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws IOException,
                             javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

sendRSSFeedsDisabledError

public static void sendRSSFeedsDisabledError(javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)
                                      throws IOException,
                                             javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

sendRSSFeedsDisabledError

public static void sendRSSFeedsDisabledError(PortletRequest portletRequest,
                                             PortletResponse portletResponse)
                                      throws IOException,
                                             javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

setPageDescription

public static void setPageDescription(String description,
                                      javax.servlet.http.HttpServletRequest request)
Sets the description for a page. This overrides the existing page description.


setPageKeywords

public static void setPageKeywords(String keywords,
                                   javax.servlet.http.HttpServletRequest request)
Sets the keywords for a page. This overrides the existing page keywords.


setPageSubtitle

public static void setPageSubtitle(String subtitle,
                                   javax.servlet.http.HttpServletRequest request)
Sets the subtitle for a page. This overrides the existing page subtitle.


setPageTitle

public static void setPageTitle(String title,
                                javax.servlet.http.HttpServletRequest request)
Sets the whole title for a page. This overrides the existing page whole title.


setPortalInetSocketAddresses

public static void setPortalInetSocketAddresses(javax.servlet.http.HttpServletRequest request)

setPortalPort

@Deprecated
public static void setPortalPort(javax.servlet.http.HttpServletRequest request)
Deprecated. As of 7.0.0, replaced by setPortalInetSocketAddresses(HttpServletRequest)

Sets the port obtained on the first request to the portal.


storePreferences

public static void storePreferences(PortletPreferences portletPreferences)
                             throws IOException,
                                    ValidatorException
Throws:
IOException
ValidatorException

stripURLAnchor

public static String[] stripURLAnchor(String url,
                                      String separator)

transformCustomSQL

public static String transformCustomSQL(String sql)

transformSQL

public static String transformSQL(String sql)

updateImageId

public static void updateImageId(BaseModel<?> baseModel,
                                 boolean hasImage,
                                 byte[] bytes,
                                 String fieldName,
                                 long maxSize,
                                 int maxHeight,
                                 int maxWidth)
                          throws PortalException
Throws:
PortalException

updatePortletMode

public static PortletMode updatePortletMode(String portletId,
                                            User user,
                                            Layout layout,
                                            PortletMode portletMode,
                                            javax.servlet.http.HttpServletRequest request)
                                     throws PortalException
Throws:
PortalException

updateRedirect

public static String updateRedirect(String redirect,
                                    String oldPath,
                                    String newPath)

updateWindowState

public static WindowState updateWindowState(String portletId,
                                            User user,
                                            Layout layout,
                                            WindowState windowState,
                                            javax.servlet.http.HttpServletRequest request)

removePortalPortEventListener

@Deprecated
public void removePortalPortEventListener(PortalPortEventListener portalPortEventListener)
Deprecated. As of 7.0.0, replaced by removePortalEventListener( PortalInetSocketAddressEventListener)


setPortal

public void setPortal(Portal portal)

Liferay 7.0-ce-b4