info.magnolia.templating.elements
Class AbstractTemplatingElement

java.lang.Object
  extended by info.magnolia.templating.elements.AbstractTemplatingElement
All Implemented Interfaces:
TemplatingElement
Direct Known Subclasses:
AbstractContentTemplatingElement

public abstract class AbstractTemplatingElement
extends Object
implements TemplatingElement

Common super class for templating elements, provides utility methods and defaults.

Version:
$Id$

Constructor Summary
protected AbstractTemplatingElement(info.magnolia.cms.beans.config.ServerConfiguration server, info.magnolia.rendering.context.RenderingContext renderingContext)
           
 
Method Summary
 void begin(Appendable out)
           
protected  javax.jcr.Node currentContent()
          Returns the "current content" from the aggregation state.
 void end(Appendable out)
          Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.
protected  String getDefinitionMessage(info.magnolia.rendering.template.RenderableDefinition definition, String key)
           
protected  String getInterfaceMessage(String key)
           
protected  info.magnolia.rendering.context.RenderingContext getRenderingContext()
           
protected  info.magnolia.cms.beans.config.ServerConfiguration getServer()
           
protected  boolean isAdmin()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTemplatingElement

protected AbstractTemplatingElement(info.magnolia.cms.beans.config.ServerConfiguration server,
                                    info.magnolia.rendering.context.RenderingContext renderingContext)
Method Detail

begin

public void begin(Appendable out)
           throws IOException,
                  info.magnolia.rendering.engine.RenderException
Specified by:
begin in interface TemplatingElement
Throws:
IOException
info.magnolia.rendering.engine.RenderException

end

public void end(Appendable out)
         throws IOException,
                info.magnolia.rendering.engine.RenderException
Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.

Specified by:
end in interface TemplatingElement
Throws:
IOException
info.magnolia.rendering.engine.RenderException

currentContent

protected javax.jcr.Node currentContent()
Returns the "current content" from the aggregation state. Override this method if your component needs a different target node.


getDefinitionMessage

protected String getDefinitionMessage(info.magnolia.rendering.template.RenderableDefinition definition,
                                      String key)

getInterfaceMessage

protected String getInterfaceMessage(String key)

isAdmin

protected boolean isAdmin()

getServer

protected info.magnolia.cms.beans.config.ServerConfiguration getServer()

getRenderingContext

protected info.magnolia.rendering.context.RenderingContext getRenderingContext()


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.