org.mmbase.bridge.jsp.taglib.pageflow
Class TreeHelper

java.lang.Object
  extended byorg.mmbase.bridge.jsp.taglib.pageflow.TreeHelper

public class TreeHelper
extends java.lang.Object

This helper-class has all Tree- and Leaf-related functionality. The algorithms that find the page to include in the directory structure are implemented here. The 'TreeInclude', 'LeafInclude', 'TreeFile' and 'LeafFile' all use this helper class. See their documentation for more information about the algorithms.

Version:
$Id: TreeHelper.java,v 1.8.2.1 2004/06/08 12:28:54 johannes Exp $
Author:
Johannes Verelst, Rob Vermeulen (VPRO)

Constructor Summary
TreeHelper()
           
 
Method Summary
protected  java.lang.String findLeafFile(java.lang.String includePage, java.lang.String objectlist, javax.servlet.http.HttpSession session)
          Method to find the file to 'LeafInclude' given a list of objectnumbers
protected  java.lang.String findTreeFile(java.lang.String includePage, java.lang.String objectlist, javax.servlet.http.HttpSession session)
          Method to find the file to 'TreeInclude' given a list of objectnumbers
protected  java.lang.String getLeafFile(java.lang.String prefix, java.lang.String objectlist, java.lang.String includePage, boolean maySmartpath, javax.servlet.http.HttpSession session)
          Return the path to the include file.
 void setCloud(Cloud cl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeHelper

public TreeHelper()
Method Detail

setCloud

public void setCloud(Cloud cl)

findLeafFile

protected java.lang.String findLeafFile(java.lang.String includePage,
                                        java.lang.String objectlist,
                                        javax.servlet.http.HttpSession session)
                                 throws javax.servlet.jsp.JspTagException
Method to find the file to 'LeafInclude' given a list of objectnumbers

Parameters:
includePage - The page to include (relative path, may include URL parameters)
objectlist - The list of objectnumbers (comma-seperated) that is used to find the correct file to include
session - The session context can contain version information (used in getVerion).
Throws:
javax.servlet.jsp.JspTagException

getLeafFile

protected java.lang.String getLeafFile(java.lang.String prefix,
                                       java.lang.String objectlist,
                                       java.lang.String includePage,
                                       boolean maySmartpath,
                                       javax.servlet.http.HttpSession session)
                                throws javax.servlet.jsp.JspTagException
Return the path to the include file. This path will start with the given prefix, appended by data calculated using the objectlist. If mayStartpath is true, then smartpath() will be called on objects in the objectlist, otherwise only their buildernames will be used.

Parameters:
includePage - The page to include (relative path, may include URL parameters)
objectlist - The list of objectnumbers (comma-seperated) that is used to find the correct file to include
session - The session context can contain version information (used in getVerion).
maySmartpath - Boolean indicating whether or not getLeafFile may call a 'getSmartpath' on the given objects
prefix - The path that was already established by previous calls to getLeafFile, deeper in the recursion tree.
Throws:
javax.servlet.jsp.JspTagException

findTreeFile

protected java.lang.String findTreeFile(java.lang.String includePage,
                                        java.lang.String objectlist,
                                        javax.servlet.http.HttpSession session)
                                 throws javax.servlet.jsp.JspTagException
Method to find the file to 'TreeInclude' given a list of objectnumbers

Parameters:
includePage - The page to include (relative path, may include URL parameters)
objectlist - The list of objectnumbers (comma-seperated) that is used to find the correct file to include
session - The session context can contain version information (used in getVerion). TODO: add support for 'intermediate paths' as LeafInclude has.
Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002