lumis.util
Class PortalUtil

Package class diagram package PortalUtil
java.lang.Object
  extended by lumis.util.PortalUtil

@StableMinor(version="6.2",
             sinceVersion="4.0")
public abstract class PortalUtil
extends Object

Utility methods for portal related functionalities.

Since:
4.0.0

Constructor Summary
PortalUtil()
           
 
Method Summary
static String generateClientScript(String script)
           
static String generateNewGuid()
           
static String getCookie(String name, HttpServletRequest request)
          Given a cookie name, the cookie value if exists in the request object is returned.
static String getExceptionDetailsHtml(Throwable e, HttpServletRequest request)
           
static String getWebsite(HttpServletRequest request)
          Deprecated. Since 6.2.0 use IWebsiteManager.getWebsiteBaseURL(HttpServletRequest) to get the IWebsiteBaseURL that represents the website url for the given request.
static String getWebsiteUri(HttpServletRequest request)
          Deprecated. Since 6.2.0 use IWebsiteManager.getWebsiteBaseURL(HttpServletRequest) to get the IWebsiteBaseURL for the given request. After that use IWebsiteBaseURL.getPath() to get the website URI.
 
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

generateNewGuid

public static String generateNewGuid()

generateClientScript

public static String generateClientScript(String script)

getCookie

public static String getCookie(String name,
                               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 String getExceptionDetailsHtml(Throwable e,
                                             HttpServletRequest request)
                                      throws Exception
Throws:
Exception

getWebsite

@Deprecated
public static String getWebsite(HttpServletRequest request)
Deprecated. Since 6.2.0 use IWebsiteManager.getWebsiteBaseURL(HttpServletRequest) to get the IWebsiteBaseURL 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 String getWebsiteUri(HttpServletRequest request)
Deprecated. Since 6.2.0 use IWebsiteManager.getWebsiteBaseURL(HttpServletRequest) to get the IWebsiteBaseURL for the given request. After that use IWebsiteBaseURL.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.


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.