|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.DirectoryBrowserSupport
public final class DirectoryBrowserSupport
Has convenience methods to serve file system.
This object can be used in a mix-in style to provide a directory browsing capability
to a ModelObject
.
Nested Class Summary | |
---|---|
static class |
DirectoryBrowserSupport.Path
Represents information about one file or folder. |
Field Summary | |
---|---|
ModelObject |
owner
|
String |
title
|
Constructor Summary | |
---|---|
DirectoryBrowserSupport(ModelObject owner,
FilePath base,
String title,
String icon,
boolean serveDirIndex)
|
|
DirectoryBrowserSupport(ModelObject owner,
String title)
Deprecated. as of 1.297 Use DirectoryBrowserSupport(ModelObject, FilePath, String, String, boolean) |
Method Summary | |
---|---|
void |
generateResponse(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
Object node)
|
void |
serveFile(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
FilePath root,
String icon,
boolean serveDirIndex)
Deprecated. as of 1.297 Instead of calling this method explicitly, just return the DirectoryBrowserSupport object
from the doXYZ method and let Stapler generate a response for you. |
void |
setIndexFileName(String fileName)
If the directory is requested but the directory listing is disabled, a file of this name is served. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final ModelObject owner
public final String title
Constructor Detail |
---|
public DirectoryBrowserSupport(ModelObject owner, String title)
DirectoryBrowserSupport(ModelObject, FilePath, String, String, boolean)
public DirectoryBrowserSupport(ModelObject owner, FilePath base, String title, String icon, boolean serveDirIndex)
owner
- The parent model object under which the directory browsing is added.base
- The root of the directory that's bound to URL.title
- Used in the HTML caption.icon
- The icon file name, like "folder.gif"serveDirIndex
- True to generate the directory index.
False to serve "index.html"Method Detail |
---|
public void generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException
generateResponse
in interface org.kohsuke.stapler.HttpResponse
IOException
javax.servlet.ServletException
public void setIndexFileName(String fileName)
public void serveFile(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, FilePath root, String icon, boolean serveDirIndex) throws IOException, javax.servlet.ServletException, InterruptedException
DirectoryBrowserSupport
object
from the doXYZ
method and let Stapler generate a response for you.
icon
- The icon file name, like "folder-open.gif"serveDirIndex
- True to generate the directory index.
False to serve "index.html"
IOException
javax.servlet.ServletException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |