public class FileSystemResourceFactory extends Object implements com.bradmcevoy.http.ResourceFactory
Constructor and Description |
---|
FileSystemResourceFactory()
Creates and (optionally) initialises the factory.
|
FileSystemResourceFactory(File root,
com.bradmcevoy.http.SecurityManager securityManager) |
FileSystemResourceFactory(File root,
com.bradmcevoy.http.SecurityManager securityManager,
String contextPath) |
Modifier and Type | Method and Description |
---|---|
String |
getContextPath() |
String |
getDefaultPage()
if provided GET requests to a folder will redirect to a page of this name
within the folder
|
com.ettrema.http.fs.LockManager |
getLockManager() |
Long |
getMaxAgeSeconds() |
String |
getRealm(String host) |
com.bradmcevoy.http.Resource |
getResource(String host,
String url) |
File |
getRoot() |
com.bradmcevoy.http.SecurityManager |
getSecurityManager() |
String |
getSsoPrefix() |
String |
getSupportedLevels() |
protected void |
init(String sRoot,
com.bradmcevoy.http.SecurityManager securityManager) |
boolean |
isAllowDirectoryBrowsing()
Whether to generate an index page.
|
Long |
maxAgeSeconds(FsResource resource) |
FsResource |
resolveFile(String host,
File file) |
File |
resolvePath(File root,
String url) |
void |
setAllowDirectoryBrowsing(boolean allowDirectoryBrowsing) |
void |
setContextPath(String contextPath) |
void |
setDefaultPage(String defaultPage) |
void |
setDigestAllowed(boolean digestAllowed) |
void |
setLockManager(com.ettrema.http.fs.LockManager lockManager) |
void |
setMaxAgeSeconds(Long maxAgeSeconds) |
void |
setRoot(File root) |
void |
setSecurityManager(com.bradmcevoy.http.SecurityManager securityManager) |
void |
setSsoPrefix(String ssoPrefix) |
public FileSystemResourceFactory()
public FileSystemResourceFactory(File root, com.bradmcevoy.http.SecurityManager securityManager)
root
- - the root folder of the filesystem to expose. This must
include the context path. Eg, if you've deployed to webdav-fs,
root must contain a folder called webdav-fssecurityManager
- public FileSystemResourceFactory(File root, com.bradmcevoy.http.SecurityManager securityManager, String contextPath)
root
- - the root folder of the filesystem to expose. called
webdav-fssecurityManager
- contextPath
- - this is the leading part of URL's to ignore. For
example if you're application is deployed to
http://localhost:8080/webdav-fs, the context path should be
webdav-fsprotected void init(String sRoot, com.bradmcevoy.http.SecurityManager securityManager)
public File getRoot()
public void setRoot(File root)
public com.bradmcevoy.http.Resource getResource(String host, String url)
getResource
in interface com.bradmcevoy.http.ResourceFactory
public String getSupportedLevels()
public FsResource resolveFile(String host, File file)
public Long maxAgeSeconds(FsResource resource)
public void setSecurityManager(com.bradmcevoy.http.SecurityManager securityManager)
public com.bradmcevoy.http.SecurityManager getSecurityManager()
public void setMaxAgeSeconds(Long maxAgeSeconds)
public Long getMaxAgeSeconds()
public com.ettrema.http.fs.LockManager getLockManager()
public void setLockManager(com.ettrema.http.fs.LockManager lockManager)
public void setContextPath(String contextPath)
public String getContextPath()
public boolean isAllowDirectoryBrowsing()
public void setAllowDirectoryBrowsing(boolean allowDirectoryBrowsing)
public String getDefaultPage()
public void setDefaultPage(String defaultPage)
public void setDigestAllowed(boolean digestAllowed)
public void setSsoPrefix(String ssoPrefix)
public String getSsoPrefix()
Copyright © 2017 Open Knowledge Management System S.L.. All rights reserved.