info.magnolia.rendering.context
Class AggregationStateBasedRenderingContext

java.lang.Object
  extended by info.magnolia.rendering.context.AggregationStateBasedRenderingContext
All Implemented Interfaces:
RenderingContext

@LocalScoped
public class AggregationStateBasedRenderingContext
extends Object
implements RenderingContext

RenderingContext implementation that uses AggregationState.

Version:
$Id$

Constructor Summary
AggregationStateBasedRenderingContext(AggregationState aggregationState, RenderExceptionHandler exceptionHandler)
           
AggregationStateBasedRenderingContext(javax.inject.Provider<AggregationState> aggregationStateProvider, RenderExceptionHandler exceptionHandler)
           
 
Method Summary
 void addListener(RenderingListener renderingListener)
           
 void after(javax.jcr.Node content, RenderableDefinition definition, Map<String,Object> contextObjects, OutputProvider out)
           
 void before(javax.jcr.Node content, RenderableDefinition definition, Map<String,Object> contextObjects, OutputProvider out)
           
 AppendableWriter getAppendable()
           
 javax.jcr.Node getCurrentContent()
           
 javax.jcr.Node getMainContent()
           
 OutputProvider getOutputProvider()
           
 OutputStream getOutputStream()
           
 AreaDefinition getParentAreaDefinition()
           
 RenderableDefinition getRenderableDefinition()
           
 void handleException(RenderException renderException)
           
 void pop()
           
 void push(javax.jcr.Node content, RenderableDefinition renderableDefinition)
          Pushes the content and renderableDefinition to be used for rendering.
 void push(javax.jcr.Node content, RenderableDefinition renderableDefinition, OutputProvider outputProvider)
          Pushes the content and renderableDefinition to be used for rendering.
 void setListeners(List<RenderingListener> listeners)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationStateBasedRenderingContext

@Inject
public AggregationStateBasedRenderingContext(javax.inject.Provider<AggregationState> aggregationStateProvider,
                                                    RenderExceptionHandler exceptionHandler)

AggregationStateBasedRenderingContext

public AggregationStateBasedRenderingContext(AggregationState aggregationState,
                                             RenderExceptionHandler exceptionHandler)
Method Detail

getMainContent

public javax.jcr.Node getMainContent()
Specified by:
getMainContent in interface RenderingContext

getCurrentContent

public javax.jcr.Node getCurrentContent()
Specified by:
getCurrentContent in interface RenderingContext

getRenderableDefinition

public RenderableDefinition getRenderableDefinition()
Specified by:
getRenderableDefinition in interface RenderingContext

getParentAreaDefinition

public AreaDefinition getParentAreaDefinition()
Specified by:
getParentAreaDefinition in interface RenderingContext

push

public void push(javax.jcr.Node content,
                 RenderableDefinition renderableDefinition)
Description copied from interface: RenderingContext
Pushes the content and renderableDefinition to be used for rendering. Output will be written using the OutputProvider already set.

Specified by:
push in interface RenderingContext

push

public void push(javax.jcr.Node content,
                 RenderableDefinition renderableDefinition,
                 OutputProvider outputProvider)
Description copied from interface: RenderingContext
Pushes the content and renderableDefinition to be used for rendering.

Specified by:
push in interface RenderingContext
outputProvider - the OutputProvider to be used for output or null to use the OutputProvider already set

pop

public void pop()
Specified by:
pop in interface RenderingContext

getOutputProvider

public OutputProvider getOutputProvider()
Specified by:
getOutputProvider in interface RenderingContext

getAppendable

public AppendableWriter getAppendable()
                               throws IOException
Specified by:
getAppendable in interface RenderingContext
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Specified by:
getOutputStream in interface RenderingContext
Throws:
IOException

handleException

public void handleException(RenderException renderException)
Specified by:
handleException in interface RenderingContext

setListeners

public void setListeners(List<RenderingListener> listeners)
Specified by:
setListeners in interface RenderingContext

addListener

public void addListener(RenderingListener renderingListener)
Specified by:
addListener in interface RenderingContext

before

public void before(javax.jcr.Node content,
                   RenderableDefinition definition,
                   Map<String,Object> contextObjects,
                   OutputProvider out)
Specified by:
before in interface RenderingContext

after

public void after(javax.jcr.Node content,
                  RenderableDefinition definition,
                  Map<String,Object> contextObjects,
                  OutputProvider out)
Specified by:
after in interface RenderingContext


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.