com.liferay.portal.util
Class PortalUtil

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

public class PortalUtil
extends java.lang.Object

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
PortalUtil()
           
 
Method Summary
static void clearRequestParameters(javax.portlet.RenderRequest renderRequest)
           
static void copyRequestParameters(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
static java.lang.String getCDNHost()
           
static java.lang.String getClassName(long classNameId)
           
static long getClassNameId(java.lang.Class<?> classObj)
           
static long getClassNameId(java.lang.String value)
           
static java.lang.String getClassNamePortletId(java.lang.String className)
           
static java.lang.String getCommunityLoginURL(ThemeDisplay themeDisplay)
           
static Company getCompany(javax.portlet.ActionRequest actionRequest)
           
static Company getCompany(javax.servlet.http.HttpServletRequest request)
           
static Company getCompany(javax.portlet.RenderRequest renderRequest)
           
static long getCompanyId(javax.portlet.ActionRequest actionRequest)
           
static long getCompanyId(javax.servlet.http.HttpServletRequest request)
           
static long getCompanyId(javax.portlet.PortletRequest portletRequest)
           
static long getCompanyId(javax.portlet.RenderRequest renderRequest)
           
static long getCompanyIdByWebId(javax.servlet.ServletContext servletContext)
           
static long getCompanyIdByWebId(java.lang.String webId)
           
static long[] getCompanyIds()
           
static java.lang.String getComputerAddress()
           
static java.lang.String getComputerName()
           
static java.lang.String getCurrentURL(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getCurrentURL(javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getCustomSQLFunctionIsNotNull()
           
static java.lang.String getCustomSQLFunctionIsNull()
           
static java.util.Date getDate(int month, int day, int year, int hour, int min, com.liferay.portal.PortalException pe)
           
static java.util.Date getDate(int month, int day, int year, int hour, int min, java.util.TimeZone timeZone, com.liferay.portal.PortalException pe)
           
static java.util.Date getDate(int month, int day, int year, com.liferay.portal.PortalException pe)
           
static java.util.Date getDate(int month, int day, int year, java.util.TimeZone timeZone, com.liferay.portal.PortalException pe)
           
static java.lang.String getHost(javax.portlet.ActionRequest actionRequest)
           
static java.lang.String getHost(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getHost(javax.portlet.RenderRequest renderRequest)
           
static javax.servlet.http.HttpServletRequest getHttpServletRequest(javax.portlet.PortletRequest portletRequest)
           
static javax.servlet.http.HttpServletResponse getHttpServletResponse(javax.portlet.PortletResponse portletResponse)
           
static java.lang.String getJsSafePortletId(java.lang.String portletId)
           
static java.lang.String getLayoutActualURL(Layout layout)
           
static java.lang.String getLayoutActualURL(Layout layout, java.lang.String mainPath)
           
static java.lang.String getLayoutActualURL(long groupId, boolean privateLayout, java.lang.String mainPath, java.lang.String friendlyURL)
           
static java.lang.String getLayoutActualURL(long groupId, boolean privateLayout, java.lang.String mainPath, java.lang.String friendlyURL, java.util.Map<java.lang.String,java.lang.String[]> params)
           
static java.lang.String getLayoutEditPage(Layout layout)
           
static java.lang.String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutSetFriendlyURL(LayoutSet layoutSet, ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutTarget(Layout layout)
           
static java.lang.String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
           
static java.lang.String getLayoutURL(ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutViewPage(Layout layout)
           
static java.util.Locale getLocale(javax.servlet.http.HttpServletRequest request)
           
static java.util.Locale getLocale(javax.portlet.RenderRequest renderRequest)
           
static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getPathContext()
           
static java.lang.String getPathFriendlyURLPrivateGroup()
           
static java.lang.String getPathFriendlyURLPrivateUser()
           
static java.lang.String getPathFriendlyURLPublic()
           
static java.lang.String getPathImage()
           
static java.lang.String getPathMain()
           
static long getPlidFromFriendlyURL(long companyId, java.lang.String friendlyURL)
           
static long getPlidFromPortletId(long groupId, boolean privateLayout, java.lang.String portletId)
           
static Portal getPortal()
           
static java.lang.String getPortalLibDir()
           
static int getPortalPort()
           
static java.util.Properties getPortalProperties()
           
static java.lang.String getPortalURL(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getPortalURL(javax.servlet.http.HttpServletRequest request, boolean secure)
           
static java.lang.String getPortalURL(javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getPortalURL(javax.portlet.PortletRequest portletRequest, boolean secure)
           
static java.lang.String getPortalURL(java.lang.String serverName, int serverPort, boolean secure)
           
static java.lang.String getPortalURL(ThemeDisplay themeDisplay)
           
static java.lang.Object[] getPortletFriendlyURLMapper(long groupId, boolean privateLayout, java.lang.String url)
           
static java.lang.Object[] getPortletFriendlyURLMapper(long groupId, boolean privateLayout, java.lang.String url, java.util.Map<java.lang.String,java.lang.String[]> params)
           
static long getPortletGroupId(javax.portlet.ActionRequest actionRequest)
           
static long getPortletGroupId(javax.servlet.http.HttpServletRequest request)
           
static long getPortletGroupId(Layout layout)
           
static long getPortletGroupId(long plid)
           
static long getPortletGroupId(javax.portlet.RenderRequest renderRequest)
           
static java.lang.String getPortletId(javax.portlet.ActionRequest actionRequest)
           
static java.lang.String getPortletId(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getPortletId(javax.portlet.RenderRequest renderRequest)
           
static java.lang.String getPortletNamespace(java.lang.String portletId)
           
static java.lang.String getPortletTitle(Portlet portlet, long companyId, java.util.Locale locale)
           
static java.lang.String getPortletTitle(Portlet portlet, long companyId, java.lang.String languageId)
           
static java.lang.String getPortletTitle(Portlet portlet, javax.servlet.ServletContext servletContext, java.util.Locale locale)
           
static java.lang.String getPortletTitle(Portlet portlet, User user)
           
static java.lang.String getPortletTitle(java.lang.String portletId, long companyId, java.util.Locale locale)
           
static java.lang.String getPortletTitle(java.lang.String portletId, long companyId, java.lang.String languageId)
           
static java.lang.String getPortletTitle(java.lang.String portletId, User user)
           
static java.lang.String getPortletXmlFileName()
           
static javax.portlet.PortletPreferences getPreferences(javax.servlet.http.HttpServletRequest request)
           
static javax.portlet.PreferencesValidator getPreferencesValidator(Portlet portlet)
           
static User getSelectedUser(javax.portlet.ActionRequest actionRequest)
           
static User getSelectedUser(javax.portlet.ActionRequest actionRequest, boolean checkPermission)
           
static User getSelectedUser(javax.servlet.http.HttpServletRequest request)
           
static User getSelectedUser(javax.servlet.http.HttpServletRequest request, boolean checkPermission)
           
static User getSelectedUser(javax.portlet.RenderRequest renderRequest)
           
static User getSelectedUser(javax.portlet.RenderRequest renderRequest, boolean checkPermission)
           
static java.lang.String getStrutsAction(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String[] getSystemCommunityRoles()
           
static java.lang.String[] getSystemGroups()
           
static java.lang.String[] getSystemOrganizationRoles()
           
static java.lang.String[] getSystemRoles()
           
static com.liferay.portal.kernel.upload.UploadPortletRequest getUploadPortletRequest(javax.portlet.ActionRequest actionRequest)
           
static com.liferay.portal.kernel.upload.UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest request)
           
static java.util.Date getUptime()
           
static java.lang.String getURLWithSessionId(java.lang.String url, java.lang.String sessionId)
           
static User getUser(javax.portlet.ActionRequest actionRequest)
           
static User getUser(javax.servlet.http.HttpServletRequest request)
           
static User getUser(javax.portlet.RenderRequest renderRequest)
           
static long getUserId(javax.portlet.ActionRequest actionRequest)
           
static long getUserId(javax.servlet.http.HttpServletRequest request)
           
static long getUserId(javax.portlet.RenderRequest renderRequest)
           
static java.lang.String getUserName(long userId, java.lang.String defaultUserName)
           
static java.lang.String getUserName(long userId, java.lang.String defaultUserName, javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getUserName(long userId, java.lang.String defaultUserName, java.lang.String userAttribute)
           
static java.lang.String getUserName(long userId, java.lang.String defaultUserName, java.lang.String userAttribute, javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getUserPassword(javax.portlet.ActionRequest actionRequest)
           
static java.lang.String getUserPassword(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getUserPassword(javax.servlet.http.HttpSession session)
           
static java.lang.String getUserPassword(javax.portlet.RenderRequest renderRequest)
           
static java.lang.String getUserValue(long userId, java.lang.String param, java.lang.String defaultValue)
           
static java.lang.String getWidgetURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static boolean isLayoutFriendliable(Layout layout)
           
static boolean isLayoutParentable(Layout layout)
           
static boolean isLayoutParentable(java.lang.String type)
           
static boolean isLayoutSitemapable(Layout layout)
           
static boolean isMethodGet(javax.portlet.PortletRequest portletRequest)
           
static boolean isMethodPost(javax.portlet.PortletRequest portletRequest)
           
static boolean isReservedParameter(java.lang.String name)
           
static boolean isSystemGroup(java.lang.String groupName)
           
static boolean isSystemRole(java.lang.String roleName)
           
static boolean isUpdateAvailable()
           
static void renderPage(java.lang.StringBuilder sb, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path)
           
static void renderPortlet(java.lang.StringBuilder sb, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Portlet portlet, java.lang.String queryString)
           
static void renderPortlet(java.lang.StringBuilder sb, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Portlet portlet, java.lang.String queryString, java.lang.String columnId, java.lang.Integer columnPos, java.lang.Integer columnCount)
           
static void renderPortlet(java.lang.StringBuilder sb, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Portlet portlet, java.lang.String queryString, java.lang.String columnId, java.lang.Integer columnPos, java.lang.Integer columnCount, java.lang.String path)
           
static void sendError(java.lang.Exception e, javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
static void sendError(java.lang.Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static void sendError(int status, java.lang.Exception e, javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
static void sendError(int status, java.lang.Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static void setPageSubtitle(java.lang.String subtitle, javax.servlet.http.HttpServletRequest request)
          Sets the subtitle for a page.
static void setPageTitle(java.lang.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(javax.portlet.PortletPreferences prefs)
           
static java.lang.String transformCustomSQL(java.lang.String sql)
           
static javax.portlet.PortletMode updatePortletMode(java.lang.String portletId, User user, Layout layout, javax.portlet.PortletMode portletMode, javax.servlet.http.HttpServletRequest request)
           
static javax.portlet.WindowState updateWindowState(java.lang.String portletId, User user, Layout layout, javax.portlet.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

clearRequestParameters

public static void clearRequestParameters(javax.portlet.RenderRequest renderRequest)

copyRequestParameters

public static void copyRequestParameters(javax.portlet.ActionRequest actionRequest,
                                         javax.portlet.ActionResponse actionResponse)

getCDNHost

public static java.lang.String getCDNHost()

getClassName

public static java.lang.String getClassName(long classNameId)

getClassNameId

public static long getClassNameId(java.lang.Class<?> classObj)

getClassNameId

public static long getClassNameId(java.lang.String value)

getClassNamePortletId

public static java.lang.String getClassNamePortletId(java.lang.String className)

getCommunityLoginURL

public static java.lang.String getCommunityLoginURL(ThemeDisplay themeDisplay)
                                             throws com.liferay.portal.PortalException,
                                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getCompany

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

getCompany

public static Company getCompany(javax.portlet.ActionRequest actionRequest)
                          throws com.liferay.portal.PortalException,
                                 com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getCompany

public static Company getCompany(javax.portlet.RenderRequest renderRequest)
                          throws com.liferay.portal.PortalException,
                                 com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getCompanyId

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

getCompanyId

public static long getCompanyId(javax.portlet.ActionRequest actionRequest)

getCompanyId

public static long getCompanyId(javax.portlet.PortletRequest portletRequest)

getCompanyId

public static long getCompanyId(javax.portlet.RenderRequest renderRequest)

getCompanyIdByWebId

public static long getCompanyIdByWebId(javax.servlet.ServletContext servletContext)

getCompanyIdByWebId

public static long getCompanyIdByWebId(java.lang.String webId)

getCompanyIds

public static long[] getCompanyIds()

getComputerAddress

public static java.lang.String getComputerAddress()

getComputerName

public static java.lang.String getComputerName()

getCurrentURL

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

getCurrentURL

public static java.lang.String getCurrentURL(javax.portlet.PortletRequest portletRequest)

getCustomSQLFunctionIsNotNull

public static java.lang.String getCustomSQLFunctionIsNotNull()

getCustomSQLFunctionIsNull

public static java.lang.String getCustomSQLFunctionIsNull()

getDate

public static java.util.Date getDate(int month,
                                     int day,
                                     int year,
                                     com.liferay.portal.PortalException pe)
                              throws com.liferay.portal.PortalException
Throws:
com.liferay.portal.PortalException

getDate

public static java.util.Date getDate(int month,
                                     int day,
                                     int year,
                                     java.util.TimeZone timeZone,
                                     com.liferay.portal.PortalException pe)
                              throws com.liferay.portal.PortalException
Throws:
com.liferay.portal.PortalException

getDate

public static java.util.Date getDate(int month,
                                     int day,
                                     int year,
                                     int hour,
                                     int min,
                                     com.liferay.portal.PortalException pe)
                              throws com.liferay.portal.PortalException
Throws:
com.liferay.portal.PortalException

getDate

public static java.util.Date getDate(int month,
                                     int day,
                                     int year,
                                     int hour,
                                     int min,
                                     java.util.TimeZone timeZone,
                                     com.liferay.portal.PortalException pe)
                              throws com.liferay.portal.PortalException
Throws:
com.liferay.portal.PortalException

getHost

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

getHost

public static java.lang.String getHost(javax.portlet.ActionRequest actionRequest)

getHost

public static java.lang.String getHost(javax.portlet.RenderRequest renderRequest)

getHttpServletRequest

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

getHttpServletResponse

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

getLayoutEditPage

public static java.lang.String getLayoutEditPage(Layout layout)

getLayoutViewPage

public static java.lang.String getLayoutViewPage(Layout layout)

getLayoutURL

public static java.lang.String getLayoutURL(ThemeDisplay themeDisplay)

getLayoutURL

public static java.lang.String getLayoutURL(Layout layout,
                                            ThemeDisplay themeDisplay)

getLayoutURL

public static java.lang.String getLayoutURL(Layout layout,
                                            ThemeDisplay themeDisplay,
                                            boolean doAsUser)

getLayoutActualURL

public static java.lang.String getLayoutActualURL(Layout layout)

getLayoutActualURL

public static java.lang.String getLayoutActualURL(Layout layout,
                                                  java.lang.String mainPath)

getLayoutActualURL

public static java.lang.String getLayoutActualURL(long groupId,
                                                  boolean privateLayout,
                                                  java.lang.String mainPath,
                                                  java.lang.String friendlyURL)
                                           throws com.liferay.portal.PortalException,
                                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getLayoutActualURL

public static java.lang.String getLayoutActualURL(long groupId,
                                                  boolean privateLayout,
                                                  java.lang.String mainPath,
                                                  java.lang.String friendlyURL,
                                                  java.util.Map<java.lang.String,java.lang.String[]> params)
                                           throws com.liferay.portal.PortalException,
                                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getLayoutFriendlyURL

public static java.lang.String getLayoutFriendlyURL(Layout layout,
                                                    ThemeDisplay themeDisplay)

getLayoutSetFriendlyURL

public static java.lang.String getLayoutSetFriendlyURL(LayoutSet layoutSet,
                                                       ThemeDisplay themeDisplay)
                                                throws com.liferay.portal.PortalException,
                                                       com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getLayoutTarget

public static java.lang.String getLayoutTarget(Layout layout)

getJsSafePortletId

public static java.lang.String getJsSafePortletId(java.lang.String portletId)

getLocale

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

getLocale

public static java.util.Locale getLocale(javax.portlet.RenderRequest renderRequest)

getOriginalServletRequest

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

getPathContext

public static java.lang.String getPathContext()

getPathFriendlyURLPrivateGroup

public static java.lang.String getPathFriendlyURLPrivateGroup()

getPathFriendlyURLPrivateUser

public static java.lang.String getPathFriendlyURLPrivateUser()

getPathFriendlyURLPublic

public static java.lang.String getPathFriendlyURLPublic()

getPathImage

public static java.lang.String getPathImage()

getPathMain

public static java.lang.String getPathMain()

getPlidFromFriendlyURL

public static long getPlidFromFriendlyURL(long companyId,
                                          java.lang.String friendlyURL)

getPlidFromPortletId

public static long getPlidFromPortletId(long groupId,
                                        boolean privateLayout,
                                        java.lang.String portletId)

getPortal

public static Portal getPortal()

getPortalLibDir

public static java.lang.String getPortalLibDir()

getPortalURL

public static java.lang.String getPortalURL(ThemeDisplay themeDisplay)

getPortalURL

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

getPortalURL

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

getPortalURL

public static java.lang.String getPortalURL(javax.portlet.PortletRequest portletRequest)

getPortalURL

public static java.lang.String getPortalURL(javax.portlet.PortletRequest portletRequest,
                                            boolean secure)

getPortalURL

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

getPortalPort

public static int getPortalPort()

getPortalProperties

public static java.util.Properties getPortalProperties()

getPortletFriendlyURLMapper

public static java.lang.Object[] getPortletFriendlyURLMapper(long groupId,
                                                             boolean privateLayout,
                                                             java.lang.String url)
                                                      throws com.liferay.portal.PortalException,
                                                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getPortletFriendlyURLMapper

public static java.lang.Object[] getPortletFriendlyURLMapper(long groupId,
                                                             boolean privateLayout,
                                                             java.lang.String url,
                                                             java.util.Map<java.lang.String,java.lang.String[]> params)
                                                      throws com.liferay.portal.PortalException,
                                                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getPortletGroupId

public static long getPortletGroupId(long plid)

getPortletGroupId

public static long getPortletGroupId(Layout layout)

getPortletGroupId

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

getPortletGroupId

public static long getPortletGroupId(javax.portlet.ActionRequest actionRequest)

getPortletGroupId

public static long getPortletGroupId(javax.portlet.RenderRequest renderRequest)

getPortletId

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

getPortletId

public static java.lang.String getPortletId(javax.portlet.ActionRequest actionRequest)

getPortletId

public static java.lang.String getPortletId(javax.portlet.RenderRequest renderRequest)

getPortletNamespace

public static java.lang.String getPortletNamespace(java.lang.String portletId)

getPortletTitle

public static java.lang.String getPortletTitle(java.lang.String portletId,
                                               long companyId,
                                               java.lang.String languageId)

getPortletTitle

public static java.lang.String getPortletTitle(java.lang.String portletId,
                                               long companyId,
                                               java.util.Locale locale)

getPortletTitle

public static java.lang.String getPortletTitle(java.lang.String portletId,
                                               User user)

getPortletTitle

public static java.lang.String getPortletTitle(Portlet portlet,
                                               long companyId,
                                               java.lang.String languageId)

getPortletTitle

public static java.lang.String getPortletTitle(Portlet portlet,
                                               long companyId,
                                               java.util.Locale locale)

getPortletTitle

public static java.lang.String getPortletTitle(Portlet portlet,
                                               User user)

getPortletTitle

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

getPortletXmlFileName

public static java.lang.String getPortletXmlFileName()
                                              throws com.liferay.portal.PortalException,
                                                     com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getPreferences

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

getPreferencesValidator

public static javax.portlet.PreferencesValidator getPreferencesValidator(Portlet portlet)

getSelectedUser

public static User getSelectedUser(javax.servlet.http.HttpServletRequest request)
                            throws com.liferay.portal.PortalException,
                                   java.rmi.RemoteException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getSelectedUser

public static User getSelectedUser(javax.servlet.http.HttpServletRequest request,
                                   boolean checkPermission)
                            throws com.liferay.portal.PortalException,
                                   java.rmi.RemoteException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getSelectedUser

public static User getSelectedUser(javax.portlet.ActionRequest actionRequest)
                            throws com.liferay.portal.PortalException,
                                   java.rmi.RemoteException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getSelectedUser

public static User getSelectedUser(javax.portlet.ActionRequest actionRequest,
                                   boolean checkPermission)
                            throws com.liferay.portal.PortalException,
                                   java.rmi.RemoteException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getSelectedUser

public static User getSelectedUser(javax.portlet.RenderRequest renderRequest)
                            throws com.liferay.portal.PortalException,
                                   java.rmi.RemoteException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getSelectedUser

public static User getSelectedUser(javax.portlet.RenderRequest renderRequest,
                                   boolean checkPermission)
                            throws com.liferay.portal.PortalException,
                                   java.rmi.RemoteException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

getStrutsAction

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

getSystemCommunityRoles

public static java.lang.String[] getSystemCommunityRoles()

getSystemGroups

public static java.lang.String[] getSystemGroups()

getSystemOrganizationRoles

public static java.lang.String[] getSystemOrganizationRoles()

getSystemRoles

public static java.lang.String[] getSystemRoles()

getUploadPortletRequest

public static com.liferay.portal.kernel.upload.UploadPortletRequest getUploadPortletRequest(javax.portlet.ActionRequest actionRequest)

getUploadServletRequest

public static com.liferay.portal.kernel.upload.UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest request)

getUptime

public static java.util.Date getUptime()

getURLWithSessionId

public static java.lang.String getURLWithSessionId(java.lang.String url,
                                                   java.lang.String sessionId)

getUser

public static User getUser(javax.servlet.http.HttpServletRequest request)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUser

public static User getUser(javax.portlet.ActionRequest actionRequest)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUser

public static User getUser(javax.portlet.RenderRequest renderRequest)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserId

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

getUserId

public static long getUserId(javax.portlet.ActionRequest actionRequest)

getUserId

public static long getUserId(javax.portlet.RenderRequest renderRequest)

getUserName

public static java.lang.String getUserName(long userId,
                                           java.lang.String defaultUserName)

getUserName

public static java.lang.String getUserName(long userId,
                                           java.lang.String defaultUserName,
                                           java.lang.String userAttribute)

getUserName

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

getUserName

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

getUserPassword

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

getUserPassword

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

getUserPassword

public static java.lang.String getUserPassword(javax.portlet.ActionRequest actionRequest)

getUserPassword

public static java.lang.String getUserPassword(javax.portlet.RenderRequest renderRequest)

getUserValue

public static java.lang.String getUserValue(long userId,
                                            java.lang.String param,
                                            java.lang.String defaultValue)
                                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getWidgetURL

public static java.lang.String getWidgetURL(Portlet portlet,
                                            ThemeDisplay themeDisplay)

isMethodGet

public static boolean isMethodGet(javax.portlet.PortletRequest portletRequest)

isMethodPost

public static boolean isMethodPost(javax.portlet.PortletRequest portletRequest)

isLayoutFriendliable

public static boolean isLayoutFriendliable(Layout layout)

isLayoutParentable

public static boolean isLayoutParentable(Layout layout)

isLayoutParentable

public static boolean isLayoutParentable(java.lang.String type)

isLayoutSitemapable

public static boolean isLayoutSitemapable(Layout layout)

isReservedParameter

public static boolean isReservedParameter(java.lang.String name)

isSystemGroup

public static boolean isSystemGroup(java.lang.String groupName)

isSystemRole

public static boolean isSystemRole(java.lang.String roleName)

isUpdateAvailable

public static boolean isUpdateAvailable()
                                 throws com.liferay.portal.PortalException,
                                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

renderPage

public static void renderPage(java.lang.StringBuilder sb,
                              javax.servlet.ServletContext servletContext,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              java.lang.String path)
                       throws java.io.IOException,
                              javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

renderPortlet

public static void renderPortlet(java.lang.StringBuilder sb,
                                 javax.servlet.ServletContext servletContext,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 Portlet portlet,
                                 java.lang.String queryString)
                          throws java.io.IOException,
                                 javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

renderPortlet

public static void renderPortlet(java.lang.StringBuilder sb,
                                 javax.servlet.ServletContext servletContext,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 Portlet portlet,
                                 java.lang.String queryString,
                                 java.lang.String columnId,
                                 java.lang.Integer columnPos,
                                 java.lang.Integer columnCount)
                          throws java.io.IOException,
                                 javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

renderPortlet

public static void renderPortlet(java.lang.StringBuilder sb,
                                 javax.servlet.ServletContext servletContext,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 Portlet portlet,
                                 java.lang.String queryString,
                                 java.lang.String columnId,
                                 java.lang.Integer columnPos,
                                 java.lang.Integer columnCount,
                                 java.lang.String path)
                          throws java.io.IOException,
                                 javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

sendError

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

sendError

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

sendError

public static void sendError(java.lang.Exception e,
                             javax.portlet.ActionRequest actionRequest,
                             javax.portlet.ActionResponse actionResponse)
                      throws java.io.IOException
Throws:
java.io.IOException

sendError

public static void sendError(int status,
                             java.lang.Exception e,
                             javax.portlet.ActionRequest actionRequest,
                             javax.portlet.ActionResponse actionResponse)
                      throws java.io.IOException
Throws:
java.io.IOException

setPageSubtitle

public static void setPageSubtitle(java.lang.String subtitle,
                                   javax.servlet.http.HttpServletRequest request)
Sets the subtitle for a page. This is just a hint and can be overridden by subsequent calls. The last call to this method wins.

Parameters:
subtitle - the subtitle for a page
req - the HTTP servlet request

setPageTitle

public static void setPageTitle(java.lang.String title,
                                javax.servlet.http.HttpServletRequest request)
Sets the whole title for a page. This is just a hint and can be overridden by subsequent calls. The last call to this method wins.

Parameters:
title - the whole title for a page
req - the HTTP servlet request

setPortalPort

public static void setPortalPort(javax.servlet.http.HttpServletRequest request)
Sets the port obtained on the first request to the portal.

Parameters:
req - the HTTP servlet request

storePreferences

public static void storePreferences(javax.portlet.PortletPreferences prefs)
                             throws java.io.IOException,
                                    javax.portlet.ValidatorException
Throws:
java.io.IOException
javax.portlet.ValidatorException

transformCustomSQL

public static java.lang.String transformCustomSQL(java.lang.String sql)

updatePortletMode

public static javax.portlet.PortletMode updatePortletMode(java.lang.String portletId,
                                                          User user,
                                                          Layout layout,
                                                          javax.portlet.PortletMode portletMode,
                                                          javax.servlet.http.HttpServletRequest request)

updateWindowState

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

setPortal

public void setPortal(Portal portal)