Class ClasspathResourceSystem
java.lang.Object
net.officefloor.web.resource.classpath.ClasspathResourceSystem
- All Implemented Interfaces:
ResourceSystem
Locates a
HttpFile from a ClassLoader.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionClasspathResourceSystem(ResourceSystemContext context, ClassLoader classLoader) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionObtains theClassPathNodefor resource path.getResource(String path) Obtains thePathto the resource.
-
Constructor Details
-
ClasspathResourceSystem
public ClasspathResourceSystem(ResourceSystemContext context, ClassLoader classLoader) throws IOException Instantiate.- Parameters:
context-ResourceSystemContext.classLoader-ClassLoader.- Throws:
IOException- If fails to initiate resources from the class path.
-
-
Method Details
-
getNode
Obtains theClassPathNodefor resource path.- Parameters:
path- Resource path.- Returns:
ClassPathNodefor resource path ornullif no resource.
-
getResource
Description copied from interface:ResourceSystemObtains thePathto the resource.- Specified by:
getResourcein interfaceResourceSystem- Parameters:
path- Path for the resource.- Returns:
Pathif resource found, otherwisenull.- Throws:
IOException- If failure in obtainingPath.
-