|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sitemesh.offline.SiteMeshOffline
public class SiteMeshOffline
Tools for applying decorators to offline web pages (static content).
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 Summary | |
|---|---|
SiteMeshOffline(ContentProcessor contentProcessor,
DecoratorSelector<OfflineContext> decoratorSelector,
Directory sourceDirectory,
Directory destinationDirectory)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SiteMeshOffline(ContentProcessor contentProcessor,
DecoratorSelector<OfflineContext> decoratorSelector,
Directory sourceDirectory,
Directory destinationDirectory)
| Method Detail |
|---|
public Directory getSourceDirectory()
public Directory getDestinationDirectory()
public void process(String path)
throws IOException
IOException
public CharBuffer processContent(String path,
CharBuffer original)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||