Package lumis.util
Class PortalUtil
- java.lang.Object
-
- lumis.util.PortalUtil
-
@StableMinor(version="17.0", sinceVersion="4.0") public abstract class PortalUtil extends java.lang.Object
Utility methods for portal related functionalities.- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description PortalUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
generateClientScript(java.lang.String script)
static java.lang.String
generateNewGuid()
static java.lang.String
getCookie(java.lang.String name, javax.servlet.http.HttpServletRequest request)
Given a cookie name, the cookie value if exists in the request object is returned.static java.lang.String
getExceptionDetailsHtml(java.lang.Throwable e, javax.servlet.http.HttpServletRequest request)
static java.lang.String
getWebsite(javax.servlet.http.HttpServletRequest request)
Deprecated.Since 6.2.0 useIWebsiteManager.getWebsiteBaseURL(HttpServletRequest)
to get theIWebsiteBaseURL
that represents the website url for the given request.static java.lang.String
getWebsiteUri(javax.servlet.http.HttpServletRequest request)
Deprecated.Since 6.2.0 useIWebsiteManager.getWebsiteBaseURL(HttpServletRequest)
to get theIWebsiteBaseURL
for the given request.
-
-
-
Method Detail
-
generateNewGuid
public static java.lang.String generateNewGuid()
-
generateClientScript
public static java.lang.String generateClientScript(java.lang.String script)
-
getCookie
public static java.lang.String getCookie(java.lang.String name, javax.servlet.http.HttpServletRequest request) throws ControllerException, PortalException
Given a cookie name, the cookie value if exists in the request object is returned. If the cookie is not found, a null value is returned- Parameters:
name
-- Returns:
- cookie value
- Throws:
ControllerException
PortalException
-
getExceptionDetailsHtml
public static java.lang.String getExceptionDetailsHtml(java.lang.Throwable e, javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getWebsite
@Deprecated public static java.lang.String getWebsite(javax.servlet.http.HttpServletRequest request)
Deprecated.Since 6.2.0 useIWebsiteManager.getWebsiteBaseURL(HttpServletRequest)
to get theIWebsiteBaseURL
that represents the website url for the given request.Returns the website for the given request.The website string is in the format '<hostname>:<port>/<uri>'. If the uri is empty, the slash will not be present.
- Parameters:
request
- the request.- Returns:
- the website string, or null if request is null.
-
getWebsiteUri
@Deprecated public static java.lang.String getWebsiteUri(javax.servlet.http.HttpServletRequest request)
Deprecated.Since 6.2.0 useIWebsiteManager.getWebsiteBaseURL(HttpServletRequest)
to get theIWebsiteBaseURL
for the given request. After that useIWebsiteBaseURL.getPath()
to get the website URI.Returns the website uri for the given request.If the uri refers to the root directory, an empty string is returned.
- Parameters:
request
- the request.- Returns:
- the website uri string, or null if request is null.
-
-