public class ClassPathHttpResourceNode extends Object implements Serializable
HttpResource
.Constructor and Description |
---|
ClassPathHttpResourceNode(String nodePath,
String resourcePath,
String classPath,
boolean isDirectory)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
static ClassPathHttpResourceNode |
createClassPathResourceTree(String classpathPrefix)
Creates the
ClassPathHttpResourceNode tree for available
HttpResource instances. |
ClassPathHttpResourceNode |
getChild(String childNodePath)
Obtains the child
ClassPathHttpResourceNode by the name. |
ClassPathHttpResourceNode[] |
getChildren()
Obtains the child
ClassPathHttpResourceNode instances. |
String |
getClassPath()
Obtains the class path for this
HttpResource . |
String |
getNodePath()
Obtains the path of this
ClassPathHttpResourceNode from its
parent. |
String |
getResourcePath()
Obtains the
HttpResource path. |
boolean |
isDirectory()
Indicates if this is a directory.
|
public ClassPathHttpResourceNode(String nodePath, String resourcePath, String classPath, boolean isDirectory)
nodePath
- Path of this node relative to its parent.resourcePath
- HttpResource
path to this node.classPath
- Class path to this node.isDirectory
- true
if this node is a directory (otherwise a
file).public static ClassPathHttpResourceNode createClassPathResourceTree(String classpathPrefix)
ClassPathHttpResourceNode
tree for available
HttpResource
instances.classpathPrefix
- The prefix on the class path to locate resources for the tree.
null
for the entire class path.ClassPathHttpResourceNode
.public String getNodePath()
ClassPathHttpResourceNode
from its
parent.ClassPathHttpResourceNode
from its parent.public String getResourcePath()
HttpResource
path.HttpResource
path.public String getClassPath()
HttpResource
.public boolean isDirectory()
true
if this is a directory.public ClassPathHttpResourceNode[] getChildren()
ClassPathHttpResourceNode
instances.ClassPathHttpResourceNode
instances.public ClassPathHttpResourceNode getChild(String childNodePath)
ClassPathHttpResourceNode
by the name.childNodePath
- Child node path.ClassPathHttpResourceNode
or null
if
no child by node path.Copyright © 2005–2016. All rights reserved.