com.sun.portal.wireless.providers.containers.jsp.rendering.single
Class JSPSingleRenderingContainerProvider

java.lang.Object
  extended byJSPSingleContainerProvider
      extended bycom.sun.portal.wireless.providers.containers.jsp.rendering.single.JSPSingleRenderingContainerProvider

public class JSPSingleRenderingContainerProvider
extends JSPSingleContainerProvider

The JSPSingleRenderingContainerProvider class extends from the JSPSingleContainerProvider and overrides the getContent, getEdit and getMostSpecificPath methods of JSPSingleContainerProvider. This is a public class and can be extended to add more functionality to the provider if needed. While creating container channels using JSPSingleRenderingContainerProvider, the channel developer has to write a contentPage.jsp and editPage.jsp which would get the content from AML JSPs it has.

All JSPs created for the channel should be valid AML documents.

See Also:
Serialized Form

Constructor Summary
JSPSingleRenderingContainerProvider()
           
 
Method Summary
 java.lang.StringBuffer getContent(HttpServletRequest req, HttpServletResponse res)
          Gets the content.
 java.lang.StringBuffer getEdit(HttpServletRequest req, HttpServletResponse res)
           
 java.io.File getExistingJSPPath(ProviderContext pc, java.lang.String name, java.lang.String file)
          Gets the template path for the given channel name, the given template name and the given filepath.
 void init(java.lang.String name, HttpServletRequest req)
          Initializes this JSPSingleRenderingContainerProvider.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSPSingleRenderingContainerProvider

public JSPSingleRenderingContainerProvider()
Method Detail

init

public void init(java.lang.String name,
                 HttpServletRequest req)
          throws ProviderException
Initializes this JSPSingleRenderingContainerProvider.

Parameters:
name - the name
req - the HTTP servlet request
Throws:
ProviderException - if initialization fails

getContent

public java.lang.StringBuffer getContent(HttpServletRequest req,
                                         HttpServletResponse res)
                                  throws ProviderException
Gets the content.

Parameters:
req - the HTTP servlet request
res - the HTTP servlet response
Throws:
ProviderException - if there was a problem getting the content.

getEdit

public java.lang.StringBuffer getEdit(HttpServletRequest req,
                                      HttpServletResponse res)
                               throws ProviderException
Throws:
ProviderException

getExistingJSPPath

public java.io.File getExistingJSPPath(ProviderContext pc,
                                       java.lang.String name,
                                       java.lang.String file)
                                throws ProviderException
Gets the template path for the given channel name, the given template name and the given filepath. If non-null, the key returned by this method will map to a valid template file. It internally calls ProviderContext.getTemplateMostSpecificPath to get the template path.

Parameters:
pc - - ProviderContext of the calling provider
name - - Channel name
file - - Template name
Returns:
Path key to access the template
Throws:
ProviderException - if there was a problem getting the path