info.aduna.gee.spectacle.gee.jit
Class DefaultJitSectionRenderer

java.lang.Object
  extended by info.aduna.gee.spectacle.gee.SectionRenderer
      extended by info.aduna.gee.spectacle.gee.jit.JitSectionRenderer
          extended by info.aduna.gee.spectacle.gee.jit.DefaultJitSectionRenderer
All Implemented Interfaces:
CustomizingSectionRenderer

public class DefaultJitSectionRenderer
extends JitSectionRenderer
implements CustomizingSectionRenderer

DefaultJitSectionRenderer provides a flexible and powerful implementation of a JitSectionRenderer. Unless your goals differ too much from a lot of projects realized so far, there should be no need to build your own JitSectionRenderer. And if you really must, you might subclass either DefaultJitSectionRenderer or (preferably) you subclass RenderUtil and feed an instance of it to DefaultJitSectionRenderer's constructor.


Field Summary
protected  String _firstDestination
           
protected  String _lastDestination
           
static String DEFAULT_DESTINATION
           
 
Fields inherited from class info.aduna.gee.spectacle.gee.SectionRenderer
_channel, _context, _maxDepth, _minBranchEntities, _recordOccurringLabels, _recordTheseOccurringLabels, _slash, _theTree, ALL, NONE, SOME
 
Constructor Summary
DefaultJitSectionRenderer()
          To be used by Serialization only.
DefaultJitSectionRenderer(RenderUtil renderUtil)
          This constructor is useful when you want the default jit section renderer, combined with a slightly modified render utility.
DefaultJitSectionRenderer(String source, String intermediateID, String leafID, String labelStub, String cover, String metaDesignName, int maxMetaOnPage)
           
 
Method Summary
protected  void _render(String path, NavigationTree tree)
          Required by SectionRenderer.
 void customizeOverviewEntity(Entity overviewEntity, boolean isLeaf)
          Required by CustomizingSectionRenderer.
 String getCover()
          JitSectionRenderer's should be able to produce their cover name.
 boolean handleSection(String path, NavigationTree node, Entity overviewEntity)
          Required by CustomizingSectionRenderer.
 void setFirstDestination(String destination)
          Sets the first destination to get overviewed content from.
 void setLastDestination(String destination)
          Sets the last destination to get overviewed content from.
 
Methods inherited from class info.aduna.gee.spectacle.gee.jit.JitSectionRenderer
addSetting, getNumberOfEntries, getSetting, handleSummaryEntries, render, render
 
Methods inherited from class info.aduna.gee.spectacle.gee.SectionRenderer
_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
 

Field Detail

DEFAULT_DESTINATION

public static String DEFAULT_DESTINATION

_firstDestination

protected String _firstDestination

_lastDestination

protected String _lastDestination
Constructor Detail

DefaultJitSectionRenderer

public DefaultJitSectionRenderer()
To be used by Serialization only.


DefaultJitSectionRenderer

public DefaultJitSectionRenderer(String source,
                                 String intermediateID,
                                 String leafID,
                                 String labelStub,
                                 String cover,
                                 String metaDesignName,
                                 int maxMetaOnPage)
Parameters:
source - the channel containing the templates
intermediateID - the id of the template to use for intermediate sections
leafID - the id of the template to use for leaf sections
labelStub - the template stub that represents the label selection
cover - the name of the cover or null
metaDesignName - the cover design for meta pages
maxMetaOnPage - the maximum (inclusive) number of meta's for which the meta design is used

DefaultJitSectionRenderer

public DefaultJitSectionRenderer(RenderUtil renderUtil)
This constructor is useful when you want the default jit section renderer, combined with a slightly modified render utility. Subclass the renderUtil and feed an instance of that subclass to this constructor.

Parameters:
renderUtil - the actual renderer.
Method Detail

_render

protected void _render(String path,
                       NavigationTree tree)
                throws ChannelException
Required by SectionRenderer.

Specified by:
_render in class SectionRenderer
Parameters:
path - the current path in the NavigationTree, i.e. the name of the Section to render
tree - the node in the NavigationTree to render
Throws:
ChannelException

handleSection

public boolean handleSection(String path,
                             NavigationTree node,
                             Entity overviewEntity)
Required by CustomizingSectionRenderer. It's empty and sub-classes may override it.

Specified by:
handleSection in interface CustomizingSectionRenderer
Parameters:
path - The path of the current section, including the current chunk.
node - The current spot in the NavigationTree.
overviewEntity - The (proposed) overview entity.
Returns:
false
See Also:
SectionRenderer.getChannel()

customizeOverviewEntity

public void customizeOverviewEntity(Entity overviewEntity,
                                    boolean isLeaf)
Required by CustomizingSectionRenderer. The default implementation sets the BEGINSECTION and ENDSECTION to the first and last content destination (as set by setFirstDestination and setLastDestination) Sub-classes may override it.

Specified by:
customizeOverviewEntity in interface CustomizingSectionRenderer
Parameters:
overviewEntity - the overview entity to be rendered in a section
isLeaf - if true, the section is a leaf, otherwise the section will have subsections

getCover

public String getCover()
Description copied from class: JitSectionRenderer
JitSectionRenderer's should be able to produce their cover name. It is allowed to be null.

Specified by:
getCover in class JitSectionRenderer
Returns:
the name of the cover

setFirstDestination

public void setFirstDestination(String destination)
Sets the first destination to get overviewed content from. The default is .repository.


setLastDestination

public void setLastDestination(String destination)
Sets the last destination to get overviewed content from. The default is .repository.



Copyright © 1997-2008 Aduna. All Rights Reserved.