Class ClassPathNode
java.lang.Object
net.officefloor.web.resource.classpath.ClassPathNode
Node on the class path that may be retrieved as a
HttpResource.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionClassPathNode(String nodePath, String resourcePath, String classPath, boolean isDirectory) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassPathNodecreateClassPathResourceTree(String classpathPrefix) Creates theClassPathNodetree for availableHttpResourceinstances.Obtains the childClassPathNodeby the name.Obtains the childClassPathNodeinstances.Obtains the class path for thisHttpResource.Obtains the path of thisClassPathNodefrom its parent.Obtains theHttpResourcepath.booleanIndicates if this is a directory.
-
Constructor Details
-
ClassPathNode
Initiate.- Parameters:
nodePath- Path of this node relative to its parent.resourcePath-HttpResourcepath to this node.classPath- Class path to this node.isDirectory-trueif this node is a directory (otherwise a file).
-
-
Method Details
-
createClassPathResourceTree
Creates theClassPathNodetree for availableHttpResourceinstances.- Parameters:
classpathPrefix- The prefix on the class path to locate resources for the tree.nullfor the entire class path.- Returns:
ClassPathNode.
-
getNodePath
Obtains the path of thisClassPathNodefrom its parent.- Returns:
- Path of this
ClassPathNodefrom its parent.
-
getResourcePath
Obtains theHttpResourcepath.- Returns:
HttpResourcepath.
-
getClassPath
Obtains the class path for thisHttpResource.- Returns:
- Class path.
-
isDirectory
public boolean isDirectory()Indicates if this is a directory.- Returns:
trueif this is a directory.
-
getChildren
Obtains the childClassPathNodeinstances.- Returns:
- Child
ClassPathNodeinstances.
-
getChild
Obtains the childClassPathNodeby the name.- Parameters:
childNodePath- Child node path.- Returns:
- Child
ClassPathNodeornullif no child by node path.
-