Class WebappDirectoryManager

java.lang.Object
org.eclnt.jsfserver.util.webappfiles.WebappDirectoryManager

public class WebappDirectoryManager extends Object
Access to directory structure of all files of a web applicaiton - consisting out of:

1. files from web content ("classical web application resources")

2. files from resources that are loaded via class loader

Because a class loader does not support querying of directory structures there is a special mechanism to overcome: a jar file can include a file "/eclntdirectoryinfo.xml" in which the directories of the jar file (or at least the ones that should be managed here) are published. The structure of this file is a simple XML definition:

 
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <dir name="">
     <dir name="eclnt">
         <dir name="risc">
             <dir name="i18n">
                 <file name="country_AE.xml"/>
                 <file name="country_AL.xml"/>
                 <file name="country_AR.xml"/>
                 <file name="country_AT.xml"/>
     etc.
 
 
  • Field Details

  • Constructor Details

    • WebappDirectoryManager

      public WebappDirectoryManager()
  • Method Details

    • initialize

      public static void initialize()
    • reset

      public static void reset()
    • getRoot

      public static CLDirectoryInfo getRoot()
    • getDirectories

      public static List<String> getDirectories(String dirPath)
    • getFiles

      public static List<String> getFiles(String dirPath)
    • readCombinedFromClassloader

      public static CLDirectoryInfo readCombinedFromClassloader(ClassLoader cl)
      Reads all /eclntdirectoryinfo.xml-files that are available in the classloader environment and combines them to form one.