info.aduna.gee.spectacle.gee.jit
Class JitSectionRenderer

java.lang.Object
  extended by info.aduna.gee.spectacle.gee.SectionRenderer
      extended by info.aduna.gee.spectacle.gee.jit.JitSectionRenderer
Direct Known Subclasses:
DefaultJitSectionRenderer

public abstract class JitSectionRenderer
extends SectionRenderer

Class JitSectionRenderer provides a mechanism to fully realize, just in time, a NavigationSpecification. The NavigationSpecification is instantiated occurding to a set of Entities and this results in a NavigationTree. The NavigationTree is rendered, also just in time, in a Channel.


Field Summary
 
Fields inherited from class info.aduna.gee.spectacle.gee.SectionRenderer
_channel, _context, _maxDepth, _minBranchEntities, _recordOccurringLabels, _recordTheseOccurringLabels, _slash, _theTree, ALL, NONE, SOME
 
Constructor Summary
JitSectionRenderer()
           
 
Method Summary
 void addSetting(Object key, Object value)
          Set a implementation specific key/value setting.
abstract  String getCover()
          JitSectionRenderer's should be able to produce their cover name.
 int getNumberOfEntries(PathString path, NavigationTree node)
          The default behaviour is to return the actual number of entities.
 Object getSetting(Object key)
          Get a implementation specific key/value setting.
 boolean handleSummaryEntries()
          Override this method, if you do not want the upper Spectacle layers to handle the lower level summaries.
 void render(NavigationSpecification navigationSpec, EntityContext context, Channel channel)
          Perform the actual rendering.
 void render(Object sectionID, NavigationTree theTree, boolean renderContent, boolean createChildren)
          (Optionally) render the node's content and (optionally) ensure the existence of its children.
 
Methods inherited from class info.aduna.gee.spectacle.gee.SectionRenderer
_render, _setTreeRoot, getChannel, getMaxDepth, getMinBranchEntities, getRecordOccurringLabels, getRecordTheseOccurringLabels, getSlash, getTreeRoot, setMaxDepth, setMinBranchEntities, setRecordEntities, setRecordOccurringLabels, setSlash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JitSectionRenderer

public JitSectionRenderer()
Method Detail

addSetting

public void addSetting(Object key,
                       Object value)
Set a implementation specific key/value setting. Note: both key and value should be a Jazzz supported Java type (all basic types (String, Integer, etc), List, Map) .


getSetting

public Object getSetting(Object key)
Get a implementation specific key/value setting.

Returns:
the value or null

render

public void render(NavigationSpecification navigationSpec,
                   EntityContext context,
                   Channel channel)
            throws ChannelException
Description copied from class: SectionRenderer
Perform the actual rendering. As a side effect, a view that corresponds to the resulting channel is registered in the context.

Overrides:
render in class SectionRenderer
Parameters:
navigationSpec - the NavigationSpecification to render
context - the EntityContext that provides the Entities
channel - the Channel in which to render the sections
Throws:
ChannelException
See Also:
SectionRenderer.render(info.aduna.gee.spectacle.gee.NavigationSpecification, info.aduna.gee.spectacle.gee.EntityContext, info.aduna.gee.spectacle.webserver.Channel)

render

public void render(Object sectionID,
                   NavigationTree theTree,
                   boolean renderContent,
                   boolean createChildren)
            throws ChannelException
(Optionally) render the node's content and (optionally) ensure the existence of its children.

Parameters:
sectionID - the section that is going to be viewed
theTree - the navigation tree (i.e. the root!)
renderContent - if true, render the nodes content
createChildren - if true, ensure the existence of its children
Throws:
ChannelException

getNumberOfEntries

public int getNumberOfEntries(PathString path,
                              NavigationTree node)
The default behaviour is to return the actual number of entities. But for specific applications, that's might not be correct. This is a method to overrule the default behaviour.

Parameters:
path - the path of the current node
node - the current node

handleSummaryEntries

public boolean handleSummaryEntries()
Override this method, if you do not want the upper Spectacle layers to handle the lower level summaries. The default implementation returns true (which is most efficient).


getCover

public abstract String getCover()
JitSectionRenderer's should be able to produce their cover name. It is allowed to be null.



Copyright © 1997-2008 Aduna. All Rights Reserved.