Class VirtualResource
java.lang.Object
org.apache.catalina.webresources.EmptyResource
org.apache.catalina.webresources.VirtualResource
- All Implemented Interfaces:
WebResource
A virtual resource that represents a directory entry created on-the-fly.
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualResource(WebResourceRoot root, String webAppPath, String name) Constructs a new VirtualResource. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of this resource.booleanChecks if this resource is a directory.booleanIndicates if this resource is required for applications to correctly scan the file structure but that does not exist in either the main or any additionalWebResourceSet.Methods inherited from class EmptyResource
canRead, delete, exists, getCanonicalPath, getCertificates, getCodeBase, getContent, getContentLength, getCreation, getETag, getInputStream, getLastModified, getLastModifiedHttp, getManifest, getMimeType, getURL, getWebappPath, getWebResourceRoot, isFile, setMimeTypeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebResource
getStrongETag
-
Constructor Details
-
VirtualResource
Constructs a new VirtualResource.- Parameters:
root- The root resource setwebAppPath- The web application pathname- The resource name
-
-
Method Details
-
isVirtual
public boolean isVirtual()Description copied from interface:WebResourceIndicates if this resource is required for applications to correctly scan the file structure but that does not exist in either the main or any additionalWebResourceSet. For example, if an external directory is mapped to /WEB-INF/lib in an otherwise empty web application, /WEB-INF will be represented as a virtual resource.- Specified by:
isVirtualin interfaceWebResource- Overrides:
isVirtualin classEmptyResource- Returns:
truefor a virtual resource
-
isDirectory
public boolean isDirectory()Description copied from interface:WebResourceChecks if this resource is a directory.- Specified by:
isDirectoryin interfaceWebResource- Overrides:
isDirectoryin classEmptyResource- Returns:
File.isDirectory().
-
getName
Description copied from interface:WebResourceReturns the name of this resource.- Specified by:
getNamein interfaceWebResource- Overrides:
getNamein classEmptyResource- Returns:
File.getName().
-