|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.portal.wireless.providers.rendering.RenderingUtil
The RenderingUtil
class acts as a wrapper to the
RenderingEngine
interface. It provides a method that
performs a
modified fileLookup to get the appropriate AML templates from the file
system. It also provides static methods for the
JSPRenderingContainerProvider
and the
JSPRenderingProvider
to make use of the rendering
functionality. These utility methods can be also used by Containers
or Providers that do not extend from the
JSPRenderingContainerProvider
or
JSPRenderingProvider
classes.
Constructor Summary | |
RenderingUtil()
|
Method Summary | |
static java.lang.StringBuffer |
doRender(HttpServletRequest request,
ContainerProviderContext cpc,
java.lang.String name,
java.lang.StringBuffer sb,
boolean cache,
boolean fragment)
Gets the instance of the Rendering Engine and transforms the AML to device-specific markup by calling the RenderingEngine.renderContent method. |
static java.lang.StringBuffer |
getTemplate(ContainerProviderContext cpc,
java.lang.String name,
java.lang.String file)
Gets a desktop template relative to the filepath specified. |
static java.lang.StringBuffer |
getTemplate(ContainerProviderContext cpc,
java.lang.String name,
java.lang.String file,
java.util.Hashtable table)
Gets and tag swaps a desktop template relative to the filepath specified. |
static java.io.File |
getTemplateMostSpecificPath(ContainerProviderContext cpc,
java.lang.String name,
java.lang.String file)
Gets the most specific template path for the given channel name, the given template name and the given filepath. |
static java.io.File |
getTemplatePath(ContainerProviderContext cpc,
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. |
static java.lang.StringBuffer |
renderContent(HttpServletRequest request,
ContainerProviderContext cpc,
java.lang.String name,
java.lang.StringBuffer sb)
This method renders content that the Rendering Providers or Containers have retrieved. |
static java.lang.StringBuffer |
renderEditContent(HttpServletRequest request,
ContainerProviderContext cpc,
java.lang.String name,
java.lang.StringBuffer sb)
Renders contents, if the channel is a top level edit channel. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RenderingUtil()
Method Detail |
public static java.lang.StringBuffer renderContent(HttpServletRequest request, ContainerProviderContext cpc, java.lang.String name, java.lang.StringBuffer sb) throws ProviderException
The logic of whether or not to perform rendering is driven by the following tables:
Parent Container | ||||
---|---|---|---|---|
Rendering
Container |
Native
Container |
Null - Top level
|
||
Client FilePath | Native filepath e.g. 'wml' |
NOOP |
Render |
Not applicable |
Starts with 'aml' |
NOOP |
NOOP |
Render |
|
Parent Container | |||
---|---|---|---|
Rendering
Container |
Native
Container |
||
Client FilePath | Native filepath e.g. 'wml' |
NOOP |
Render |
Starts with 'aml' |
NOOP |
NOOP |
|
request
- The Http Servlet Request object that gets passed to
the getContent call of the Provider/Container.cpc
- This is the ContainerProviderContext obtained from
getProviderContext() call while in Provider/Container.name
- Name of the channel being renderedsb
- The StringBuffer representing the Content obtained
from the Templates/JSPs.
ProviderException
public static java.lang.StringBuffer renderEditContent(HttpServletRequest request, ContainerProviderContext cpc, java.lang.String name, java.lang.StringBuffer sb) throws ProviderException
request
- The Http Servlet Request object that gets passed to
the getContent call of the Provider/Container.cpc
- This is the ContainerProviderContext obtained from
getProviderContext() call while in Provider/Container.name
- Name of the channel being renderedsb
- The StringBuffer representing the Content obtained
from the Templates/JSPs.
ProviderException
public static java.lang.StringBuffer doRender(HttpServletRequest request, ContainerProviderContext cpc, java.lang.String name, java.lang.StringBuffer sb, boolean cache, boolean fragment) throws ProviderException
request
- The Http Servlet Request object that gets passed to
the getContent call of the Provider/Container.cpc
- This is the ContainerProviderContext obtained from
getProviderContext() call while in Provider/Container.name
- Name of the channel being renderedsb
- The StringBuffer representing the Content obtained
from the Templates/JSPs.cache
- Boolean indicating whether to ask rendering engine to
buffer the response or not.fragment
- Boolean indicating whether the AML being rendered is
a complete AML document or a fragment.
ProviderException
public static java.lang.StringBuffer getTemplate(ContainerProviderContext cpc, java.lang.String name, java.lang.String file) throws ProviderContextException
cpc
- ContainerProviderContext of the calling providername
- Channel namefile
- Template name to return.
ProviderContextException
public static java.lang.StringBuffer getTemplate(ContainerProviderContext cpc, java.lang.String name, java.lang.String file, java.util.Hashtable table) throws ProviderContextException
cpc
- ContainerProviderContext of the calling providername
- Channel namefile
- Template name to return.table
- table to use for tag swapping
ProviderContextException
public static java.io.File getTemplateMostSpecificPath(ContainerProviderContext cpc, java.lang.String name, java.lang.String file) throws ProviderContextException
cpc
- ContainerProviderContext of the calling providername
- Channel namefile
- Template name
ProviderContextException
public static java.io.File getTemplatePath(ContainerProviderContext cpc, java.lang.String name, java.lang.String file) throws ProviderContextException
cpc
- ContainerProviderContext of the calling providername
- Channel namefile
- Template name
ProviderContextException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |