|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.xml.AbstractXMLProducer org.apache.cocoon.generation.AbstractGenerator org.apache.cocoon.generation.ServiceableGenerator org.apache.cocoon.generation.VelocityGenerator
public class VelocityGenerator
Cocoon Generator
that produces dynamic XML SAX events
from a Velocity template file.
continuation
. You would
typically access its id
:
<form action="$continuation.id">
You can also reach previous continuations by using the getContinuation()
function:
<form action="$continuation.getContinuation(1).id}" >In addition the following implicit objects are always available in the Velocity context:
request
(org.apache.cocoon.environment.Request
)response
(org.apache.cocoon.environment.Response
)session
(org.apache.cocoon.environment.Session
)context
(org.apache.cocoon.environment.Context
)parameters
(org.apache.avalon.framework.parameters.Parameters
)Attributes:
Child Elements:
Nested Class Summary | |
---|---|
static class |
VelocityGenerator.ChainedContext
Velocity context implementation specific to the Servlet environment. |
static class |
VelocityGenerator.JSIntrospector
Velocity Introspector that supports Rhino JavaScript objects as well as Java Objects |
static class |
VelocityGenerator.TemplateLoader
Velocity ResourceLoader
implementation to load template resources using Cocoon's
SourceResolver . |
Field Summary |
---|
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator |
---|
manager |
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator |
---|
objectModel, parameters, resolver, source |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.velocity.runtime.log.LogSystem |
---|
DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID |
Fields inherited from interface org.apache.cocoon.generation.Generator |
---|
ROLE |
Constructor Summary | |
---|---|
VelocityGenerator()
|
Method Summary | |
---|---|
void |
configure(Configuration configuration)
Read any additional objects to export to the Velocity context from the configuration. |
void |
generate()
Generate XML data using Velocity template. |
void |
init(org.apache.velocity.runtime.RuntimeServices rs)
This implementation does nothing. |
void |
initialize()
|
void |
logVelocityMessage(int level,
String message)
Pass along Velocity log messages to our configured logger. |
void |
recycle()
Free up the VelocityContext associated with the pipeline, and release any Source objects resolved by the resource loader. |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters params)
Set the SourceResolver , object model Map ,
the source and sitemap Parameters used to process the request. |
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator |
---|
dispose, service |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
---|
setConsumer |
Constructor Detail |
---|
public VelocityGenerator()
Method Detail |
---|
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configuration
- the class configurations.
ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws Exception
initialize
in interface Initializable
Exception
Initializable.initialize()
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters params) throws ProcessingException, SAXException, IOException
AbstractGenerator
SourceResolver
, object model Map
,
the source and sitemap Parameters
used to process the request.
setup
in interface SitemapModelComponent
setup
in class AbstractGenerator
ProcessingException
SAXException
IOException
SitemapModelComponent.setup(SourceResolver, Map, String, Parameters)
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractGenerator
Recyclable.recycle()
public void generate() throws IOException, SAXException, ProcessingException
generate
in interface Generator
IOException
SAXException
ProcessingException
Generator.generate()
public void init(org.apache.velocity.runtime.RuntimeServices rs) throws Exception
init
in interface org.apache.velocity.runtime.log.LogSystem
Exception
LogSystem.init(RuntimeServices)
public void logVelocityMessage(int level, String message)
logVelocityMessage
in interface org.apache.velocity.runtime.log.LogSystem
LogSystem.logVelocityMessage(int, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |