public abstract class AbstractFileResourceSet extends AbstractResourceSet
Lifecycle.SingleUse
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String[] |
EMPTY_STRING_ARRAY |
sm
AFTER_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
Modifier | Constructor and Description |
---|---|
protected |
AbstractFileResourceSet(java.lang.String internalPath) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
checkType(java.io.File file) |
protected java.io.File |
file(java.lang.String name,
boolean mustExist) |
void |
gc()
Implementations may cache some information to improve performance.
|
java.net.URL |
getBaseUrl()
Obtain the base URL for this set of resources.
|
protected java.io.File |
getFileBase() |
protected void |
initInternal() |
boolean |
isReadOnly()
Obtains the current value of the read-only setting for this set of
resources.
|
void |
setReadOnly(boolean readOnly)
Configures whether or not this set of resources is read-only.
|
checkPath, destroyInternal, getBase, getClassLoaderOnly, getInternalPath, getManifest, getRoot, getStaticOnly, getWebAppMount, setBase, setClassLoaderOnly, setInternalPath, setManifest, setRoot, setStaticOnly, setWebAppMount, startInternal, stopInternal
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResource, list, listWebAppPaths, mkdir, write
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
protected AbstractFileResourceSet(java.lang.String internalPath)
protected final java.io.File getFileBase()
public void setReadOnly(boolean readOnly)
WebResourceSet
readOnly
- true
if this set of resources should be
configured to be read-onlypublic boolean isReadOnly()
WebResourceSet
true
if this set of resources is configured to be
read-only, otherwise false
protected final java.io.File file(java.lang.String name, boolean mustExist)
public java.net.URL getBaseUrl()
WebResourceSet
public void gc()
This is a NO-OP by default for File based resource sets.
protected void initInternal() throws LifecycleException
initInternal
in class LifecycleBase
LifecycleException
protected abstract void checkType(java.io.File file)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.