public class DefaultDirectoryWriter extends java.lang.Object implements DirectoryWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultDirectoryWriter.Directory
DTO for representing a directory contents.
|
static class |
DefaultDirectoryWriter.Entry
DTO for representing information about an entry within a job directory.
|
| Constructor and Description |
|---|
DefaultDirectoryWriter() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
directoryToHTML(java.lang.String directoryName,
DefaultDirectoryWriter.Directory directory)
Given the provided information render as an HTML string.
|
protected DefaultDirectoryWriter.Directory |
getDirectory(java.io.File directory,
java.lang.String requestUrl,
boolean includeParent) |
java.lang.String |
toHtml(@NotNull java.io.File directory,
@URL java.lang.String requestURL,
boolean includeParent)
Convert a given directory to an String containing a full valid HTML page.
|
java.lang.String |
toJson(@NotNull java.io.File directory,
@URL java.lang.String requestURL,
boolean includeParent)
Convert a given directory to an String of JSON.
|
public static java.lang.String directoryToHTML(java.lang.String directoryName,
DefaultDirectoryWriter.Directory directory)
directoryName - The name of the directorydirectory - The directory information to serializeorg.apache.catalina.servlets.DefaultServletpublic java.lang.String toHtml(@NotNull
@NotNull java.io.File directory,
@URL
@URL java.lang.String requestURL,
boolean includeParent)
throws java.io.IOException
toHtml in interface DirectoryWriterdirectory - The directory to convert. Not null. Is directory.requestURL - The URL of the request that kicked off this processincludeParent - Whether the conversion should include reference to the parent directory.java.io.IOExceptionorg.apache.catalina.servlets.DefaultServletpublic java.lang.String toJson(@NotNull
@NotNull java.io.File directory,
@URL
@URL java.lang.String requestURL,
boolean includeParent)
throws java.lang.Exception
toJson in interface DirectoryWriterdirectory - The directory to convert. Not null. Is directory.requestURL - The URL of the request that kicked off this processincludeParent - Whether the conversion should include reference to the parent directory.java.lang.Exception - for any conversion problemprotected DefaultDirectoryWriter.Directory getDirectory(java.io.File directory, java.lang.String requestUrl, boolean includeParent)