|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSPProvider
com.sun.portal.wireless.providers.rendering.JSPRenderingProvider
The JSPRenderingProvider
class extends from the
JSPProvider
and overrides the getContent,
getEdit
and getMostSpecificPath
methods of JSPProvider
. This is a public class and
can be extended to add more functionality to the provider if needed.
It gets the AML content from JSP templates for the provider and based on a
few checks, it decides whether to pass the AML content back to the
container or call the RenderingEngine
itself and pass back device specific markup to the container.
Rendering Channels created using this
JSPRenderingProvider
can be a part of either RenderingContainer
s or
NativeContainer
s. While creating channels using
JSPRenderingProvider
, the channel developer
has to write a contentPage.jsp
and editPage.jsp
(if channel is editable)
which would get the content from AML JSPs it has.
All JSPs created for the channel should be valid AML documents.
Constructor Summary | |
JSPRenderingProvider()
|
Method Summary | |
java.lang.StringBuffer |
getContent(HttpServletRequest req,
HttpServletResponse res)
This method overrides JSPProvider.getContent() method. |
java.lang.StringBuffer |
getEdit(HttpServletRequest req,
HttpServletResponse res)
This method overrides JSPProvider.getEdit() method. |
java.io.File |
getExistingJSPPath(ProviderContext pc,
java.lang.String name,
java.lang.String file)
Get the most specific JSP path for the given channel name and file name. |
protected java.io.File |
getMostSpecificJSPPath(ProviderContext pc,
java.lang.String name,
java.lang.String file)
Get the most specific JSP path for the given channel name and file name. |
void |
init(java.lang.String name,
HttpServletRequest req)
Initializes this JSPRenderingProvider. |
protected java.lang.StringBuffer |
renderContent(HttpServletRequest req,
java.lang.StringBuffer sb)
This method is expected to be called from the Provider's getContent() methods after it creates its content
StringBuffer. |
protected java.lang.StringBuffer |
renderEditContent(HttpServletRequest req,
java.lang.StringBuffer sb)
This method is expected to be called from the Provider's getEdit()
methods after it creates its content StringBuffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JSPRenderingProvider()
Method Detail |
public void init(java.lang.String name, HttpServletRequest req) throws ProviderException
ProviderException
public java.lang.StringBuffer getContent(HttpServletRequest req, HttpServletResponse res) throws ProviderException
JSPProvider.getContent()
method. It
gets the JSP content from JSPProvider
and pass it to
renderContent()
method.
Based on a few check, it will either return device specfic markup or AML.
ProviderException
- If there was an error generating the content.com.sun.portal.providers.jsp.JSPProvider#getContent
public java.lang.StringBuffer getEdit(HttpServletRequest req, HttpServletResponse res) throws ProviderException
JSPProvider.getEdit()
method. It gets
the JSP edit page content from JSPProvider
and pass it to
renderContent()
method.
Based on a few check, it will either return device specfic markup or AML.
ProviderException
- If there was an error generating the content.com.sun.portal.providers.jsp.JSPProvider#getEdit
protected java.lang.StringBuffer renderContent(HttpServletRequest req, java.lang.StringBuffer sb) throws ProviderException
getContent()
methods after it creates its content
StringBuffer. It calls RenderingUtil.renderContent()
to render the content. The return buffer can contain device specific
markup (rendered) or remain as AML document (not rendered).
req
- An HttpServletRequest that contains information related to this
request for content.sb
- The StringBuffer representing the content obtained
from the JSPs.
ProviderException
RenderingUtil#renderContent
protected java.lang.StringBuffer renderEditContent(HttpServletRequest req, java.lang.StringBuffer sb) throws ProviderException
getEdit()
methods after it creates its content StringBuffer. It calls
RenderingUtil.renderEditContent()
to render the content.
The return buffer can contain device specific markup (rendered) or
remain as AML document (not rendered).
req
- An HttpServletRequest that contains information related to this
request for content.sb
- The StringBuffer representing the content obtained
from the JSPs.
ProviderException
RenderingUtil#renderContent
protected java.io.File getMostSpecificJSPPath(ProviderContext pc, java.lang.String name, java.lang.String file) throws ProviderException
JSPProvider.
getMostSpecificJSPPath()
method and calls RenderingUtils.getTemplateMostSpecificPath
to get the real path.
pc
- The ProviderContext.name
- The channel name.file
- The jsp file name.
ProviderException
- if an error occurs in getting the path.com.sun.portal.providers.jsp.JSPProvider#getMostSpecificJSPPath
,
RenderingUtil#getTemplateMostSpecificPath
public java.io.File getExistingJSPPath(ProviderContext pc, java.lang.String name, java.lang.String file) throws ProviderException
JSPProvider.
getExistingJSPPath()
method and calls RenderingUtils.getTemplatePath
to get
the real path.
pc
- The ProviderContext.name
- The channel name.file
- The jsp file name.
ProviderException
- if an error occurs in getting the path.com.sun.portal.providers.jsp.JSPProvider#getExistingJSPPath
,
RenderingUtil#getTemplatePath
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |