com.liferay.portal.util
Class PortalUtil

java.lang.Object
  extended bycom.liferay.portal.util.PortalUtil

public class PortalUtil
extends java.lang.Object

View Source

Author:
Brian Wing Shun Chan, Brian Myunghun Kim, Jorge Ferrer

Field Summary
static boolean DEFAULT_P_L_RESET
           
static java.lang.String PATH_IMAGE
           
static java.lang.String PATH_MAIN
           
static java.lang.String PATH_PORTAL_LAYOUT
           
static java.lang.String PORTLET_XML_FILE_NAME_CUSTOM
           
static java.lang.String PORTLET_XML_FILE_NAME_STANDARD
           
static java.util.Date UP_TIME
           
 
Method Summary
static void clearRequestParameters(javax.portlet.RenderRequest req)
           
static void copyRequestParameters(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res)
           
static java.lang.String createSecureProxyURL(java.lang.String url, java.security.Key key, boolean secure)
           
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 com.liferay.portal.model.Company getCompany(javax.portlet.ActionRequest req)
           
static com.liferay.portal.model.Company getCompany(javax.servlet.http.HttpServletRequest req)
           
static com.liferay.portal.model.Company getCompany(javax.portlet.RenderRequest req)
           
static long getCompanyId(javax.portlet.ActionRequest req)
           
static long getCompanyId(javax.servlet.http.HttpServletRequest req)
           
static long getCompanyId(javax.portlet.PortletRequest req)
           
static long getCompanyId(javax.portlet.RenderRequest req)
           
static long getCompanyIdByWebId(javax.servlet.ServletContext ctx)
           
static long getCompanyIdByWebId(java.lang.String webId)
           
static java.lang.String getCurrentURL(javax.servlet.http.HttpServletRequest req)
           
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 req)
           
static java.lang.String getHost(javax.servlet.http.HttpServletRequest req)
           
static java.lang.String getHost(javax.portlet.RenderRequest req)
           
static javax.servlet.http.HttpServletRequest getHttpServletRequest(javax.portlet.PortletRequest req)
           
static javax.servlet.http.HttpServletResponse getHttpServletResponse(javax.portlet.PortletResponse res)
           
static java.lang.String getJsSafePortletId(java.lang.String portletId)
           
static java.lang.String getJsSafePortletName(java.lang.String portletName)
          Deprecated. Use getJsSafePortletId.
static java.lang.String getLayoutActualURL(com.liferay.portal.model.Layout layout)
           
static java.lang.String getLayoutActualURL(com.liferay.portal.model.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 params)
           
static java.lang.String getLayoutEditPage(com.liferay.portal.model.Layout layout)
           
static java.lang.String getLayoutFriendlyURL(com.liferay.portal.model.Layout layout, com.liferay.portal.theme.ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutTarget(com.liferay.portal.model.Layout layout)
           
static java.lang.String getLayoutURL(com.liferay.portal.model.Layout layout, com.liferay.portal.theme.ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutURL(com.liferay.portal.model.Layout layout, com.liferay.portal.theme.ThemeDisplay themeDisplay, boolean doAsUser)
           
static java.lang.String getLayoutURL(com.liferay.portal.theme.ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutViewPage(com.liferay.portal.model.Layout layout)
           
static java.util.Locale getLocale(javax.servlet.http.HttpServletRequest req)
           
static java.util.Locale getLocale(javax.portlet.RenderRequest req)
           
static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest req)
           
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 java.lang.String getPortalLibDir()
           
static java.lang.String getPortalURL(javax.servlet.http.HttpServletRequest req)
           
static java.lang.String getPortalURL(javax.servlet.http.HttpServletRequest req, boolean secure)
           
static java.lang.String getPortalURL(javax.portlet.PortletRequest req)
           
static java.lang.String getPortalURL(javax.portlet.PortletRequest req, boolean secure)
           
static java.lang.String getPortalURL(java.lang.String serverName, int serverPort, boolean secure)
           
static java.lang.String getPortalURL(com.liferay.portal.theme.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 params)
           
static long getPortletGroupId(javax.portlet.ActionRequest req)
           
static long getPortletGroupId(javax.servlet.http.HttpServletRequest req)
           
static long getPortletGroupId(com.liferay.portal.model.Layout layout)
           
static long getPortletGroupId(long plid)
           
static long getPortletGroupId(javax.portlet.RenderRequest req)
           
static java.lang.String getPortletNamespace(java.lang.String portletId)
           
static java.lang.String getPortletTitle(com.liferay.portal.model.Portlet portlet, javax.servlet.ServletContext ctx, 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, com.liferay.portal.model.User user)
           
static java.lang.String getPortletXmlFileName()
           
static javax.portlet.PortletPreferences getPreferences(javax.servlet.http.HttpServletRequest req)
           
static javax.portlet.PreferencesValidator getPreferencesValidator(com.liferay.portal.model.Portlet portlet)
           
static RenderResponseImpl getRenderResponseImpl(javax.portlet.RenderResponse res)
           
static com.liferay.portal.model.User getSelectedUser(javax.portlet.ActionRequest req)
           
static com.liferay.portal.model.User getSelectedUser(javax.portlet.ActionRequest req, boolean checkPermission)
           
static com.liferay.portal.model.User getSelectedUser(javax.servlet.http.HttpServletRequest req)
           
static com.liferay.portal.model.User getSelectedUser(javax.servlet.http.HttpServletRequest req, boolean checkPermission)
           
static com.liferay.portal.model.User getSelectedUser(javax.portlet.RenderRequest req)
           
static com.liferay.portal.model.User getSelectedUser(javax.portlet.RenderRequest req, boolean checkPermission)
           
static java.lang.String[] getSystemCommunityRoles()
           
static java.lang.String[] getSystemGroups()
           
static java.lang.String[] getSystemRoles()
           
static com.liferay.util.servlet.UploadPortletRequest getUploadPortletRequest(javax.portlet.ActionRequest req)
           
static com.liferay.util.servlet.UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpReq)
           
static java.util.Date getUptime()
           
static com.liferay.portal.model.User getUser(javax.portlet.ActionRequest req)
           
static com.liferay.portal.model.User getUser(javax.servlet.http.HttpServletRequest req)
           
static com.liferay.portal.model.User getUser(javax.portlet.RenderRequest req)
           
static long getUserId(javax.portlet.ActionRequest req)
           
static long getUserId(javax.servlet.http.HttpServletRequest req)
           
static long getUserId(javax.portlet.RenderRequest req)
           
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 req)
           
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 req)
           
static java.lang.String getUserPassword(javax.portlet.ActionRequest req)
           
static java.lang.String getUserPassword(javax.servlet.http.HttpServletRequest req)
           
static java.lang.String getUserPassword(javax.servlet.http.HttpSession ses)
           
static java.lang.String getUserPassword(javax.portlet.RenderRequest req)
           
static boolean isLayoutFriendliable(com.liferay.portal.model.Layout layout)
           
static boolean isLayoutParentable(com.liferay.portal.model.Layout layout)
           
static boolean isLayoutParentable(java.lang.String type)
           
static boolean isLayoutSitemapable(com.liferay.portal.model.Layout layout)
           
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 org.dom4j.Document readDocumentFromFile(java.io.File file)
           
static org.dom4j.Document readDocumentFromFile(java.io.File file, boolean validate)
           
static org.dom4j.Document readDocumentFromStream(java.io.InputStream is)
           
static org.dom4j.Document readDocumentFromStream(java.io.InputStream is, boolean validate)
           
static org.dom4j.Document readDocumentFromURL(java.lang.String url)
           
static org.dom4j.Document readDocumentFromURL(java.lang.String url, boolean validate)
           
static org.dom4j.Document readDocumentFromXML(java.lang.String xml)
           
static org.dom4j.Document readDocumentFromXML(java.lang.String xml, boolean validate)
           
static void renderPage(com.liferay.portal.kernel.util.StringMaker sm, javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String path)
           
static void renderPortlet(com.liferay.portal.kernel.util.StringMaker sm, javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, com.liferay.portal.model.Portlet portlet, java.lang.String queryString)
           
static void renderPortlet(com.liferay.portal.kernel.util.StringMaker sm, javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, com.liferay.portal.model.Portlet portlet, java.lang.String queryString, java.lang.String columnId, java.lang.Integer columnPos, java.lang.Integer columnCount)
           
static void renderPortlet(com.liferay.portal.kernel.util.StringMaker sm, javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, com.liferay.portal.model.Portlet portlet, java.lang.String queryString, java.lang.String columnId, java.lang.Integer columnPos, java.lang.Integer columnCount, java.lang.String path)
           
static void setPageSubtitle(java.lang.String subtitle, javax.servlet.http.HttpServletRequest req)
          Sets the subtitle for a page.
static void setPageTitle(java.lang.String title, javax.servlet.http.HttpServletRequest req)
          Sets the whole title for a page.
static void storePreferences(javax.portlet.PortletPreferences prefs)
           
static javax.portlet.PortletMode updatePortletMode(java.lang.String portletId, com.liferay.portal.model.User user, com.liferay.portal.model.Layout layout, javax.portlet.PortletMode portletMode, javax.servlet.http.HttpServletRequest req)
           
static javax.portlet.WindowState updateWindowState(java.lang.String portletId, com.liferay.portal.model.User user, com.liferay.portal.model.Layout layout, javax.portlet.WindowState windowState, javax.servlet.http.HttpServletRequest req)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_P_L_RESET

public static final boolean DEFAULT_P_L_RESET

PATH_IMAGE

public static final java.lang.String PATH_IMAGE
See Also:
Constant Field Values

PATH_MAIN

public static final java.lang.String PATH_MAIN
See Also:
Constant Field Values

PATH_PORTAL_LAYOUT

public static final java.lang.String PATH_PORTAL_LAYOUT
See Also:
Constant Field Values

PORTLET_XML_FILE_NAME_STANDARD

public static final java.lang.String PORTLET_XML_FILE_NAME_STANDARD
See Also:
Constant Field Values

PORTLET_XML_FILE_NAME_CUSTOM

public static final java.lang.String PORTLET_XML_FILE_NAME_CUSTOM
See Also:
Constant Field Values

UP_TIME

public static final java.util.Date UP_TIME
Method Detail

clearRequestParameters

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

copyRequestParameters

public static void copyRequestParameters(javax.portlet.ActionRequest req,
                                         javax.portlet.ActionResponse res)

createSecureProxyURL

public static java.lang.String createSecureProxyURL(java.lang.String url,
                                                    java.security.Key key,
                                                    boolean secure)

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)

getCompany

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

getCompany

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

getCompany

public static com.liferay.portal.model.Company getCompany(javax.portlet.RenderRequest req)
                                                   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 req)

getCompanyId

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

getCompanyId

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

getCompanyId

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

getCompanyIdByWebId

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

getCompanyIdByWebId

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

getCurrentURL

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

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 req)

getHost

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

getHost

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

getHttpServletRequest

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

getHttpServletResponse

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

getLayoutEditPage

public static java.lang.String getLayoutEditPage(com.liferay.portal.model.Layout layout)

getLayoutViewPage

public static java.lang.String getLayoutViewPage(com.liferay.portal.model.Layout layout)

getLayoutURL

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

getLayoutURL

public static java.lang.String getLayoutURL(com.liferay.portal.model.Layout layout,
                                            com.liferay.portal.theme.ThemeDisplay themeDisplay)
                                     throws com.liferay.portal.PortalException,
                                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getLayoutURL

public static java.lang.String getLayoutURL(com.liferay.portal.model.Layout layout,
                                            com.liferay.portal.theme.ThemeDisplay themeDisplay,
                                            boolean doAsUser)
                                     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(com.liferay.portal.model.Layout layout)
                                           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(com.liferay.portal.model.Layout layout,
                                                  java.lang.String mainPath)
                                           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)
                                           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 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(com.liferay.portal.model.Layout layout,
                                                    com.liferay.portal.theme.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(com.liferay.portal.model.Layout layout)

getJsSafePortletId

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

getJsSafePortletName

public static java.lang.String getJsSafePortletName(java.lang.String portletName)
Deprecated. Use getJsSafePortletId.


getLocale

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

getLocale

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

getOriginalServletRequest

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

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

getPortalLibDir

public static java.lang.String getPortalLibDir()

getPortalURL

public static java.lang.String getPortalURL(com.liferay.portal.theme.ThemeDisplay themeDisplay)

getPortalURL

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

getPortalURL

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

getPortalURL

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

getPortalURL

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

getPortalURL

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

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 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(com.liferay.portal.model.Layout layout)

getPortletGroupId

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

getPortletGroupId

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

getPortletGroupId

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

getPortletNamespace

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

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

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,
                                               com.liferay.portal.model.User user)

getPortletTitle

public static java.lang.String getPortletTitle(com.liferay.portal.model.Portlet portlet,
                                               javax.servlet.ServletContext ctx,
                                               java.util.Locale locale)

getPreferences

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

getPreferencesValidator

public static javax.portlet.PreferencesValidator getPreferencesValidator(com.liferay.portal.model.Portlet portlet)

getRenderResponseImpl

public static RenderResponseImpl getRenderResponseImpl(javax.portlet.RenderResponse res)

getSelectedUser

public static com.liferay.portal.model.User getSelectedUser(javax.servlet.http.HttpServletRequest req)
                                                     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 com.liferay.portal.model.User getSelectedUser(javax.servlet.http.HttpServletRequest req,
                                                            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 com.liferay.portal.model.User getSelectedUser(javax.portlet.ActionRequest req)
                                                     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 com.liferay.portal.model.User getSelectedUser(javax.portlet.ActionRequest req,
                                                            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 com.liferay.portal.model.User getSelectedUser(javax.portlet.RenderRequest req)
                                                     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 com.liferay.portal.model.User getSelectedUser(javax.portlet.RenderRequest req,
                                                            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

getSystemCommunityRoles

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

getSystemGroups

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

getSystemRoles

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

getUploadPortletRequest

public static com.liferay.util.servlet.UploadPortletRequest getUploadPortletRequest(javax.portlet.ActionRequest req)

getUploadServletRequest

public static com.liferay.util.servlet.UploadServletRequest getUploadServletRequest(javax.servlet.http.HttpServletRequest httpReq)

getUptime

public static java.util.Date getUptime()

getUser

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

getUser

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

getUser

public static com.liferay.portal.model.User getUser(javax.portlet.RenderRequest req)
                                             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 req)

getUserId

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

getUserId

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

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 req)

getUserName

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

getUserPassword

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

getUserPassword

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

getUserPassword

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

getUserPassword

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

isLayoutFriendliable

public static boolean isLayoutFriendliable(com.liferay.portal.model.Layout layout)

isLayoutParentable

public static boolean isLayoutParentable(com.liferay.portal.model.Layout layout)

isLayoutParentable

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

isLayoutSitemapable

public static boolean isLayoutSitemapable(com.liferay.portal.model.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

readDocumentFromFile

public static org.dom4j.Document readDocumentFromFile(java.io.File file)
                                               throws org.dom4j.DocumentException
Throws:
org.dom4j.DocumentException

readDocumentFromFile

public static org.dom4j.Document readDocumentFromFile(java.io.File file,
                                                      boolean validate)
                                               throws org.dom4j.DocumentException
Throws:
org.dom4j.DocumentException

readDocumentFromStream

public static org.dom4j.Document readDocumentFromStream(java.io.InputStream is)
                                                 throws org.dom4j.DocumentException
Throws:
org.dom4j.DocumentException

readDocumentFromStream

public static org.dom4j.Document readDocumentFromStream(java.io.InputStream is,
                                                        boolean validate)
                                                 throws org.dom4j.DocumentException
Throws:
org.dom4j.DocumentException

readDocumentFromURL

public static org.dom4j.Document readDocumentFromURL(java.lang.String url)
                                              throws org.dom4j.DocumentException,
                                                     java.io.IOException
Throws:
org.dom4j.DocumentException
java.io.IOException

readDocumentFromURL

public static org.dom4j.Document readDocumentFromURL(java.lang.String url,
                                                     boolean validate)
                                              throws org.dom4j.DocumentException,
                                                     java.io.IOException
Throws:
org.dom4j.DocumentException
java.io.IOException

readDocumentFromXML

public static org.dom4j.Document readDocumentFromXML(java.lang.String xml)
                                              throws org.dom4j.DocumentException
Throws:
org.dom4j.DocumentException

readDocumentFromXML

public static org.dom4j.Document readDocumentFromXML(java.lang.String xml,
                                                     boolean validate)
                                              throws org.dom4j.DocumentException
Throws:
org.dom4j.DocumentException

renderPage

public static void renderPage(com.liferay.portal.kernel.util.StringMaker sm,
                              javax.servlet.ServletContext ctx,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res,
                              java.lang.String path)
                       throws java.io.IOException,
                              javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

renderPortlet

public static void renderPortlet(com.liferay.portal.kernel.util.StringMaker sm,
                                 javax.servlet.ServletContext ctx,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res,
                                 com.liferay.portal.model.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(com.liferay.portal.kernel.util.StringMaker sm,
                                 javax.servlet.ServletContext ctx,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res,
                                 com.liferay.portal.model.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(com.liferay.portal.kernel.util.StringMaker sm,
                                 javax.servlet.ServletContext ctx,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res,
                                 com.liferay.portal.model.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

setPageSubtitle

public static void setPageSubtitle(java.lang.String subtitle,
                                   javax.servlet.http.HttpServletRequest req)
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 req)
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

storePreferences

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

updatePortletMode

public static javax.portlet.PortletMode updatePortletMode(java.lang.String portletId,
                                                          com.liferay.portal.model.User user,
                                                          com.liferay.portal.model.Layout layout,
                                                          javax.portlet.PortletMode portletMode,
                                                          javax.servlet.http.HttpServletRequest req)
                                                   throws com.liferay.portal.PortalException,
                                                          java.rmi.RemoteException,
                                                          com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException

updateWindowState

public static javax.portlet.WindowState updateWindowState(java.lang.String portletId,
                                                          com.liferay.portal.model.User user,
                                                          com.liferay.portal.model.Layout layout,
                                                          javax.portlet.WindowState windowState,
                                                          javax.servlet.http.HttpServletRequest req)
                                                   throws com.liferay.portal.PortalException,
                                                          java.rmi.RemoteException,
                                                          com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
java.rmi.RemoteException
com.liferay.portal.SystemException