public class FileServer extends AbstractFileServer
AbstractFileServer
for jax-rs
resources serviceng static files to override.Constructor and Description |
---|
FileServer()
Construct a new instance that has to be configured using one of the
configure-methods.
|
FileServer(org.wymiwyg.commons.util.dirbrowser.PathNode pathNode)
creates a new instance configured with specified pathnode as root
|
Modifier and Type | Method and Description |
---|---|
void |
configure(org.osgi.framework.BundleContext context)
Configures the instance to use the 'staticweb' folder next to (sub-)class
in the bundle associated to the specified context.
|
void |
configure(org.osgi.framework.BundleContext context,
String path)
Sets up a path in a bundle or file system to be exposed over a
org.apache.clerezza.web.fileserver.FileServer . |
void |
configure(File rootDir)
configures the instance to use the specified directory as root
|
void |
configure(org.wymiwyg.commons.util.dirbrowser.PathNode pathNode)
configures the instance with the specified PathNode
|
protected org.wymiwyg.commons.util.dirbrowser.PathNode |
getRootNode()
This method return the root of the served hierarchy.
|
void |
reset()
resets the configuration
|
getNode
public FileServer()
public FileServer(org.wymiwyg.commons.util.dirbrowser.PathNode pathNode)
pathNode
- the root of the PathNode hierarchypublic void configure(org.wymiwyg.commons.util.dirbrowser.PathNode pathNode)
pathNode
- the root of the PathNode hierarchypublic void configure(org.osgi.framework.BundleContext context)
context
- The scr component context of the bundle containing the
'staticweb' directory where the subclass is located.public void configure(org.osgi.framework.BundleContext context, String path)
org.apache.clerezza.web.fileserver.FileServer
. The path is
relative to the locationof the class.context
- The bundle context of the bundle containing the path.path
- the path where the file are to be exposedpublic void configure(File rootDir)
rootDir
- the root of the serverd hierarchypublic void reset()
protected org.wymiwyg.commons.util.dirbrowser.PathNode getRootNode()
AbstractFileServer
getRootNode
in class AbstractFileServer
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.