Class AbstractResourceSet

java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.webresources.AbstractResourceSet
All Implemented Interfaces:
Lifecycle, WebResourceSet
Direct Known Subclasses:
AbstractArchiveResourceSet, AbstractFileResourceSet

public abstract class AbstractResourceSet extends LifecycleBase implements WebResourceSet
Abstract WebResourceSet implementation that provides common functionality for all web resource set implementations.
  • Field Details

    • sm

      protected static final StringManager sm
      The string manager for this class.
  • Constructor Details

    • AbstractResourceSet

      protected AbstractResourceSet()
      Constructs a new AbstractResourceSet.
  • Method Details

    • checkPath

      protected final void checkPath(String path)
      Checks that the given path is valid.
      Parameters:
      path - The path to check
      Throws:
      IllegalArgumentException - if the path is invalid
    • setRoot

      public final void setRoot(WebResourceRoot root)
      Sets the root.
      Specified by:
      setRoot in interface WebResourceSet
      Parameters:
      root - The root
    • getRoot

      protected final WebResourceRoot getRoot()
      Gets the root.
      Returns:
      The root
    • getInternalPath

      protected final String getInternalPath()
      Gets the internal path.
      Returns:
      The internal path
    • setInternalPath

      public final void setInternalPath(String internalPath)
      Sets the internal path.
      Parameters:
      internalPath - The internal path
    • setWebAppMount

      public final void setWebAppMount(String webAppMount)
      Sets the web app mount.
      Parameters:
      webAppMount - The web app mount
    • getWebAppMount

      protected final String getWebAppMount()
      Gets the web app mount.
      Returns:
      The web app mount
    • isPathMounted

      protected boolean isPathMounted(String path, String webAppMount)
      Checks if the given path is mounted at the given web app mount.
      Parameters:
      path - The path to check
      webAppMount - The web app mount
      Returns:
      true if the path is mounted
    • setBase

      public final void setBase(String base)
      Sets the base.
      Parameters:
      base - The base
    • getBase

      protected final String getBase()
      Gets the base.
      Returns:
      The base
    • getClassLoaderOnly

      public boolean getClassLoaderOnly()
      Checks if this resource set is class loader only.
      Specified by:
      getClassLoaderOnly in interface WebResourceSet
      Returns:
      true if this resource set is class loader only
    • setClassLoaderOnly

      public void setClassLoaderOnly(boolean classLoaderOnly)
      Sets whether this resource set is class loader only.
      Specified by:
      setClassLoaderOnly in interface WebResourceSet
      Parameters:
      classLoaderOnly - true if this resource set is class loader only
    • getStaticOnly

      public boolean getStaticOnly()
      Checks if this resource set is static only.
      Specified by:
      getStaticOnly in interface WebResourceSet
      Returns:
      true if this resource set is static only
    • setStaticOnly

      public void setStaticOnly(boolean staticOnly)
      Sets whether this resource set is static only.
      Specified by:
      setStaticOnly in interface WebResourceSet
      Parameters:
      staticOnly - true if this resource set is static only
    • setManifest

      protected final void setManifest(Manifest manifest)
      Sets the manifest.
      Parameters:
      manifest - The manifest
    • getManifest

      protected final Manifest getManifest()
      Gets the manifest.
      Returns:
      The manifest
    • startInternal

      protected final void startInternal() throws LifecycleException
      Starts this resource set.
      Specified by:
      startInternal in class LifecycleBase
      Throws:
      LifecycleException - if a startup error occurs
    • stopInternal

      protected final void stopInternal() throws LifecycleException
      Stops this resource set.
      Specified by:
      stopInternal in class LifecycleBase
      Throws:
      LifecycleException - if a shutdown error occurs
    • destroyInternal

      protected final void destroyInternal() throws LifecycleException
      Destroys this resource set.
      Specified by:
      destroyInternal in class LifecycleBase
      Throws:
      LifecycleException - if a destroy error occurs