org.meshcms.webui
Class FolderXTree

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.meshcms.util.DirectoryParser
          extended byorg.meshcms.webui.FolderXTree
All Implemented Interfaces:
java.lang.Runnable

public class FolderXTree
extends DirectoryParser

Used internally to create the JavaScript code needed by xTree to display the folder tree. xTree has been created by WebFX.


Nested Class Summary
static class FolderXTree.DirectoryInfo
          Encapsulates inclusion flag and icon for a directory.
 
Field Summary
 
Fields inherited from class org.meshcms.util.DirectoryParser
initialDir, processStartDir, recursive
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FolderXTree(WebSite webSite, UserInfo userInfo, java.io.Writer writer, java.lang.String thumbsParam, java.lang.String rootName)
          Creates a new instance.
 
Method Summary
static FolderXTree.DirectoryInfo getDirectoryInfo(WebSite webSite, UserInfo userInfo, Path dirPath)
          Returns info about a directory, based on path and permissions.
protected  boolean preProcess()
          This method is called during the process, but before any element has been processed.
protected  boolean preProcessDirectory(java.io.File file, Path path)
           
protected  void processFile(java.io.File file, Path path)
          This method will be called for any file found while parsing the base directory.
 
Methods inherited from class org.meshcms.util.DirectoryParser
getInitialDir, isProcessStartDir, isRecursive, isSorted, postProcess, postProcessDirectory, process, run, setInitialDir, setInitialDir, setProcessStartDir, setRecursive, setSorted
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FolderXTree

public FolderXTree(WebSite webSite,
                   UserInfo userInfo,
                   java.io.Writer writer,
                   java.lang.String thumbsParam,
                   java.lang.String rootName)
Creates a new instance.

Parameters:
writer - used to write down the needed JavaScript code.
Method Detail

preProcess

protected boolean preProcess()
Description copied from class: DirectoryParser
This method is called during the process, but before any element has been processed. If it returns false, no processing will take place.

The base implementation does nothing and returns true.

Overrides:
preProcess in class DirectoryParser
Returns:
always true

processFile

protected void processFile(java.io.File file,
                           Path path)
Description copied from class: DirectoryParser
This method will be called for any file found while parsing the base directory.

Overrides:
processFile in class DirectoryParser
Parameters:
file - the file to be processed
path - the path of the file (relative to the base directory)

preProcessDirectory

protected boolean preProcessDirectory(java.io.File file,
                                      Path path)
Overrides:
preProcessDirectory in class DirectoryParser

getDirectoryInfo

public static FolderXTree.DirectoryInfo getDirectoryInfo(WebSite webSite,
                                                         UserInfo userInfo,
                                                         Path dirPath)
Returns info about a directory, based on path and permissions.