oracle.cabo.servlet.url
Class DefaultPageEncoder
java.lang.Object
|
+--oracle.cabo.share.url.ServletURLEncoder
|
+--oracle.cabo.servlet.url.BasePageEncoder
|
+--oracle.cabo.servlet.url.DefaultPageEncoder
- All Implemented Interfaces:
- PageDecoder, PageEncoder, URLEncoder
- Direct Known Subclasses:
- ExtensionPageEncoder, JspPageEncoder
- public class DefaultPageEncoder
- extends BasePageEncoder
PageEncoder interface that implements the standard UIX Servlet page encoding. The page and its properties are stored as the ServletRequest's PathInfo.
UIX Servlet URL Structure
URLs are of the form:
http://somedomain.com:port/servletPath/pageName
$pageprop1=value1$pageprop2=value2
?event=eventname&eventparam1=value1&eventparam2=value2
Where:
- somedomain.com:port is the domain (and port number, if not 80) of the location of the web server or servlet engine
- servletPath is the webserver path to the servlet (for example, the
UIXServlet
) running the servlet.
- pageName is the name of the page (which may contain any characters other than "$", including "/")
- pageprop1 and pageprop2 are the names of two page properties, each with separate values (note that they are represented as if they were directories). Properties and values are encoded with standard URL encoding; in addition, "$" is encoded as "$$", and "=" is encoded as "$=".
- The event name and all event parameters are stored as URL query parameters
Method Summary |
protected java.lang.String |
decodeFullPageName()
Identifies the full page name for the current request. |
Page |
decodePage(java.lang.String fullPageName)
Returns the Page object for an string-encoded page name. |
protected Page |
decodePage(java.lang.String name, java.lang.String encodedProperties, int startIndex, int endIndex)
Compiles a Page object out of a string name and a property (sub)string. |
Page |
decodeRequestedPage()
Returns the Page object for the current servlet request. |
java.lang.String |
encodePage(Page page)
Encodes a page into part of an URL |
protected java.lang.String |
encodePageProperties(Page page)
Encodes the properties of a page into part of an URL |
Methods inherited from class oracle.cabo.servlet.url.BasePageEncoder |
assembleQueryString, assembleURL, decodePageEvent, decodePageEvent, decodePageEventImpl, decodeParameterDictionary, decodeParameters, decodeRequestedPageEvent, encodeEventURL, encodePageAndEvent, encodePageAndEvent, encodePageURL, encodeResponsePage, getBaseURL, getContext, getDefaultCharacterEncoding, getDefaultURL, getErrorLog, getRequestCharacterEncoding, getRequestCharacterEncoding, setRequestCharacterEncoding, setResponsePage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPageEncoder
public DefaultPageEncoder(BajaContext context,
java.lang.String baseURL)
- Creates a DefaultPageEncoder.
-
- Parameters:
context
- the current BajaContext
baseURL
- a base URL to use in place of the servlet request. Generally only used if BajaContext is null.
decodeRequestedPage
public Page decodeRequestedPage()
- Returns the Page object for the current servlet request.
-
- Overrides:
decodeRequestedPage
in class BasePageEncoder
decodePage
public Page decodePage(java.lang.String fullPageName)
- Returns the Page object for an string-encoded page name.
-
- Overrides:
decodePage
in class BasePageEncoder
-
- Parameters:
fullPageName
- the encoded page name
encodePage
public java.lang.String encodePage(Page page)
- Encodes a page into part of an URL
-
- Overrides:
encodePage
in class BasePageEncoder
-
- Parameters:
page
- the Page object to encode
encodePageProperties
protected java.lang.String encodePageProperties(Page page)
- Encodes the properties of a page into part of an URL
-
- Overrides:
encodePageProperties
in class BasePageEncoder
-
- Parameters:
page
- the Page object to encode
decodeFullPageName
protected java.lang.String decodeFullPageName()
- Identifies the full page name for the current request.
decodePage
protected Page decodePage(java.lang.String name,
java.lang.String encodedProperties,
int startIndex,
int endIndex)
- Compiles a Page object out of a string name and a property (sub)string.
-
- Parameters:
name
- the name of the page
encodedProperties
- the string containing the properties
startIndex
- the index of the first character in encodedProperties to be treated as part of the property string.
endIndex
- the index immediately after the last character in encodedProperties to be treated as part of the property string.