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, Eduardo Lundgren

Constructor Summary
PortalUtil()
           
 
Method Summary
static void addPageDescription(java.lang.String description, javax.servlet.http.HttpServletRequest request)
          Adds the description for a page.
static void addPageKeywords(java.lang.String keywords, javax.servlet.http.HttpServletRequest request)
          Adds the keywords for a page.
static void addPageSubtitle(java.lang.String subtitle, javax.servlet.http.HttpServletRequest request)
          Adds the subtitle for a page.
static void addPageTitle(java.lang.String title, javax.servlet.http.HttpServletRequest request)
          Adds the whole title for a page.
static void addPortletBreadcrumbEntry(javax.servlet.http.HttpServletRequest request, java.lang.String title, java.lang.String url)
           
static void addPortletDefaultResource(javax.servlet.http.HttpServletRequest request, Portlet portlet)
           
static void clearRequestParameters(javax.portlet.RenderRequest renderRequest)
           
static void copyRequestParameters(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
static java.lang.String escapeRedirect(java.lang.String url)
           
static java.lang.String generateRandomKey(javax.servlet.http.HttpServletRequest request, java.lang.String input)
           
static BaseModel<?> getBaseModel(Resource resource)
           
static BaseModel<?> getBaseModel(ResourcePermission resourcePermission)
           
static BaseModel<?> getBaseModel(java.lang.String modelName, java.lang.String primKey)
           
static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request)
           
static long getBasicAuthUserId(javax.servlet.http.HttpServletRequest request, long companyId)
           
static java.lang.String getCDNHost()
          Deprecated. getCDNHost(boolean)
static java.lang.String getCDNHost(boolean secure)
           
static java.lang.String getCDNHostHttp()
           
static java.lang.String getCDNHostHttps()
           
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 java.lang.String[] getCommunityPermissions(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String[] getCommunityPermissions(javax.portlet.PortletRequest portletRequest)
           
static Company getCompany(javax.servlet.http.HttpServletRequest request)
           
static Company getCompany(javax.portlet.PortletRequest portletRequest)
           
static long getCompanyId(javax.servlet.http.HttpServletRequest request)
           
static long getCompanyId(javax.portlet.PortletRequest portletRequest)
           
static long[] getCompanyIds()
           
static java.lang.String getComputerAddress()
           
static java.lang.String getComputerName()
           
static java.lang.String getControlPanelCategory(java.lang.String portletId, ThemeDisplay themeDisplay)
           
static java.lang.String getControlPanelFullURL(long scopeGroupId, java.lang.String ppid, java.util.Map<java.lang.String,java.lang.String[]> params)
           
static java.util.List<Portlet> getControlPanelPortlets(java.lang.String category, ThemeDisplay themeDisplay)
           
static java.lang.String getCurrentCompleteURL(javax.servlet.http.HttpServletRequest request)
           
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)
           
static java.util.Date getDate(int month, int day, int year, int hour, int min, PortalException pe)
           
static java.util.Date getDate(int month, int day, int year, int hour, int min, java.util.TimeZone timeZone, PortalException pe)
           
static java.util.Date getDate(int month, int day, int year, PortalException pe)
           
static java.util.Date getDate(int month, int day, int year, java.util.TimeZone timeZone, PortalException pe)
           
static DB getDB()
          Deprecated. DBFactoryUtil.getDB()
static long getDefaultCompanyId()
           
static java.util.Map<java.lang.String,java.io.Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge, javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getFirstPageLayoutTypes(javax.servlet.jsp.PageContext pageContext)
           
static java.lang.String getGlobalLibDir()
           
static java.lang.String getGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static java.lang.String[] getGuestPermissions(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String[] getGuestPermissions(javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getHomeURL(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getHost(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getHost(javax.portlet.PortletRequest portletRequest)
           
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, java.util.Map<java.lang.String,java.lang.Object> requestContext)
           
static java.lang.String getLayoutEditPage(Layout layout)
           
static java.lang.String getLayoutEditPage(java.lang.String type)
           
static java.lang.String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay, java.util.Locale locale)
           
static java.lang.String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay)
           
static java.lang.String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
           
static java.lang.String getLayoutFullURL(long groupId, java.lang.String portletId)
           
static java.lang.String getLayoutFullURL(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.lang.String getLayoutViewPage(java.lang.String type)
           
static LiferayPortletResponse getLiferayPortletResponse(javax.portlet.PortletResponse portletResponse)
           
static java.util.Locale getLocale(javax.servlet.http.HttpServletRequest request)
           
static java.util.Locale getLocale(javax.portlet.RenderRequest renderRequest)
           
static BaseModel<?> getModel(Resource resource)
          Deprecated. getBaseModel(Resource)
static BaseModel<?> getModel(ResourcePermission resourcePermission)
          Deprecated. getBaseModel(ResourcePermission)
static BaseModel<?> getModel(java.lang.String modelName, java.lang.String primKey)
          Deprecated. getBaseModel(String, String)
static java.lang.String getNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static javax.servlet.http.HttpServletRequest getOriginalServletRequest(javax.servlet.http.HttpServletRequest request)
           
static long getParentGroupId(long scopeGroupId)
           
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 long getPlidFromPortletId(long groupId, 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.String getPortalWebDir()
           
static java.util.List<KeyValuePair> getPortletBreadcrumbList(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getPortletDescription(Portlet portlet, javax.servlet.ServletContext servletContext, java.util.Locale locale)
           
static java.lang.String getPortletDescription(Portlet portlet, User user)
           
static java.lang.String getPortletDescription(java.lang.String portletId, java.util.Locale locale)
           
static java.lang.String getPortletDescription(java.lang.String portletId, java.lang.String languageId)
           
static java.lang.String getPortletDescription(java.lang.String portletId, User user)
           
static java.lang.String getPortletId(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getPortletId(javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getPortletNamespace(java.lang.String portletId)
           
static java.lang.String getPortletTitle(Portlet portlet, java.util.Locale locale)
           
static java.lang.String getPortletTitle(Portlet portlet, javax.servlet.ServletContext servletContext, java.util.Locale locale)
           
static java.lang.String getPortletTitle(Portlet portlet, java.lang.String languageId)
           
static java.lang.String getPortletTitle(Portlet portlet, User user)
           
static java.lang.String getPortletTitle(javax.portlet.RenderResponse renderResponse)
           
static java.lang.String getPortletTitle(java.lang.String portletId, java.util.Locale locale)
           
static java.lang.String getPortletTitle(java.lang.String portletId, 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 long getScopeGroupId(javax.servlet.http.HttpServletRequest request)
           
static long getScopeGroupId(javax.servlet.http.HttpServletRequest request, java.lang.String portletId)
           
static long getScopeGroupId(Layout layout)
           
static long getScopeGroupId(Layout layout, java.lang.String portletId)
           
static long getScopeGroupId(long plid)
           
static long getScopeGroupId(javax.portlet.PortletRequest portletRequest)
           
static User getSelectedUser(javax.servlet.http.HttpServletRequest request)
           
static User getSelectedUser(javax.servlet.http.HttpServletRequest request, boolean checkPermission)
           
static User getSelectedUser(javax.portlet.PortletRequest portletRequest)
           
static User getSelectedUser(javax.portlet.PortletRequest portletRequest, boolean checkPermission)
           
static javax.servlet.ServletContext getServletContext(Portlet portlet, javax.servlet.ServletContext servletContext)
           
static SocialEquityActionMapping getSocialEquityActionMapping(java.lang.String name, java.lang.String actionId)
           
static java.util.List<SocialEquityActionMapping> getSocialEquityActionMappings(java.lang.String name)
           
static java.lang.String[] getSocialEquityClassNames()
           
static java.lang.String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, java.lang.String uri)
           
static java.lang.String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, java.lang.String uri, long timestamp)
           
static java.lang.String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, java.lang.String uri, java.lang.String queryString)
           
static java.lang.String getStaticResourceURL(javax.servlet.http.HttpServletRequest request, java.lang.String uri, java.lang.String queryString, long timestamp)
           
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 UploadPortletRequest getUploadPortletRequest(javax.portlet.PortletRequest portletRequest)
           
static 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.servlet.http.HttpServletRequest request)
           
static User getUser(javax.portlet.PortletRequest portletRequest)
           
static long getUserId(javax.servlet.http.HttpServletRequest request)
           
static long getUserId(javax.portlet.PortletRequest portletRequest)
           
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.servlet.http.HttpServletRequest request)
           
static java.lang.String getUserPassword(javax.servlet.http.HttpSession session)
           
static java.lang.String getUserPassword(javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getUserValue(long userId, java.lang.String param, java.lang.String defaultValue)
           
static long getValidUserId(long companyId, long userId)
           
static java.lang.String getWidgetURL(Portlet portlet, ThemeDisplay themeDisplay)
           
static boolean isAllowAddPortletDefaultResource(javax.servlet.http.HttpServletRequest request, Portlet portlet)
           
static boolean isCommunityAdmin(User user, long groupId)
           
static boolean isCommunityOwner(User user, long groupId)
           
static boolean isCompanyAdmin(User user)
           
static boolean isLayoutFirstPageable(Layout layout)
           
static boolean isLayoutFirstPageable(java.lang.String type)
           
static boolean isLayoutFriendliable(Layout layout)
           
static boolean isLayoutFriendliable(java.lang.String type)
           
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 isOmniadmin(long userId)
           
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 java.lang.String renderPage(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path, boolean writeOutput)
           
static java.lang.String renderPortlet(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Portlet portlet, java.lang.String queryString, boolean writeOutput)
           
static java.lang.String renderPortlet(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, boolean writeOutput)
           
static java.lang.String renderPortlet(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, boolean writeOutput)
           
static void runSQL(java.lang.String sql)
          Deprecated. DB.runSQL(String)
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 setPageDescription(java.lang.String description, javax.servlet.http.HttpServletRequest request)
          Sets the description for a page.
static void setPageKeywords(java.lang.String keywords, javax.servlet.http.HttpServletRequest request)
          Sets the keywords for a page.
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 preferences)
           
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

addPageDescription

public static void addPageDescription(java.lang.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(java.lang.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(java.lang.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(java.lang.String title,
                                javax.servlet.http.HttpServletRequest request)
Adds the whole title for a page. This appends to the existing page whole title.


addPortletBreadcrumbEntry

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

addPortletDefaultResource

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

clearRequestParameters

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

copyRequestParameters

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

escapeRedirect

public static java.lang.String escapeRedirect(java.lang.String url)

generateRandomKey

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

getBaseModel

public static BaseModel<?> getBaseModel(Resource resource)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getBaseModel

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

getBaseModel

public static BaseModel<?> getBaseModel(java.lang.String modelName,
                                        java.lang.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

getCDNHost

public static java.lang.String getCDNHost()
Deprecated. getCDNHost(boolean)


getCDNHost

public static java.lang.String getCDNHost(boolean secure)

getCDNHostHttp

public static java.lang.String getCDNHostHttp()

getCDNHostHttps

public static java.lang.String getCDNHostHttps()

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

getCommunityPermissions

public static java.lang.String[] getCommunityPermissions(javax.servlet.http.HttpServletRequest request)

getCommunityPermissions

public static java.lang.String[] getCommunityPermissions(javax.portlet.PortletRequest portletRequest)

getCompany

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

getCompany

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

getCompanyId

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

getCompanyId

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

getCompanyIds

public static long[] getCompanyIds()

getComputerAddress

public static java.lang.String getComputerAddress()

getComputerName

public static java.lang.String getComputerName()

getControlPanelCategory

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

getControlPanelFullURL

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

getControlPanelPortlets

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

getCurrentCompleteURL

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

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)

getDate

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

getDate

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

getDate

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

getDate

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

getDB

public static DB getDB()
Deprecated. DBFactoryUtil.getDB()


getDefaultCompanyId

public static long getDefaultCompanyId()

getExpandoBridgeAttributes

public static java.util.Map<java.lang.String,java.io.Serializable> getExpandoBridgeAttributes(ExpandoBridge expandoBridge,
                                                                                              javax.portlet.PortletRequest portletRequest)
                                                                                       throws PortalException,
                                                                                              SystemException
Throws:
PortalException
SystemException

getFirstPageLayoutTypes

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

getGlobalLibDir

public static java.lang.String getGlobalLibDir()

getGoogleGadgetURL

public static java.lang.String getGoogleGadgetURL(Portlet portlet,
                                                  ThemeDisplay themeDisplay)
                                           throws PortalException,
                                                  SystemException
Throws:
PortalException
SystemException

getGuestPermissions

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

getGuestPermissions

public static java.lang.String[] getGuestPermissions(javax.portlet.PortletRequest portletRequest)

getHomeURL

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

getHost

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

getHost

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

getHttpServletRequest

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

getHttpServletResponse

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

getJsSafePortletId

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

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 PortalException,
                                                  SystemException
Throws:
PortalException
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,
                                                  java.util.Map<java.lang.String,java.lang.Object> requestContext)
                                           throws PortalException,
                                                  SystemException
Throws:
PortalException
SystemException

getLayoutEditPage

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

getLayoutEditPage

public static java.lang.String getLayoutEditPage(java.lang.String type)

getLayoutFriendlyURL

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

getLayoutFriendlyURL

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutFullURL

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

getLayoutSetFriendlyURL

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

getLayoutTarget

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

getLayoutURL

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

getLayoutURL

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

getLayoutURL

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

getLayoutViewPage

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

getLayoutViewPage

public static java.lang.String getLayoutViewPage(java.lang.String type)

getLiferayPortletResponse

public static LiferayPortletResponse getLiferayPortletResponse(javax.portlet.PortletResponse portletResponse)

getLocale

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

getLocale

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

getModel

public static BaseModel<?> getModel(Resource resource)
                             throws PortalException,
                                    SystemException
Deprecated. getBaseModel(Resource)

Throws:
PortalException
SystemException

getModel

public static BaseModel<?> getModel(ResourcePermission resourcePermission)
                             throws PortalException,
                                    SystemException
Deprecated. getBaseModel(ResourcePermission)

Throws:
PortalException
SystemException

getModel

public static BaseModel<?> getModel(java.lang.String modelName,
                                    java.lang.String primKey)
                             throws PortalException,
                                    SystemException
Deprecated. getBaseModel(String, String)

Throws:
PortalException
SystemException

getNetvibesURL

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

getOriginalServletRequest

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

getParentGroupId

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

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

getPlidFromPortletId

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

getPortal

public static Portal getPortal()

getPortalLibDir

public static java.lang.String getPortalLibDir()

getPortalPort

public static int getPortalPort()

getPortalProperties

public static java.util.Properties getPortalProperties()

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)

getPortalURL

public static java.lang.String getPortalURL(ThemeDisplay themeDisplay)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

getPortalWebDir

public static java.lang.String getPortalWebDir()

getPortletBreadcrumbList

public static java.util.List<KeyValuePair> getPortletBreadcrumbList(javax.servlet.http.HttpServletRequest request)

getPortletDescription

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

getPortletDescription

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

getPortletDescription

public static java.lang.String getPortletDescription(java.lang.String portletId,
                                                     java.util.Locale locale)

getPortletDescription

public static java.lang.String getPortletDescription(java.lang.String portletId,
                                                     java.lang.String languageId)

getPortletDescription

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

getPortletId

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

getPortletId

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

getPortletNamespace

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

getPortletTitle

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

getPortletTitle

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

getPortletTitle

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

getPortletTitle

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

getPortletTitle

public static java.lang.String getPortletTitle(javax.portlet.RenderResponse renderResponse)

getPortletTitle

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

getPortletTitle

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

getPortletTitle

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

getPortletXmlFileName

public static java.lang.String getPortletXmlFileName()
                                              throws SystemException
Throws:
SystemException

getPreferences

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

getPreferencesValidator

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

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,
                                   java.lang.String portletId)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getScopeGroupId

public static long getScopeGroupId(Layout layout)

getScopeGroupId

public static long getScopeGroupId(Layout layout,
                                   java.lang.String portletId)

getScopeGroupId

public static long getScopeGroupId(long plid)

getScopeGroupId

public static long getScopeGroupId(javax.portlet.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(javax.portlet.PortletRequest portletRequest)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getSelectedUser

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

getServletContext

public static javax.servlet.ServletContext getServletContext(Portlet portlet,
                                                             javax.servlet.ServletContext servletContext)

getSocialEquityActionMapping

public static SocialEquityActionMapping getSocialEquityActionMapping(java.lang.String name,
                                                                     java.lang.String actionId)

getSocialEquityActionMappings

public static java.util.List<SocialEquityActionMapping> getSocialEquityActionMappings(java.lang.String name)

getSocialEquityClassNames

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

getStaticResourceURL

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

getStaticResourceURL

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

getStaticResourceURL

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

getStaticResourceURL

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

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

getUploadServletRequest

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

getUploadPortletRequest

public static UploadPortletRequest getUploadPortletRequest(javax.portlet.PortletRequest portletRequest)

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

getUser

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

getUserId

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

getUserId

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

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,
                                           javax.servlet.http.HttpServletRequest request)

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,
                                           java.lang.String userAttribute,
                                           javax.servlet.http.HttpServletRequest request)

getUserPassword

public static java.lang.String getUserPassword(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.portlet.PortletRequest portletRequest)

getUserValue

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

getValidUserId

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

getWidgetURL

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

isAllowAddPortletDefaultResource

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

isCommunityAdmin

public static boolean isCommunityAdmin(User user,
                                       long groupId)
                                throws java.lang.Exception
Throws:
java.lang.Exception

isCommunityOwner

public static boolean isCommunityOwner(User user,
                                       long groupId)
                                throws java.lang.Exception
Throws:
java.lang.Exception

isCompanyAdmin

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

isLayoutFirstPageable

public static boolean isLayoutFirstPageable(Layout layout)

isLayoutFirstPageable

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

isLayoutFriendliable

public static boolean isLayoutFriendliable(Layout layout)

isLayoutFriendliable

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

isLayoutParentable

public static boolean isLayoutParentable(Layout layout)

isLayoutParentable

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

isLayoutSitemapable

public static boolean isLayoutSitemapable(Layout layout)

isMethodGet

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

isMethodPost

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

isOmniadmin

public static boolean isOmniadmin(long userId)

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

renderPage

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

renderPortlet

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

renderPortlet

public static java.lang.String renderPortlet(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,
                                             boolean writeOutput)
                                      throws java.io.IOException,
                                             javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

renderPortlet

public static java.lang.String renderPortlet(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,
                                             boolean writeOutput)
                                      throws java.io.IOException,
                                             javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

runSQL

public static void runSQL(java.lang.String sql)
                   throws java.io.IOException,
                          java.sql.SQLException
Deprecated. DB.runSQL(String)

Throws:
java.io.IOException
java.sql.SQLException

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(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.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.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.io.IOException,
                             javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

setPageDescription

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


setPageKeywords

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


setPageSubtitle

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


setPageTitle

public static void setPageTitle(java.lang.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(javax.portlet.PortletPreferences preferences)
                             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)