lumis.portal.website
Class WebsiteUtil

Package class diagram package WebsiteUtil
java.lang.Object
  extended by lumis.portal.website.WebsiteUtil

public class WebsiteUtil
extends Object

Website utility class.

Since:
6.2.0

Constructor Summary
WebsiteUtil()
           
 
Method Summary
static String getId(IWebsiteBaseURL url)
          Returns the identifier of the given website base URL.
static IWebsiteBaseURL getWebsiteBaseURLById(String id)
          Returns the website base URL based on its identification.
static IWebsiteBaseURL resolveWebsiteBaseURLByString(String websiteStr)
          Resolves the given website string in a website base URL.
The given string will be parsed as new URI(String), so that it must adhere with URI syntax.
static IWebsite resolveWebsiteByString(String websiteStr)
          Resolves the given website string in a website.
The given string will be parsed as new URI(String), so that it must adhere with URI syntax.
static void updateWebsiteBaseURL(IWebsiteBaseURL baseURL, String domain, int port, String path)
          Updates the given base URL with the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebsiteUtil

public WebsiteUtil()
Method Detail

resolveWebsiteByString

public static IWebsite resolveWebsiteByString(String websiteStr)
                                       throws PortalException
Resolves the given website string in a website.
The given string will be parsed as new URI(String), so that it must adhere with URI syntax.

Parameters:
websiteStr - the website string to be parsed.
Returns:
the resolved website.
Throws:
IllegalArgumentException - if the given string is a malformed URL.
IllegalArgumentException - if the protocol isn't neither HTTP nor HTTPS.
PortalException
Since:
6.2.0
See Also:
resolveWebsiteBaseURLByString(String)

resolveWebsiteBaseURLByString

public static IWebsiteBaseURL resolveWebsiteBaseURLByString(String websiteStr)
                                                     throws PortalException
Resolves the given website string in a website base URL.
The given string will be parsed as new URI(String), so that it must adhere with URI syntax.

Parameters:
websiteStr - the website string to be parsed.
Returns:
the resolved website base URL.
Throws:
IllegalArgumentException - if the given string is a malformed URL.
IllegalArgumentException - if the protocol isn't neither HTTP nor HTTPS.
PortalException
Since:
6.2.0

getId

public static String getId(IWebsiteBaseURL url)
Returns the identifier of the given website base URL.

Parameters:
url - the website base URL.
Returns:
the identifier of the given website base URL.
Throws:
IllegalArgumentException - if the given object is null.
IllegalArgumentException - if the given object's class is unknown.
Since:
6.2.0

getWebsiteBaseURLById

public static IWebsiteBaseURL getWebsiteBaseURLById(String id)
Returns the website base URL based on its identification.

Parameters:
id - the website base URL identification.
Returns:
the website base URL based on its identification.
Since:
6.2.0

updateWebsiteBaseURL

public static void updateWebsiteBaseURL(IWebsiteBaseURL baseURL,
                                        String domain,
                                        int port,
                                        String path)
Updates the given base URL with the given parameters.

Parameters:
baseURL - the base URL.
domain - the domain.
port - the port.
path - the path.
Since:
6.2.0


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