public interface IModuleBuildRenderer
IModuleBuilder.build(String, IResource, HttpServletRequest, List)
implements this interface, then the object's renderBuild
method
will be called to obtain the build output string which will be included in
the layer that is being assembled. Otherwise, the object's
toString
method is called.
For example, The JavaScript module builder uses this method to render module list expansion in require calls after filtering the list using the loaded dependencies for the layer (specified in a request attribute in the request object).
Build renderers are called during layer assembly at the time that a module
build is inserted into a layer. Build renderers should avoid time-consuming
operations such as file I/O, or blocking on other threads. These operations
should be done during the module's
IModuleBuilder.build(String, IResource, HttpServletRequest, List)
method. When a build renderer is needed, the module builder should construct
the build renderer in such a way that all the information needed to render
the build (minus information provided in the request) is encapsulated in the
build renderer.
If the rendered build is dependent upon features specified in the request
which may not be accounted for by the build's ICacheKeyGenerator
,
then the module builder should add the features to
dependentFeatures
so that they will be included in the
construction of the cache key for the layer.
Modifier and Type | Method and Description |
---|---|
String |
renderBuild(javax.servlet.http.HttpServletRequest request,
Set<String> dependentFeatures)
Called to render the build for the specified request.
|
String renderBuild(javax.servlet.http.HttpServletRequest request, Set<String> dependentFeatures)
request
- the request objectdependentFeatures
- features - Output. Features that will be included in the
construction of the cache key for the layer being assembled.Copyright © 2011-2015 IBM. All Rights Reserved.