Liferay 6.2-ce-ga5

com.liferay.portal.util
Class PortalUtil

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

public class PortalUtil
extends Object


Constructor Summary
PortalUtil()
           
 
Method Summary
static void addPageDescription(String description, javax.servlet.http.HttpServletRequest request)
          Adds the description for a page.
static void addPageKeywords(String keywords, javax.servlet.http.HttpServletRequest request)
          Adds the keywords for a page.
static void addPageSubtitle(String subtitle, javax.servlet.http.HttpServletRequest request)
          Adds the subtitle for a page.
static void addPageTitle(String title, javax.servlet.http.HttpServletRequest request)
          Adds the whole title for a page.
static void addPortalPortEventListener(PortalPortEventListener portalPortEventListener)
           
static void addPortalPortProtocolEventListener(PortalPortProtocolEventListener portalPortProtocolEventListener)
           
static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request, String title, String url)
           
static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request, String title, String url, Map<String,Object> data)
           
static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest request, Portlet portlet)
           
static void addPortletDefaultResource(long companyId, Layout layout, Portlet portlet)
           
static String addPreservedParameters(ThemeDisplay themeDisplay, Layout layout, String url, boolean doAsUser)
          Adds preserved parameters such as doAsGroupId, doAsUserId, doAsUserLanguageId, and referrerPlid that should always be preserved as the user navigates through the portal.
static String addPreservedParameters(ThemeDisplay themeDisplay, String url)
          Adds preserved parameters such as doAsGroupId, doAsUserId, doAsUserLanguageId, and referrerPlid that should always be preserved as the user navigates through the portal.
static void addUserLocaleOptionsMessage(javax.servlet.http.HttpServletRequest request)
           
static void clearRequestParameters(RenderRequest renderRequest)
           
static void copyRequestParameters(ActionRequest actionRequest, ActionResponse actionResponse)
           
static String escapeRedirect(String url)
           
static String generateRandomKey(javax.servlet.http.HttpServletRequest request, String input)
           
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 Locale[] getAlternateLocales(javax.servlet.http.HttpServletRequest request)
          Deprecated. As of 6.2.0, replaced by LanguageUtil.getAvailableLocales()
static String getAlternateURL(String canonicalURL, ThemeDisplay themeDisplay, Locale locale, Layout layout)
           
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)
           
static BaseModel<?> getBaseModel(String modelName, String primKey)
           
static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request)
           
static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request, long companyId)
           
static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout)
           
static String getCanonicalURL(String completeURL, ThemeDisplay themeDisplay, Layout layout, boolean forceLayoutFriendlyURL)
           
static String getCDNHost()
          Deprecated. As of 6.1.0, replaced by getCDNHost(boolean)
static String getCDNHost(boolean secure)
           
static String getCDNHost(javax.servlet.http.HttpServletRequest request)
           
static String getCDNHostHttp(long companyId)
           
static String getCDNHostHttps(long companyId)
           
static String getClassName(long classNameId)
           
static long getClassNameId(Class<?> clazz)
           
static long getClassNameId(String value)
           
static String getClassNamePortletId(String className)
           
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 String getComputerAddress()
          Deprecated. As of 7.0.0, replaced by getComputerAddresses()
static Set<String> getComputerAddresses()
           
static String getComputerName()
           
static Map<String,List<Portlet>> getControlPanelCategoriesMap(javax.servlet.http.HttpServletRequest request)
           
static String getControlPanelCategory(String portletId, ThemeDisplay themeDisplay)
           
static String getControlPanelFullURL(long scopeGroupId, String ppid, Map<String,String[]> params)
           
static long getControlPanelPlid(long companyId)
           
static long getControlPanelPlid(PortletRequest portletRequest)
           
static Set<Portlet> getControlPanelPortlets(long companyId, String category)
           
static List<Portlet> getControlPanelPortlets(String category, ThemeDisplay themeDisplay)
           
static PortletURL getControlPanelPortletURL(javax.servlet.http.HttpServletRequest request, String portletId, long referrerPlid, String lifecycle)
           
static PortletURL getControlPanelPortletURL(PortletRequest portletRequest, String portletId, long referrerPlid, String lifecycle)
           
static String getCreateAccountURL(javax.servlet.http.HttpServletRequest request, ThemeDisplay themeDisplay)
           
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)
           
static Date getDate(int month, int day, int year, Class<? extends PortalException> clazz)
           
static Date getDate(int month, int day, int year, int hour, int min, Class<? extends PortalException> clazz)
           
static Date getDate(int month, int day, int year, int hour, int min, TimeZone timeZone, Class<? extends PortalException> clazz)
           
static Date getDate(int month, int day, int year, TimeZone timeZone, Class<? extends PortalException> clazz)
           
static DB getDB()
          Deprecated. As of 6.1.0, replaced by DBFactoryUtil.getDB()
static long getDefaultCompanyId()
           
static long getDigestAuthUserId(javax.servlet.http.HttpServletRequest request)
           
static String getDisplayURL(Group group, ThemeDisplay themeDisplay)
           
static String getDisplayURL(Group group, ThemeDisplay themeDisplay, boolean privateLayout)
           
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 Portlet getFirstMyAccountPortlet(ThemeDisplay themeDisplay)
           
static String getFirstPageLayoutTypes(javax.servlet.jsp.PageContext pageContext)
           
static Portlet getFirstSiteAdministrationPortlet(ThemeDisplay themeDisplay)
           
static String getFullName(String firstName, String middleName, String lastName)
           
static String getGlobalLibDir()
           
static String getGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static String getGroupFriendlyURL(Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay)
           
static String getGroupFriendlyURL(Group group, boolean privateLayoutSet, 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)
           
static Layout getJournalArticleLayout(long groupId, boolean privateLayout, String friendlyURL)
           
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 getLayoutEditPage(Layout layout)
           
static String getLayoutEditPage(String type)
           
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 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 String getLayoutViewPage(Layout layout)
           
static String getLayoutViewPage(String type)
           
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 String getPortalLibDir()
           
static int getPortalPort()
          Deprecated. As of 6.1.0, replaced by getPortalPort(boolean)
static int getPortalPort(boolean secure)
           
static Properties getPortalProperties()
           
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)
           
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(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(RenderRequest renderRequest)
           
static String getPortletTitle(RenderResponse renderResponse)
           
static String getPortletTitle(String portletId, Locale locale)
           
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 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 Map<String,List<Portlet>> getSiteAdministrationCategoriesMap(javax.servlet.http.HttpServletRequest request)
           
static PortletURL getSiteAdministrationURL(javax.servlet.http.HttpServletRequest request, ThemeDisplay themeDisplay)
           
static PortletURL getSiteAdministrationURL(javax.servlet.http.HttpServletRequest request, ThemeDisplay themeDisplay, String portletName)
           
static PortletURL getSiteAdministrationURL(PortletResponse portletResponse, ThemeDisplay themeDisplay)
           
static PortletURL getSiteAdministrationURL(PortletResponse portletResponse, ThemeDisplay themeDisplay, String portletName)
           
static long[] getSiteAndCompanyGroupIds(long groupId)
           
static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
           
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)
           
static String getValidPortalDomain(long companyId, String domain)
           
static long getValidUserId(long companyId, long userId)
           
static String getVirtualLayoutActualURL(long groupId, boolean privateLayout, String mainPath, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext)
           
static LayoutFriendlyURLComposite getVirtualLayoutFriendlyURLComposite(boolean privateLayout, String friendlyURL, Map<String,String[]> params, Map<String,Object> requestContext)
           
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)
           
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 isCompanyControlPanelVisible(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 isLayoutFirstPageable(Layout layout)
           
static boolean isLayoutFirstPageable(String type)
           
static boolean isLayoutFriendliable(Layout layout)
           
static boolean isLayoutFriendliable(String type)
           
static boolean isLayoutParentable(Layout layout)
           
static boolean isLayoutParentable(String type)
           
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 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)
           
 void removePortalPortEventListener(PortalPortEventListener portalPortEventListener)
           
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 setPortalPort(javax.servlet.http.HttpServletRequest request)
          Sets the port obtained on the first request to the portal.
static void storePreferences(PortletPreferences portletPreferences)
           
static String[] stripURLAnchor(String url, String separator)
           
static String transformCustomSQL(String sql)
           
static String transformSQL(String sql)
           
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)
Adds the description for a page. This appends to the existing page description.


addPageKeywords

public static void addPageKeywords(String keywords,
                                   javax.servlet.http.HttpServletRequest request)
Adds the keywords for a page. This appends to the existing page keywords.


addPageSubtitle

public static void addPageSubtitle(String subtitle,
                                   javax.servlet.http.HttpServletRequest request)
Adds the subtitle for a page. This appends to the existing page subtitle.


addPageTitle

public static void addPageTitle(String title,
                                javax.servlet.http.HttpServletRequest request)
Adds the whole title for a page. This appends to the existing page whole title.


addPortalPortEventListener

public static void addPortalPortEventListener(PortalPortEventListener portalPortEventListener)

addPortalPortProtocolEventListener

public static void addPortalPortProtocolEventListener(PortalPortProtocolEventListener portalPortProtocolEventListener)

addPortletBreadcrumbEntry

public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request,
                                             String title,
                                             String url)

addPortletBreadcrumbEntry

public static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request,
                                             String title,
                                             String url,
                                             Map<String,Object> data)

addPortletDefaultResource

public static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest request,
                                             Portlet portlet)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

addPortletDefaultResource

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

addPreservedParameters

public static String addPreservedParameters(ThemeDisplay themeDisplay,
                                            Layout layout,
                                            String url,
                                            boolean doAsUser)
Adds preserved parameters such as doAsGroupId, doAsUserId, doAsUserLanguageId, and referrerPlid that should always be preserved as the user navigates through the portal. If doAsUser is false, then doAsUserId and doAsUserLanguageId will never be added.


addPreservedParameters

public static String addPreservedParameters(ThemeDisplay themeDisplay,
                                            String url)
Adds preserved parameters such as doAsGroupId, doAsUserId, doAsUserLanguageId, and referrerPlid that should always be preserved as the user navigates through the portal.


addUserLocaleOptionsMessage

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

clearRequestParameters

public static void clearRequestParameters(RenderRequest renderRequest)

copyRequestParameters

public static void copyRequestParameters(ActionRequest actionRequest,
                                         ActionResponse actionResponse)

escapeRedirect

public static String escapeRedirect(String url)

generateRandomKey

public static String generateRandomKey(javax.servlet.http.HttpServletRequest request,
                                       String input)

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,
                                                                             SystemException
Throws:
PortalException
SystemException

getActualURL

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

getAlternateLocales

public static Locale[] getAlternateLocales(javax.servlet.http.HttpServletRequest request)
                                    throws PortalException,
                                           SystemException
Deprecated. As of 6.2.0, replaced by LanguageUtil.getAvailableLocales()

Throws:
PortalException
SystemException

getAlternateURL

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

getAuthTokenIgnoreActions

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


getAuthTokenIgnorePortlets

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


getBaseModel

public static BaseModel<?> getBaseModel(ResourcePermission resourcePermission)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getBaseModel

public static BaseModel<?> getBaseModel(String modelName,
                                        String primKey)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getBasicAuthUserId

public static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getBasicAuthUserId

public static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request,
                                      long companyId)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getCanonicalURL

public static String getCanonicalURL(String completeURL,
                                     ThemeDisplay themeDisplay,
                                     Layout layout)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getCanonicalURL

public static String getCanonicalURL(String completeURL,
                                     ThemeDisplay themeDisplay,
                                     Layout layout,
                                     boolean forceLayoutFriendlyURL)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getCDNHost

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


getCDNHost

public static String getCDNHost(boolean secure)

getCDNHost

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

getCDNHostHttp

public static String getCDNHostHttp(long companyId)

getCDNHostHttps

public static String getCDNHostHttps(long companyId)

getClassName

public static String getClassName(long classNameId)

getClassNameId

public static long getClassNameId(Class<?> clazz)

getClassNameId

public static long getClassNameId(String value)

getClassNamePortletId

public static String getClassNamePortletId(String className)

getCompany

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

getCompany

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

getCompanyId

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

getCompanyId

public static long getCompanyId(PortletRequest portletRequest)

getCompanyIds

public static long[] getCompanyIds()

getComputerAddress

@Deprecated
public static String getComputerAddress()
Deprecated. As of 7.0.0, replaced by getComputerAddresses()


getComputerAddresses

public static Set<String> getComputerAddresses()

getComputerName

public static String getComputerName()

getControlPanelCategoriesMap

public static Map<String,List<Portlet>> getControlPanelCategoriesMap(javax.servlet.http.HttpServletRequest request)
                                                              throws SystemException
Throws:
SystemException

getControlPanelCategory

public static String getControlPanelCategory(String portletId,
                                             ThemeDisplay themeDisplay)
                                      throws SystemException
Throws:
SystemException

getControlPanelFullURL

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

getControlPanelPlid

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

getControlPanelPlid

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

getControlPanelPortlets

public static Set<Portlet> getControlPanelPortlets(long companyId,
                                                   String category)
                                            throws SystemException
Throws:
SystemException

getControlPanelPortlets

public static List<Portlet> getControlPanelPortlets(String category,
                                                    ThemeDisplay themeDisplay)
                                             throws SystemException
Throws:
SystemException

getControlPanelPortletURL

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

getControlPanelPortletURL

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

getCreateAccountURL

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

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)

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           Class<? extends PortalException> clazz)
                    throws PortalException
Throws:
PortalException

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           int hour,
                           int min,
                           Class<? extends PortalException> clazz)
                    throws PortalException
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
Throws:
PortalException

getDate

public static Date getDate(int month,
                           int day,
                           int year,
                           TimeZone timeZone,
                           Class<? extends PortalException> clazz)
                    throws PortalException
Throws:
PortalException

getDB

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


getDefaultCompanyId

public static long getDefaultCompanyId()

getDigestAuthUserId

public static long getDigestAuthUserId(javax.servlet.http.HttpServletRequest request)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getDisplayURL

public static String getDisplayURL(Group group,
                                   ThemeDisplay themeDisplay)
                            throws PortalException
Throws:
PortalException

getDisplayURL

public static String getDisplayURL(Group group,
                                   ThemeDisplay themeDisplay,
                                   boolean privateLayout)
                            throws PortalException
Throws:
PortalException

getEmailFromAddress

public static String getEmailFromAddress(PortletPreferences preferences,
                                         long companyId,
                                         String defaultValue)
                                  throws SystemException
Throws:
SystemException

getEmailFromName

public static String getEmailFromName(PortletPreferences preferences,
                                      long companyId,
                                      String defaultValue)
                               throws SystemException
Throws:
SystemException

getExpandoBridgeAttributes

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

getExpandoBridgeAttributes

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

getExpandoBridgeAttributes

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

getExpandoValue

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

getExpandoValue

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

getExpandoValue

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

getFacebookURL

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

getFirstMyAccountPortlet

public static Portlet getFirstMyAccountPortlet(ThemeDisplay themeDisplay)
                                        throws SystemException
Throws:
SystemException

getFirstPageLayoutTypes

public static String getFirstPageLayoutTypes(javax.servlet.jsp.PageContext pageContext)

getFirstSiteAdministrationPortlet

public static Portlet getFirstSiteAdministrationPortlet(ThemeDisplay themeDisplay)
                                                 throws SystemException
Throws:
SystemException

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,
                                        SystemException
Throws:
PortalException
SystemException

getGroupFriendlyURL

public static String getGroupFriendlyURL(Group group,
                                         boolean privateLayoutSet,
                                         ThemeDisplay themeDisplay)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

getGroupFriendlyURL

public static String getGroupFriendlyURL(Group group,
                                         boolean privateLayoutSet,
                                         ThemeDisplay themeDisplay,
                                         Locale locale)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

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,
                                SystemException
Throws:
PortalException
SystemException

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

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

getJournalArticleLayout

public static Layout getJournalArticleLayout(long groupId,
                                             boolean privateLayout,
                                             String friendlyURL)
                                      throws PortalException,
                                             SystemException
Throws:
PortalException
SystemException

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,
                                        SystemException
Throws:
PortalException
SystemException

getLayoutActualURL

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

getLayoutEditPage

public static String getLayoutEditPage(Layout layout)

getLayoutEditPage

public static String getLayoutEditPage(String type)

getLayoutFriendlyURL

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

getLayoutFriendlyURL

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

getLayoutFriendlyURLComposite

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutSetFriendlyURL

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

getLayoutTarget

public static String getLayoutTarget(Layout layout)

getLayoutURL

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

getLayoutURL

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

getLayoutURL

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

getLayoutURL

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

getLayoutViewPage

public static String getLayoutViewPage(Layout layout)

getLayoutViewPage

public static String getLayoutViewPage(String type)

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

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

Throws:
PortalException
SystemException

getModel

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

Throws:
PortalException
SystemException

getNetvibesURL

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

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

public static long getParentGroupId(long scopeGroupId)
                             throws PortalException,
                                    SystemException
Deprecated. As of 6.2.0 renamed to getSiteGroupId(long)

Throws:
PortalException
SystemException

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,
                                        SystemException
Throws:
PortalException
SystemException

getPlidFromPortletId

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

getPortal

public static Portal getPortal()

getPortalLibDir

public static String getPortalLibDir()

getPortalPort

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


getPortalPort

public static int getPortalPort(boolean secure)

getPortalProperties

public static Properties getPortalProperties()

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,
                                  SystemException
Throws:
PortalException
SystemException

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,
                                  SystemException
Throws:
PortalException
SystemException

getPortalWebDir

public static String getPortalWebDir()

getPortletAddDefaultResourceCheckWhitelist

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


getPortletAddDefaultResourceCheckWhitelistActions

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


getPortletBreadcrumbList

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


getPortletBreadcrumbs

public static List<BreadcrumbEntry> getPortletBreadcrumbs(javax.servlet.http.HttpServletRequest request)

getPortletConfig

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

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(RenderRequest renderRequest)

getPortletTitle

public static String getPortletTitle(RenderResponse renderResponse)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     Locale locale)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     String languageId)

getPortletTitle

public static String getPortletTitle(String portletId,
                                     User user)

getPortletXmlFileName

public static String getPortletXmlFileName()
                                    throws SystemException
Throws:
SystemException

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,
                                        SystemException
Throws:
PortalException
SystemException

getScopeGroupId

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

getScopeGroupId

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

getScopeGroupId

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

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,
                                   SystemException
Throws:
PortalException
SystemException

getSelectedUser

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

getSelectedUser

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

getSelectedUser

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

getSelectedUser

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

getServletContextName

public static String getServletContextName()

getSharedContentSiteGroupIds

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

getSiteAdministrationCategoriesMap

public static Map<String,List<Portlet>> getSiteAdministrationCategoriesMap(javax.servlet.http.HttpServletRequest request)
                                                                    throws SystemException
Throws:
SystemException

getSiteAdministrationURL

public static PortletURL getSiteAdministrationURL(javax.servlet.http.HttpServletRequest request,
                                                  ThemeDisplay themeDisplay)
                                           throws SystemException
Throws:
SystemException

getSiteAdministrationURL

public static PortletURL getSiteAdministrationURL(javax.servlet.http.HttpServletRequest request,
                                                  ThemeDisplay themeDisplay,
                                                  String portletName)

getSiteAdministrationURL

public static PortletURL getSiteAdministrationURL(PortletResponse portletResponse,
                                                  ThemeDisplay themeDisplay)
                                           throws SystemException
Throws:
SystemException

getSiteAdministrationURL

public static PortletURL getSiteAdministrationURL(PortletResponse portletResponse,
                                                  ThemeDisplay themeDisplay,
                                                  String portletName)

getSiteAndCompanyGroupIds

public static long[] getSiteAndCompanyGroupIds(long groupId)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

getSiteAndCompanyGroupIds

public static long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

getSiteDefaultLocale

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

getSiteGroupId

public static long getSiteGroupId(long scopeGroupId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getSiteLoginURL

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

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,
                           SystemException
Throws:
PortalException
SystemException

getUser

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

getUserEmailAddress

public static String getUserEmailAddress(long userId)
                                  throws SystemException
Throws:
SystemException

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

public static String getUserValue(long userId,
                                  String param,
                                  String defaultValue)
                           throws SystemException
Throws:
SystemException

getValidPortalDomain

public static String getValidPortalDomain(long companyId,
                                          String domain)

getValidUserId

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

getVirtualLayoutActualURL

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

getVirtualLayoutFriendlyURLComposite

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

getWidgetURL

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

initCustomSQL

public static void initCustomSQL()

initUser

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

invokeTaglibDiscussion

public static void invokeTaglibDiscussion(PortletConfig portletConfig,
                                          ActionRequest actionRequest,
                                          ActionResponse actionResponse)
                                   throws Exception
Throws:
Exception

isAllowAddPortletDefaultResource

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

Throws:
PortalException
SystemException

isCDNDynamicResourcesEnabled

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

isCDNDynamicResourcesEnabled

public static boolean isCDNDynamicResourcesEnabled(long companyId)

isCommunityAdmin

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

Throws:
Exception

isCommunityOwner

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,
                                                   SystemException
Throws:
PortalException
SystemException

isCompanyControlPanelPortlet

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

isCompanyControlPanelVisible

public static boolean isCompanyControlPanelVisible(ThemeDisplay themeDisplay)
                                            throws PortalException,
                                                   SystemException
Throws:
PortalException
SystemException

isControlPanelPortlet

public static boolean isControlPanelPortlet(String portletId,
                                            String category,
                                            ThemeDisplay themeDisplay)
                                     throws SystemException
Throws:
SystemException

isControlPanelPortlet

public static boolean isControlPanelPortlet(String portletId,
                                            ThemeDisplay themeDisplay)
                                     throws SystemException
Throws:
SystemException

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,
                                         SystemException
Throws:
PortalException
SystemException

isLayoutFirstPageable

public static boolean isLayoutFirstPageable(Layout layout)

isLayoutFirstPageable

public static boolean isLayoutFirstPageable(String type)

isLayoutFriendliable

public static boolean isLayoutFriendliable(Layout layout)

isLayoutFriendliable

public static boolean isLayoutFriendliable(String type)

isLayoutParentable

public static boolean isLayoutParentable(Layout layout)

isLayoutParentable

public static boolean isLayoutParentable(String type)

isLayoutSitemapable

public static boolean isLayoutSitemapable(Layout layout)

isLoginRedirectRequired

public static boolean isLoginRedirectRequired(javax.servlet.http.HttpServletRequest request)
                                       throws SystemException
Throws:
SystemException

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)

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()
                                 throws SystemException
Throws:
SystemException

isValidResourceId

public static boolean isValidResourceId(String resourceId)

resetCDNHosts

public static void resetCDNHosts()

resetPortletAddDefaultResourceCheckWhitelist

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


resetPortletAddDefaultResourceCheckWhitelistActions

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

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.


setPortalPort

public static void setPortalPort(javax.servlet.http.HttpServletRequest request)
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)

updatePortletMode

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

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

public void removePortalPortEventListener(PortalPortEventListener portalPortEventListener)

setPortal

public void setPortal(Portal portal)

Liferay 6.2-ce-ga5