public class SiteMeshOffline extends Object
Directory sourceDir = new FileSystemDirectory("src/html"); Directory dirDir = new FileSystemDirectory("build/html"); ContentProcessor contentProcessor = // your ContentProcesor DecoratorSelector decoratorSelector = // your DecoratorSelector SiteMeshOffline siteMeshOffline = new SiteMeshOffline( contentProcessor, decoratorSelector, sourceDir, destinationDir); siteMeshOffline.process("somecontent.html"); siteMeshOffline.process("morecontent.html");
Constructor and Description |
---|
SiteMeshOffline(ContentProcessor contentProcessor,
DecoratorSelector<OfflineContext> decoratorSelector,
Directory sourceDirectory,
Directory destinationDirectory) |
Modifier and Type | Method and Description |
---|---|
Directory |
getDestinationDirectory()
Directory the generator writes the destination (decorated) files from.
|
Directory |
getSourceDirectory()
Directory the generator reads the source (undecorated) files from.
|
void |
process(String path)
Process a file (loaded from source directory), applying decorators and returning
the result as a CharBuffer.
|
CharBuffer |
processContent(String path,
CharBuffer original)
Process content passed in, applying decorators and returning
the result as a CharBuffer.
|
public SiteMeshOffline(ContentProcessor contentProcessor, DecoratorSelector<OfflineContext> decoratorSelector, Directory sourceDirectory, Directory destinationDirectory)
public Directory getSourceDirectory()
public Directory getDestinationDirectory()
public void process(String path) throws IOException
IOException
public CharBuffer processContent(String path, CharBuffer original) throws IOException
IOException
Copyright © 2015. All Rights Reserved.