Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.meshcms.extra
Class StaticExportCleaner

    java.lang.Object
      java.lang.Thread
          org.meshcms.util.DirectoryParser
              org.meshcms.extra.StaticExportCleaner

All Implemented Interfaces:
  java.lang.Runnable

public class StaticExportCleaner
extends DirectoryParser

Cleans the directory used to export static files. This is done by removing all files that are not available in the dynamic version of the site. Empty directories are also removed. This class is used by `StaticExporter`.

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
`StaticExportCleaner(java.io.File contextRoot)` Creates an instance for the given context root

Method Summary
`Path` | `getProtectedPath()`
`java.io.Writer` | `getWriter()` Returns the writer (if any).
`protected void` | `postProcessDirectory(java.io.File file, Path path)`
`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.
`void` | `setProtectedPath(Path protectedPath)`
`void` | `setWriter(java.io.Writer writer)` Sets the writer for logging (usually the writer of the web page).

Methods inherited from class org.meshcms.util.DirectoryParser
`getInitialDir, isProcessStartDir, isRecursive, isSorted, postProcess, 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

### StaticExportCleaner

    public StaticExportCleaner(java.io.File contextRoot)

  Creates an instance for the given context root

Method Detail

### setWriter

    public void setWriter(java.io.Writer writer)

  Sets the writer for logging (usually the writer of the web page).

### getWriter

    public java.io.Writer getWriter()

  Returns the writer (if any).

### 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

### preProcessDirectory

    protected boolean preProcessDirectory(java.io.File file,
                                          Path path)

  Overrides:
    `preProcessDirectory` in class `DirectoryParser`

### postProcessDirectory

    protected void postProcessDirectory(java.io.File file,
                                        Path path)

  Overrides:
    `postProcessDirectory` in class `DirectoryParser`

### 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)

### getProtectedPath

    public Path getProtectedPath()

### setProtectedPath

    public void setProtectedPath(Path protectedPath)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD