de.uplanet.lucy.server.composer
Class UrlBuilder

java.lang.Object
  extended by de.uplanet.lucy.server.composer.UrlBuilder

@VelocityCallable(value="singleton")
@Scriptable
public final class UrlBuilder
extends java.lang.Object

Version:
$Revision: 79284 $

Constructor Summary
UrlBuilder()
           
 
Method Summary
static URL createAbsoluteBaseUrl(de.uplanet.lucy.server.connector.IRequestProcessingContext p_ctx)
           
static URL createAbsoluteBaseUrl(IServerBridgeRequest p_request)
          Create an absolute base URL from the given request.
static URL createBaseUrl(de.uplanet.lucy.server.connector.IRequestProcessingContext p_ctx)
           
static URL createBaseUrl(IServerBridgeRequest p_request)
          Create a base URL from the given request.
static URL createDefaultUrl(de.uplanet.lucy.server.connector.IRequestProcessingContext p_ctx)
           
static URL createDefaultUrl(IServerBridgeRequest p_request)
          Creates a default URL from the given request.
static URL createPersistentBaseUrl(IServerBridgeRequest p_request)
           
static URL createPersistentDefaultUrl(IServerBridgeRequest p_request)
           
static URL parseUrl(java.lang.String p_strUrl)
          Create an URL from the given string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlBuilder

public UrlBuilder()
Method Detail

createDefaultUrl

public static URL createDefaultUrl(IServerBridgeRequest p_request)
                            throws java.net.MalformedURLException
Creates a default URL from the given request. The default URL is the base URL including the connector page or servlet, e.g.
 http://www.domain.tld/portalname/default.asp
 http://www.domain.tld/portalname/default.ixsp
 

Parameters:
p_request - The request to get the base part from.
Returns:
The default URL.
Throws:
java.net.MalformedURLException

createDefaultUrl

public static URL createDefaultUrl(de.uplanet.lucy.server.connector.IRequestProcessingContext p_ctx)
                            throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException
See Also:
createDefaultUrl(IServerBridgeRequest)

createPersistentDefaultUrl

public static URL createPersistentDefaultUrl(IServerBridgeRequest p_request)
                                      throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

createBaseUrl

public static URL createBaseUrl(IServerBridgeRequest p_request)
                         throws java.net.MalformedURLException
Create a base URL from the given request.

The method uses the SERVERVAR.REQUEST_URI server variable to build the absolute or relative base URL.

Parameters:
p_request - The request.
Returns:
The base URL.
Throws:
java.net.MalformedURLException - - If a parsing error occurred.

createBaseUrl

public static URL createBaseUrl(de.uplanet.lucy.server.connector.IRequestProcessingContext p_ctx)
                         throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException
See Also:
createBaseUrl(IServerBridgeRequest)

createAbsoluteBaseUrl

public static URL createAbsoluteBaseUrl(IServerBridgeRequest p_request)
                                 throws java.net.MalformedURLException
Create an absolute base URL from the given request.

This method tries to create an absolute base URL as follows

Parameters:
p_request - The request.
Returns:
The base URL.
Throws:
java.net.MalformedURLException - - If a parsing error occurred.

createAbsoluteBaseUrl

public static URL createAbsoluteBaseUrl(de.uplanet.lucy.server.connector.IRequestProcessingContext p_ctx)
                                 throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException
See Also:
createAbsoluteBaseUrl(IServerBridgeRequest)

createPersistentBaseUrl

public static URL createPersistentBaseUrl(IServerBridgeRequest p_request)

parseUrl

public static URL parseUrl(java.lang.String p_strUrl)
                    throws java.net.MalformedURLException
Create an URL from the given string.

Parameters:
p_strUrl - The string to be parsed.
Returns:
The URL.
Throws:
java.net.MalformedURLException - - If a parsing error occurred.


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.