|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
oracle.portal.provider.v1.http.URLRenderer
URLRenderer is responsible for portletizing url contents specified through provider.xml. It opens an HTTPConnection to the url specified and reads the contents from it. The read contents are then written to the Portlet Renderer's output stream.
It uses sophisticated filters to massage the contents of url. There can be two types of filters depending on the requirement. HtmlFilter, a light weight filter can be used for basic filtering and XmlFilter for advanced operations.
| Field Summary | |
static java.lang.String |
CHAR_ENCODING
Constant key for getting character encoding from the HTTP Response. |
static java.lang.String |
DEFAULT_CHARACTER_ENCODING
The default character encoding for renderer output |
| Constructor Summary | |
URLRenderer()
|
|
| Method Summary | |
java.lang.String |
getCharSet()
Gets the Default IANA character encoding to be used for this renderer's pages. |
protected static URLPersonalizationObject |
getCustomizationData(oracle.portal.provider.v1.PortletRenderRequest pr)
Convenience method to retrieve user customization data. |
java.lang.Object |
getFilter()
Returns the Filter Class specified for a given rendering mode. |
java.lang.String |
getPageUrl()
Returns the URL specified in the corresponding set method. |
protected java.lang.String |
getPageUrl(oracle.portal.provider.v1.PortletRenderRequest pr,
int debugLevel)
Method first tries to read inline rendering url value from the request. |
java.net.URL |
getParsedPageUrl()
Returns URL object constructed out of string url, passed through provider.xml. |
protected java.io.InputStream |
getURLStream(oracle.portal.provider.v1.PortletRenderRequest pr,
java.net.URL contentURL)
Method which connects to the given content url and returns the corresponding input stream. |
java.lang.String |
getUseInvalidationCaching()
Returns flag which indicates renderer to use invalidation based caching or not. |
protected java.lang.String |
makeNVPair(java.lang.String name,
java.lang.String value,
java.lang.String encoding)
|
boolean |
prepareResponse(oracle.portal.provider.v1.PortletRenderRequest pr)
Overriding super class's prepareResponse method for implementing Invalidation Based Caching. |
void |
renderBody(oracle.portal.provider.v1.PortletRenderRequest pr)
Method responsible for rendering Portlet's are responsible for ensuring the request's user has sufficient rights to receive this rendering. |
void |
renderContents(oracle.portal.provider.v1.PortletRenderRequest pr,
java.lang.String urlContent,
int debugLevel,
int type)
renderContents is a private helper method, which renders the portlet with the specified url content. |
void |
setCharSet(java.lang.String encoding)
Sets the Default IANA character encoding to be used for this renderer's pages. |
void |
setFilter(java.lang.Object filter)
Sets the filter class for this rendering mode. |
void |
setFilterType(java.lang.String type)
Sets the type of filter.This variable is not used from now on. |
void |
setPageUrl(java.lang.String pageUrl)
Specifies the URL for fetching content for a given rendering mode. |
void |
setUseInvalidationCaching(java.lang.String useInCache)
Sets flag which indicates renderer to use invalidation based caching or not. |
| Field Detail |
public static final java.lang.String DEFAULT_CHARACTER_ENCODING
public static final java.lang.String CHAR_ENCODING
| Constructor Detail |
public URLRenderer()
| Method Detail |
public void renderBody(oracle.portal.provider.v1.PortletRenderRequest pr)
throws oracle.portal.provider.v1.PortletException,
oracle.portal.provider.v1.AccessControlException
Method responsible for rendering Portlet's are responsible for ensuring the request's user has sufficient rights to receive this rendering.
pr - ProviderRequest for this rendering.PortletException,AccessControlException - (@link oracle.portal.provider.v1.PortletException),
(@link oracle.portal.provider.v1.AccessControlException)
protected java.io.InputStream getURLStream(oracle.portal.provider.v1.PortletRenderRequest pr,
java.net.URL contentURL)
throws oracle.portal.provider.v1.PortletException
Method which connects to the given content url and returns the corresponding input stream. Care has been taken for two types of authentication.
In case of form based authentication, cookies stored in this user context, through provider will be submitted to the connection and then input stream is fetched.
In case of basic authentication, authorization information is already specified in the provider's initSession. As we are operating under the same context of HTTPClient from Renderer also, this authentication information still holds good.
- pr PortletRenderRequest Object needed for getting Session object
as well as cookies.URL - content URL from which input stream is to be read.
public void setPageUrl(java.lang.String pageUrl)
throws oracle.portal.provider.v1.PortletException
pageUrl - value of URL for getting contentpublic java.lang.String getPageUrl()
public void setFilterType(java.lang.String type)
public void setFilter(java.lang.Object filter)
throws oracle.portal.provider.v1.PortletException
filter - PortletFilter object.public java.lang.Object getFilter()
protected java.lang.String makeNVPair(java.lang.String name,
java.lang.String value,
java.lang.String encoding)
throws oracle.portal.provider.v1.PortletException
public void setCharSet(java.lang.String encoding)
charSet - IANA character encoding to be used for this renderer's
pagespublic java.lang.String getCharSet()
URLRenderer, then by default ISO-8859-1 will be used.
public boolean prepareResponse(oracle.portal.provider.v1.PortletRenderRequest pr)
throws oracle.portal.provider.v1.PortletException
Overriding super class's prepareResponse method for implementing Invalidation Based Caching.
pr - PortletRenderRequest to determine if the portlet has been
customized.
protected static URLPersonalizationObject getCustomizationData(oracle.portal.provider.v1.PortletRenderRequest pr)
throws oracle.portal.provider.v1.AccessControlException
public java.lang.String getUseInvalidationCaching()
public void setUseInvalidationCaching(java.lang.String useInCache)
useInCache - Enable caching or not (true/false)
public void renderContents(oracle.portal.provider.v1.PortletRenderRequest pr,
java.lang.String urlContent,
int debugLevel,
int type)
throws oracle.portal.provider.v1.PortletException
public java.net.URL getParsedPageUrl()
protected java.lang.String getPageUrl(oracle.portal.provider.v1.PortletRenderRequest pr,
int debugLevel)
throws oracle.portal.provider.v1.PortletException
pr - PortletRendererRequestdebugLevel - Debug level
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||