| java.lang.Object com.sun.mobile.util.ResourceLookup
ResourceLookup | public class ResourceLookup (Code) | | ResourceLookup is a partial replacement for the IS implementation of
FileLookup. It performs the equivalent of "fstat" using ServletContext.getResource(),
thus increasing web container independence. It also adds an additional qualifying
parameter, "subComponent", which is intended to further qualify the "component"
parameter, e.g. mail/exchange, cal/notes, ab/sun-one, etc.
ResourceLookup should follow same look up pattern of Java Resource Bundle Lookup
Failure to do so results in messages in mixed languages
Java lookup mechansim is if platform locale is ja_JP
Resource Bundle locale is zh_CN
the lookup sequence is rb_zh_CN, rb_zh, rb_JA_JP, rb_ja, rb
ie we can't fall back to rb if zh resource bundle is not found
Hence We have added more steps to file lookup
|
Method Summary | |
public static String | getFirstExisting(ServletContext context, String type, String locale, String component, String subComponent, String clientPath, String filename, String resourceDir, boolean enableCache) The getFirstExisting() method will return the first existing file
in the ordered search paths. | public static String | getFirstExisting(ServletContext context, String type, String locale, String component, String subComponent, String orgFilePath, String clientPath, String filename, String resourceDir, boolean enableCache) The getFirstExisting() method will return the first existing file
in the ordered search paths. |
getFirstExisting | public static String getFirstExisting(ServletContext context, String type, String locale, String component, String subComponent, String clientPath, String filename, String resourceDir, boolean enableCache)(Code) | | The getFirstExisting() method will return the first existing file
in the ordered search paths.
Parameters: type - (an arbitrary profile-stored string) Parameters: locale - Parameters: component - Parameters: subComponent - Parameters: clientPath - Parameters: filename - Parameters: resourceDir - (absolute path of template base directory) Parameters: enableCache - (boolean on whether to cache previously returned files, restart required for changes when false) String first existing resource in the ordered search paths. |
getFirstExisting | public static String getFirstExisting(ServletContext context, String type, String locale, String component, String subComponent, String orgFilePath, String clientPath, String filename, String resourceDir, boolean enableCache)(Code) | | The getFirstExisting() method will return the first existing file
in the ordered search paths.
Parameters: type - (an arbitrary profile-stored string) Parameters: locale - Parameters: component - Parameters: subComponent - Parameters: clientPath - Parameters: orgFilePath - Parameters: filename - Parameters: resourceDir - (absolute path of template base directory) Parameters: enableCache - (boolean on whether to cache previously returned files, restart required for changes when false) String first existing resource in the ordered search paths. |
|
|