com.cassinidivision.oce.rendering
Class URLParser

java.lang.Object
  extended bycom.cassinidivision.oce.rendering.URLParser

public class URLParser
extends Object

Class for parsing URLs and extracting OCE rendering information.


Constructor Summary
URLParser()
           
 
Method Summary
static String determineDomainNameFromRequest(WORequest aRequest)
          Retrieve the web host (domain name) details from the request.
static String getNavigationSystem(WORequest aRequest)
          Return the current navigation system in operation.
static NSArray handlerURIComponentsForRequest(WORequest aRequest, N_WebSite aSite, N_Section aSection)
          Retrieve the handler URI components from the request.
static String handlerURLFrom404URL(String a404URL)
          Retrieve the handler portion of the URL, given the full URL.
static String handlerURLFromRequest(WORequest aRequest)
          Retrieve the handler portion of the URL from the request.
static URLHandler handlerWithName(String handlerName)
          Build an instance of the named URL handler class.
static N_Section sectionForRequest(WORequest aRequest, EOEditingContext editingContext, N_WebSite aSite)
          Retrieve the current OCE section relating to the request received.
static String sectionURLFrom404URL(String a404URL)
          Retrieve the "section" portion of the URL from the full URL provided (the portion of URL before the URL handler information).
static String sectionURLFromRequest(WORequest aRequest)
          Retrieve the "section" portion of the URL from the request (the portion of URL before the URL handler information).
static URLHandler urlHandlerForURIComponents(NSArray handlerURIComponents)
          Retrieve the correct URL handler for processing the URI components provided.
static N_WebSite webSiteForRequest(WORequest aRequest, EOEditingContext ec)
          Retrieve the OCE web site instance corresponding to the request details.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLParser

public URLParser()
Method Detail

handlerWithName

public static URLHandler handlerWithName(String handlerName)
Build an instance of the named URL handler class.

Parameters:
handlerName - The name of the URL handler class.
Returns:
A URL handler instance, or null if the handler could not be created.

getNavigationSystem

public static String getNavigationSystem(WORequest aRequest)
Return the current navigation system in operation.

Parameters:
aRequest - The current request.
Returns:
String identifying the current navigation system.

determineDomainNameFromRequest

public static String determineDomainNameFromRequest(WORequest aRequest)
Retrieve the web host (domain name) details from the request.

Parameters:
aRequest - The request in question.
Returns:
String identifying the domain (DNS name or IP address).

sectionForRequest

public static N_Section sectionForRequest(WORequest aRequest,
                                          EOEditingContext editingContext,
                                          N_WebSite aSite)
Retrieve the current OCE section relating to the request received.

Parameters:
aRequest - The current request.
editingContext - The editing context to register the section instance within.
aSite - The current web site instance.
Returns:
The section instance.

sectionURLFromRequest

public static String sectionURLFromRequest(WORequest aRequest)
Retrieve the "section" portion of the URL from the request (the portion of URL before the URL handler information).

Parameters:
aRequest - The request in question.
Returns:
String containing the section portion of the URL.

sectionURLFrom404URL

public static String sectionURLFrom404URL(String a404URL)
Retrieve the "section" portion of the URL from the full URL provided (the portion of URL before the URL handler information).

Parameters:
a404URL - The full URL in question.
Returns:
String containing the section portion of the URL.

handlerURLFromRequest

public static String handlerURLFromRequest(WORequest aRequest)
Retrieve the handler portion of the URL from the request.

Parameters:
aRequest - The request in question.
Returns:
String containing the handler portion of the URL.

handlerURLFrom404URL

public static String handlerURLFrom404URL(String a404URL)
Retrieve the handler portion of the URL, given the full URL.

Parameters:
a404URL - The full URL in question.
Returns:
String containing the handler portion of the URL.

handlerURIComponentsForRequest

public static NSArray handlerURIComponentsForRequest(WORequest aRequest,
                                                     N_WebSite aSite,
                                                     N_Section aSection)
Retrieve the handler URI components from the request.

Parameters:
aRequest - The request in question.
aSite - The web site in question.
aSection - The section in question.
Returns:
Array of strings, each string containing a portion of the handler URI.

urlHandlerForURIComponents

public static URLHandler urlHandlerForURIComponents(NSArray handlerURIComponents)
Retrieve the correct URL handler for processing the URI components provided.

Parameters:
handlerURIComponents - Array of strings, each string indicating a portion of a URL.
Returns:
The newly-instantiated URL handler instance.

webSiteForRequest

public static N_WebSite webSiteForRequest(WORequest aRequest,
                                          EOEditingContext ec)
Retrieve the OCE web site instance corresponding to the request details.

Parameters:
aRequest - The request in question.
ec - The editing context the web site instance will be registered with.
Returns:
The web site instance.