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(ServerConfiguration server, 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(RenderableDefinition definition, String key)
           
protected  String getInterfaceMessage(String key)
           
protected  RenderingContext getRenderingContext()
           
protected  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(ServerConfiguration server,
                                    RenderingContext renderingContext)
Method Detail

begin

public void begin(Appendable out)
           throws IOException,
                  RenderException
Specified by:
begin in interface TemplatingElement
Throws:
IOException
RenderException

end

public void end(Appendable out)
         throws IOException,
                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
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(RenderableDefinition definition,
                                      String key)

getInterfaceMessage

protected String getInterfaceMessage(String key)

isAdmin

protected boolean isAdmin()

getServer

protected ServerConfiguration getServer()

getRenderingContext

protected RenderingContext getRenderingContext()


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