public interface VelocityService
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getResource(String resourcePath)
Gets a Velocity resource.
|
InputStream |
getResource(String portalId,
String resourceName)
Gets a Velocity resource.
|
void |
renderTemplate(String portalId,
String templateName,
org.apache.velocity.context.Context context,
Writer writer)
Renders a Velocity template with the given context.
|
String |
resourceExists(String portalId,
String resourceName)
Gets the resolved path to the specified resource.
|
InputStream getResource(String resourcePath)
resourcePath - a valid Velocity resourceInputStream getResource(String portalId, String resourceName)
portalId - the portal to get the resource fromresourceName - the resource to getString resourceExists(String portalId, String resourceName)
portalId - the portal to get the resource fromresourceName - the resource to check forvoid renderTemplate(String portalId, String templateName, org.apache.velocity.context.Context context, Writer writer) throws Exception
portalId - the portal to render the resource fromtemplateName - the template to rendercontext - the Velocity context to renderwriter - a writer to output the render result toException - if an error occurred while rendering the templateCopyright © 2009-2015. All Rights Reserved.