org.apache.struts2.util.fs

## Class JBossFileManager

- java.lang.Object
- - com.opensymphony.xwork2.util.fs.DefaultFileManager
  - - org.apache.struts2.util.fs.JBossFileManager

- All Implemented Interfaces:
    FileManager

      public class JBossFileManager
      extends DefaultFileManager

  FileManager implementation used with JBoss AS

- - ### Field Summary

    - ### Fields inherited from class com.opensymphony.xwork2.util.fs.DefaultFileManager

      `files, reloadingConfigs`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JBossFileManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<? extends URL>` | `getAllPhysicalUrls(URL url)`
    `protected URL` | `getJBossPhysicalUrl(URL url)` Try to determine physical file location.
    `protected boolean` | `isJBossUrl(URL fileUrl)` Check if given URL is pointing to JBoss 5 VFS resource
    `void` | `monitorFile(URL fileUrl)` Adds file to list of monitored files
    `URL` | `normalizeToFileProtocol(URL url)` Convert URLs to URLs with "file" protocol
    `boolean` | `support()` Indicate if given implementation supports current OS File System

    - ### Methods inherited from class com.opensymphony.xwork2.util.fs.DefaultFileManager

      `fileNeedsReloading, fileNeedsReloading, internal, isJarURL, loadFile, setReloadingConfigs`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JBossFileManager

          public JBossFileManager()

  - ### Method Detail

    - #### support

          public boolean support()

      Description copied from interface: `FileManager`
      Indicate if given implementation supports current OS File System
      Specified by:
        `support` in interface `FileManager`
      Overrides:
        `support` in class `DefaultFileManager`
      Returns:
        true if supports current OS File System

    - #### monitorFile

          public void monitorFile(URL fileUrl)

      Description copied from interface: `FileManager`
      Adds file to list of monitored files
      Specified by:
        `monitorFile` in interface `FileManager`
      Overrides:
        `monitorFile` in class `DefaultFileManager`
      Parameters:
        `fileUrl` - `URL` to file to be monitored

    - #### normalizeToFileProtocol

          public URL normalizeToFileProtocol(URL url)

      Description copied from interface: `FileManager`
      Convert URLs to URLs with "file" protocol
      Specified by:
        `normalizeToFileProtocol` in interface `FileManager`
      Overrides:
        `normalizeToFileProtocol` in class `DefaultFileManager`
      Parameters:
        `url` - URL to convert to a jar url
      Returns:
        a URL to a file, or null if the URL external form cannot be parsed

    - #### getAllPhysicalUrls

          public Collection<? extends URL> getAllPhysicalUrls(URL url)
                                                       throws IOException

      Specified by:
        `getAllPhysicalUrls` in interface `FileManager`
      Overrides:
        `getAllPhysicalUrls` in class `DefaultFileManager`
      Throws:
        `IOException`

    - #### isJBossUrl

          protected boolean isJBossUrl(URL fileUrl)

      Check if given URL is pointing to JBoss 5 VFS resource
      Parameters:
        `fileUrl` - file URL to check
      Returns:
        if given URL is pointing to JBoss 5 VFS resource

    - #### getJBossPhysicalUrl

          protected URL getJBossPhysicalUrl(URL url)
                                     throws IOException

      Try to determine physical file location.
      Parameters:
        `url` - JBoss VFS URL
      Returns:
        URL pointing to physical file or original URL
      Throws:
        `IOException` - If conversion fails

Copyright © 2000–2019 Apache Software Foundation. All rights reserved.