Package org.apache.catalina.webresources
Class AbstractFileResourceSet
- java.lang.Object
- 
- org.apache.catalina.util.LifecycleBase
- 
- org.apache.catalina.webresources.AbstractResourceSet
- 
- org.apache.catalina.webresources.AbstractFileResourceSet
 
 
 
- 
- All Implemented Interfaces:
- Lifecycle,- WebResourceSet
 - Direct Known Subclasses:
- DirResourceSet,- FileResourceSet
 
 public abstract class AbstractFileResourceSet extends AbstractResourceSet 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static java.lang.String[]EMPTY_STRING_ARRAY- 
Fields inherited from class org.apache.catalina.webresources.AbstractResourceSetsm
 - 
Fields inherited from interface org.apache.catalina.LifecycleAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractFileResourceSet(java.lang.String internalPath)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckType(java.io.File file)protected java.io.Filefile(java.lang.String name, boolean mustExist)voidgc()Implementations may cache some information to improve performance.java.net.URLgetBaseUrl()Obtain the base URL for this set of resources.protected java.io.FilegetFileBase()protected voidinitInternal()Sub-classes implement this method to perform any instance initialisation required.booleanisReadOnly()Obtains the current value of the read-only setting for this set of resources.protected voidlogIgnoredSymlink(java.lang.String contextPath, java.lang.String absPath, java.lang.String canPath)voidsetReadOnly(boolean readOnly)Configures whether or not this set of resources is read-only.- 
Methods inherited from class org.apache.catalina.webresources.AbstractResourceSetcheckPath, destroyInternal, getBase, getClassLoaderOnly, getInternalPath, getManifest, getRoot, getStaticOnly, getWebAppMount, setBase, setClassLoaderOnly, setInternalPath, setManifest, setRoot, setStaticOnly, setWebAppMount, startInternal, stopInternal
 - 
Methods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.catalina.LifecycleaddLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
 - 
Methods inherited from interface org.apache.catalina.WebResourceSetgetResource, list, listWebAppPaths, mkdir, write
 
- 
 
- 
- 
- 
Method Detail- 
getFileBaseprotected final java.io.File getFileBase() 
 - 
setReadOnlypublic void setReadOnly(boolean readOnly) Description copied from interface:WebResourceSetConfigures whether or not this set of resources is read-only.- Parameters:
- readOnly-- trueif this set of resources should be configured to be read-only
 
 - 
isReadOnlypublic boolean isReadOnly() Description copied from interface:WebResourceSetObtains the current value of the read-only setting for this set of resources.- Returns:
- trueif this set of resources is configured to be read-only, otherwise- false
 
 - 
fileprotected final java.io.File file(java.lang.String name, boolean mustExist)
 - 
logIgnoredSymlinkprotected void logIgnoredSymlink(java.lang.String contextPath, java.lang.String absPath, java.lang.String canPath)
 - 
getBaseUrlpublic java.net.URL getBaseUrl() Description copied from interface:WebResourceSetObtain the base URL for this set of resources. One of the uses of this is to grant read permissions to the resources when running under a security manager.- Returns:
- The base URL for this set of resources
 
 - 
gcpublic void gc() Implementations may cache some information to improve performance. This method triggers the clean-up of those resources.This is a NO-OP by default for File based resource sets. 
 - 
initInternalprotected void initInternal() throws LifecycleExceptionDescription copied from class:LifecycleBaseSub-classes implement this method to perform any instance initialisation required.- Specified by:
- initInternalin class- LifecycleBase
- Throws:
- LifecycleException- If the initialisation fails
 
 - 
checkTypeprotected abstract void checkType(java.io.File file) 
 
- 
 
-