biz.hammurapi.web.mda
Class MdaRule

java.lang.Object
  extended bybiz.hammurapi.config.ComponentBase
      extended bybiz.hammurapi.rules.AbstractRule
          extended bybiz.hammurapi.rules.Rule
              extended bybiz.hammurapi.web.mda.MdaRule
All Implemented Interfaces:
biz.hammurapi.config.Component, biz.hammurapi.config.Context, biz.hammurapi.dispatch.InvocationTarget, biz.hammurapi.metrics.MeasurementCollector, biz.hammurapi.metrics.MeasurementConsumer

public class MdaRule
extends biz.hammurapi.rules.Rule

Base for code generation rules. This rule looks up resource locator, evaluator factory and channel factory in rule session attributes. It also contains utility methods to render objects/contexts using given template to given channel.

Author:
Pavel

Nested Class Summary
 
Nested classes inherited from class biz.hammurapi.rules.Rule
biz.hammurapi.rules.Rule.AcceptInfo, biz.hammurapi.rules.Rule.ChangeDetector
 
Field Summary
 
Fields inherited from class biz.hammurapi.config.ComponentBase
owner
 
Constructor Summary
MdaRule()
           
 
Method Summary
protected  EvaluatorFactory getEvaluatorFactory()
           
protected  ResourceLocator getResourceLocator()
           
protected  RootChannel getRootChannel()
           
protected  void render(java.util.Map context, java.lang.String template, java.lang.String[] path)
          Renders context to channel writer using template
 void start()
           
 
Methods inherited from class biz.hammurapi.rules.Rule
getInvocationHandlers, getRemoveHandlers, newChangeDetector, post, remove
 
Methods inherited from class biz.hammurapi.rules.AbstractRule
getCollection, getDescription, getName, reset, setDescription, setName, stop, toString, update
 
Methods inherited from class biz.hammurapi.config.ComponentBase
addMeasurement, get, getChild, getMeasurementConsumer, getOwner, setMeasurementConsumer, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MdaRule

public MdaRule()
Method Detail

getRootChannel

protected RootChannel getRootChannel()

getEvaluatorFactory

protected EvaluatorFactory getEvaluatorFactory()

getResourceLocator

protected ResourceLocator getResourceLocator()

start

public void start()
           throws biz.hammurapi.config.ConfigurationException
Throws:
biz.hammurapi.config.ConfigurationException

render

protected void render(java.util.Map context,
                      java.lang.String template,
                      java.lang.String[] path)
               throws HammurapiWebException
Renders context to channel writer using template

Parameters:
context -
template -
Throws:
HammurapiWebException


Copyright © 2006 Hammurapi Group. All Rights Reserved.