Package de.uplanet.lucy.server.composer
Class UrlBuilder
java.lang.Object
de.uplanet.lucy.server.composer.UrlBuilder
- 
Method SummaryModifier and TypeMethodDescriptionstatic URLDeprecated.static URLDeprecated.UsecreateAbsoluteBaseUrl(IServerBridgeRequest)instead.static URLstatic URLcreateAbsoluteBaseUrl(IServerBridgeRequest p_request) Create an absolute base URL from the given request.static URLReconstructs the URL the client used to make the request.static URLReconstructs the URL the client used to make the request.static URLCreate a base URL, i.e.static URLcreateBaseUrl(IServerBridgeRequest p_request) Create a base URL, i.e.static URLDeprecated.UsecreateBaseUrl(IRequestProcessingContext)instead.static URLcreateDefaultUrl(IServerBridgeRequest p_request) Deprecated.UsecreateBaseUrl(IServerBridgeRequest)instead.static URLDeprecated.static URLDeprecated.static URLstatic URLcreateWebSocketBaseUrl(IServerBridgeRequest p_request) Create a WebSocket URL from the given request.static URLCreate an URL from the given string.
- 
Method Details- 
createBaseUrlCreate a base URL, i.e. a relative URL containing solely the root path/.- Parameters:
- p_request- The request.
- Returns:
- The /base URL.
 
- 
createBaseUrlCreate a base URL, i.e. a relative URL containing solely the root path/.- Parameters:
- p_ctx- The processing context.
- Returns:
- The /base URL.
- See Also:
 
- 
createAbsoluteBaseUrlpublic static URL createAbsoluteBaseUrl(IRequestProcessingContext p_ctx) throws MalformedURLException - Parameters:
- p_ctx- The processing context.
- Throws:
- MalformedURLException
- See Also:
 
- 
createAbsoluteBaseUrlpublic static URL createAbsoluteBaseUrl(IServerBridgeRequest p_request) throws MalformedURLException Create an absolute base URL from the given request.The returned absolute URL will always contain a terminating slash /.This method tries to create an absolute base URL as follows - First, if the
 doc("internal/cfg/portal.cfg")/portal/uris/uri[@name='web.url.base.default']configuration parameter exists, return it. This is the preferred way. The following is a fallback in case the portal's default URL is not configured.
- Second, try to create an absolute URL from
 SERVERVAR.SCHEME,SERVERVAR.SERVER_NAME,SERVERVAR.SERVER_PORT, and return it.
 - Parameters:
- p_request- The request.
- Returns:
- The base URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
 
- First, if the
 
- 
createWebSocketBaseUrlpublic static URL createWebSocketBaseUrl(IRequestProcessingContext p_ctx) throws MalformedURLException - Parameters:
- p_ctx- The processing context.
- Throws:
- MalformedURLException
- See Also:
 
- 
createWebSocketBaseUrlpublic static URL createWebSocketBaseUrl(IServerBridgeRequest p_request) throws MalformedURLException Create a WebSocket URL from the given request.This method uses the same algorithm as createAbsoluteBaseUrl(IServerBridgeRequest)except that the scheme iswsorwssinstead ofhttporhttps.- Parameters:
- p_request- The request.
- Returns:
- The WebSocket URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
- See Also:
 
- 
createAbsoluteRequestBaseDirectoryUrlpublic static URL createAbsoluteRequestBaseDirectoryUrl(IRequestProcessingContext p_ctx) throws MalformedURLException Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, (optional) port number, and server path without the document part.The document part is the rightmost path component that is not followed by a slash. - Parameters:
- p_ctx- The processing context.
- Returns:
- The request base directory URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
- See Also:
 
- 
createAbsoluteRequestBaseDirectoryUrlpublic static URL createAbsoluteRequestBaseDirectoryUrl(IServerBridgeRequest p_request) throws MalformedURLException Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, (optional) port number, and server path without the document part.The document part is the rightmost path component that is not followed by a slash. - Parameters:
- p_request- The request.
- Returns:
- The request base directory URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
 
- 
parseUrlCreate an URL from the given string.- Parameters:
- p_strUrl- The string to be parsed.
- Returns:
- The URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
 
- 
createDefaultUrlDeprecated.UsecreateBaseUrl(IServerBridgeRequest)instead.The same ascreateBaseUrl(IServerBridgeRequest).- Parameters:
- p_request- The request.
- Returns:
- The URL.
 
- 
createDefaultUrlDeprecated.UsecreateBaseUrl(IRequestProcessingContext)instead.The same ascreateBaseUrl(IRequestProcessingContext).- Parameters:
- p_ctx- The processing context.
- Returns:
- The URL.
 
- 
createAbsoluteBaseDirectoryUrl@Deprecated public static URL createAbsoluteBaseDirectoryUrl(IServerBridgeRequest p_request) throws MalformedURLException Deprecated.UsecreateAbsoluteBaseUrl(IServerBridgeRequest)instead.The same URL ascreateAbsoluteBaseUrl(IServerBridgeRequest).- Parameters:
- p_request- The request.
- Returns:
- The URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
 
- 
createAbsoluteBaseDirectoryUrl@Deprecated public static URL createAbsoluteBaseDirectoryUrl(IRequestProcessingContext p_ctx) throws MalformedURLException Deprecated.UsecreateAbsoluteBaseUrl(IRequestProcessingContext)instead.The same URL ascreateAbsoluteBaseUrl(IRequestProcessingContext).- Parameters:
- p_ctx- The processing context.
- Returns:
- The URL.
- Throws:
- MalformedURLException- If a parsing error occurred.
 
- 
createRequestBaseDirectoryUrl@Deprecated public static URL createRequestBaseDirectoryUrl(IServerBridgeRequest p_request) throws MalformedURLException Deprecated.- Parameters:
- p_request- The request.
- Returns:
- The URL.
- Throws:
- MalformedURLException
 
- 
createRequestBaseDirectoryUrl@Deprecated public static URL createRequestBaseDirectoryUrl(IRequestProcessingContext p_ctx) throws MalformedURLException Deprecated.- Parameters:
- p_ctx- The processing context.
- Returns:
- The URL.
- Throws:
- MalformedURLException
 
 
- 
createAbsoluteBaseUrl(IRequestProcessingContext)instead.