Class ClassPathNode
- java.lang.Object
-
- net.officefloor.web.resource.classpath.ClassPathNode
-
public class ClassPathNode extends java.lang.ObjectNode on the class path that may be retrieved as aHttpResource.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClassPathNode(java.lang.String nodePath, java.lang.String resourcePath, java.lang.String classPath, boolean isDirectory)Initiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClassPathNodecreateClassPathResourceTree(java.lang.String classpathPrefix)Creates theClassPathNodetree for availableHttpResourceinstances.ClassPathNodegetChild(java.lang.String childNodePath)Obtains the childClassPathNodeby the name.ClassPathNode[]getChildren()Obtains the childClassPathNodeinstances.java.lang.StringgetClassPath()Obtains the class path for thisHttpResource.java.lang.StringgetNodePath()Obtains the path of thisClassPathNodefrom its parent.java.lang.StringgetResourcePath()Obtains theHttpResourcepath.booleanisDirectory()Indicates if this is a directory.
-
-
-
Constructor Detail
-
ClassPathNode
public ClassPathNode(java.lang.String nodePath, java.lang.String resourcePath, java.lang.String classPath, boolean isDirectory)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 Detail
-
createClassPathResourceTree
public static ClassPathNode createClassPathResourceTree(java.lang.String classpathPrefix)
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
public java.lang.String getNodePath()
Obtains the path of thisClassPathNodefrom its parent.- Returns:
- Path of this
ClassPathNodefrom its parent.
-
getResourcePath
public java.lang.String getResourcePath()
Obtains theHttpResourcepath.- Returns:
HttpResourcepath.
-
getClassPath
public java.lang.String 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
public ClassPathNode[] getChildren()
Obtains the childClassPathNodeinstances.- Returns:
- Child
ClassPathNodeinstances.
-
getChild
public ClassPathNode getChild(java.lang.String childNodePath)
Obtains the childClassPathNodeby the name.- Parameters:
childNodePath- Child node path.- Returns:
- Child
ClassPathNodeornullif no child by node path.
-
-