Class AbstractFileResourceSet

All Implemented Interfaces:
Lifecycle, WebResourceSet
Direct Known Subclasses:
DirResourceSet, FileResourceSet

public abstract class AbstractFileResourceSet extends AbstractResourceSet
  • Field Details


      protected static final String[] EMPTY_STRING_ARRAY
  • Constructor Details

    • AbstractFileResourceSet

      protected AbstractFileResourceSet(String internalPath)
  • Method Details

    • getFileBase

      protected final File getFileBase()
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Description copied from interface: WebResourceSet
      Configures whether or not this set of resources is read-only.
      readOnly - true if this set of resources should be configured to be read-only
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: WebResourceSet
      Obtains the current value of the read-only setting for this set of resources.
      true if this set of resources is configured to be read-only, otherwise false
    • file

      protected final File file(String name, boolean mustExist)
    • logIgnoredSymlink

      protected void logIgnoredSymlink(String contextPath, String absPath, String canPath)
    • getBaseUrl

      public URL getBaseUrl()
      Description copied from interface: WebResourceSet
      Obtain 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.
      The base URL for this set of resources
    • gc

      public 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.

    • initInternal

      protected void initInternal() throws LifecycleException
      Description copied from class: LifecycleBase
      Sub-classes implement this method to perform any instance initialisation required.
      Specified by:
      initInternal in class LifecycleBase
      LifecycleException - If the initialisation fails
    • checkType

      protected abstract void checkType(File file)