|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.publication.servlets.cache.FileCache
public class FileCache
Contrary to what the name suggests, FileCache will not cache files. Most of the files that are read are of a specific kind (e.g. a "zpad.conf"). Cacheing is done by its kind, not at the File level.
| Field Summary | |
|---|---|
protected static HashMap |
_fileExistsMap
Cache of filename/exists pairs. |
static String |
BASEURL
Symbolic representations of specific URLs. |
static String |
BIN
|
static String |
CATEGORIES
|
static String |
CODEBASES
|
static String |
CONF
|
static String |
COVERS
|
static String |
DEFAULTS
|
static String |
DEFAULTSUBSCRIPTIONS
|
static String |
DOCUMENTROOT
Vhost configuration directory-tree, e.g. |
static String |
HOST
Code internal substitutions patterns. |
static String |
I18N
|
static String |
LOGS
Vhost logging and reports, e.g. |
static String |
MAILLOG
|
static String |
PPATH
|
static String |
PS
|
static String |
REPORTS
|
static String |
RESOURCES
Symbolic representations of specific paths. |
static String |
SERVERPATH
|
static String |
SHOPORDERS
|
static String |
SHOPROOT
Vhost shop directories |
static String |
SYSTEMCATEGORIES
|
static String |
SYSTEMSUBSCRIPTIONS
|
static String |
TEMPLATES
Vhost templates, e.g. |
static String |
USERFILES
|
static String |
USERNAME
|
static String |
USERPATH
|
static String |
USERPHYSURL
|
static String |
USERS
|
static String |
USERURL
|
static String |
VIRTUAL_HOST
Base directory for a specific vhost, e.g. |
| Constructor Summary | |
|---|---|
FileCache()
|
|
| Method Summary | |
|---|---|
protected static String |
_getPath(javax.servlet.http.HttpServletRequest request,
String host,
UserInfo userInfo,
String fileDescription)
|
protected static Properties |
_getProperties(String fileName)
Read a Properties from a file. |
static String |
_getString(String fileName)
Read a String from a file. |
protected static String |
_internationalizePath(javax.servlet.http.HttpServletRequest request,
String path)
Substitute I18N code internal substitution patterns in a path. |
protected static void |
_putProperties(Properties p,
String fileName)
Store a Properties in a file. |
protected static void |
_putString(String s,
String filePath)
Store a String in a file. |
static boolean |
checkFileExists(String filePath)
Dynamically test whether a file exists. |
static boolean |
fileExists(String filePath)
Test whether a file exists and cache the result forever -- THEREFORE USE FOR "STATIC" FILES ONLY! |
static String |
getFixedLanguagePath(String language,
String path)
|
static Locale |
getLocale(javax.servlet.http.HttpServletRequest request,
String fileDescription)
For a particular file and the current request, find out what the Locale of the file is. |
static String |
getPath(javax.servlet.http.HttpServletRequest request,
String fileDescription)
Substitute all code internal substitution patterns in a path. |
static String |
getPath(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String fileDescription)
Substitute all code internal substitution patterns in a path. |
static String |
getPath(String host,
String fileDescription)
Substitute all code internal substitution patterns in a path. |
static String |
getPath(String host,
UserInfo userInfo,
String fileDescription)
|
static Properties |
getProperties(javax.servlet.http.HttpServletRequest request,
String fileDescription)
|
static Properties |
getProperties(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String fileDescription)
Read a Properties from a file. |
static Properties |
getProperties(String fileDescription)
|
static Properties |
getProperties(String host,
String fileDescription)
Read a Properties from a file. |
static String |
getString(javax.servlet.http.HttpServletRequest request,
String fileDescription)
|
static String |
getString(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String fileDescription)
Read a String from a file. |
static String |
getString(String fileDescription)
|
static String |
getString(String host,
String fileDescription)
Read a String from a file. |
static void |
putProperties(javax.servlet.http.HttpServletRequest request,
Properties p,
String fileDescription)
|
static void |
putProperties(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
Properties p,
String fileDescription)
Store a Properties in a file. |
static void |
putProperties(Properties p,
String fileDescription)
|
static void |
putProperties(String host,
Properties p,
String fileDescription)
Store a Properties in a file. |
static void |
putString(javax.servlet.http.HttpServletRequest request,
String s,
String fileDescription)
|
static void |
putString(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String s,
String fileDescription)
Store a String in a file. |
static void |
putString(String s,
String fileDescription)
|
static void |
putString(String host,
String s,
String fileDescription)
Store a String in a file. |
static void |
refresh(String host)
Refresh, i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static HashMap _fileExistsMap
public static String HOST
public static String I18N
public static String PPATH
public static String USERNAME
public static String SERVERPATH
public static String PS
public static String RESOURCES
public static String CODEBASES
public static String VIRTUAL_HOST
public static String DOCUMENTROOT
public static String BIN
public static String CONF
public static String SYSTEMSUBSCRIPTIONS
public static String SYSTEMCATEGORIES
public static String CATEGORIES
public static String DEFAULTS
public static String DEFAULTSUBSCRIPTIONS
public static String TEMPLATES
public static String LOGS
public static String REPORTS
public static String MAILLOG
public static String COVERS
public static String USERS
public static String USERPATH
public static String USERFILES
public static String SHOPROOT
public static String SHOPORDERS
public static String BASEURL
public static String USERURL
public static String USERPHYSURL
| Constructor Detail |
|---|
public FileCache()
| Method Detail |
|---|
public static String getString(String fileDescription)
getString(HttpServletRequest, UserInfo, String)
public static String getString(javax.servlet.http.HttpServletRequest request,
String fileDescription)
getString(HttpServletRequest, UserInfo, String)
public static String getString(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String fileDescription)
request - if not null, it contains fields for code internal substitutionsuserInfo - if not null, it contains fields for code internal substitutionsfileDescription - the path, optionally containing code internal substitution patterns
public static String getString(String host,
String fileDescription)
host - if not null, it contains fields for code internal substitutionsfileDescription - the path, optionally containing code internal substitution patternspublic static String _getString(String fileName)
fileName - the full path
public static void putString(String s,
String fileDescription)
putString(HttpServletRequest, UserInfo, String, String)
public static void putString(javax.servlet.http.HttpServletRequest request,
String s,
String fileDescription)
putString(HttpServletRequest, UserInfo, String, String)
public static void putString(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String s,
String fileDescription)
request - if not null, it contains fields for code internal substitutionsuserInfo - if not null, it contains fields for code internal substitutionss - the string to be storedfileDescription - the path, optionally containing code internal substitution patterns
public static void putString(String host,
String s,
String fileDescription)
host - if not null, it contains fields for code internal substitutionss - the string to be storedfileDescription - the path, optionally containing code internal substitution patterns
protected static void _putString(String s,
String filePath)
s - the string to be storedfilePath - the full path of the filepublic static Properties getProperties(String fileDescription)
getProperties(HttpServletRequest, UserInfo, String)
public static Properties getProperties(javax.servlet.http.HttpServletRequest request,
String fileDescription)
getProperties(HttpServletRequest, UserInfo, String)
public static Properties getProperties(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String fileDescription)
request - if not null, it contains fields for code internal substitutionsuserInfo - if not null, it contains fields for code internal substitutionsfileDescription - the path, optionally containing code internal substitution patterns
public static Properties getProperties(String host,
String fileDescription)
host - if not null, it contains fields for code internal substitutionsfileDescription - the path, optionally containing code internal substitution patternsprotected static Properties _getProperties(String fileName)
fileName - the full path of the file
public static void putProperties(Properties p,
String fileDescription)
putProperties(HttpServletRequest, UserInfo, Properties, String)
public static void putProperties(javax.servlet.http.HttpServletRequest request,
Properties p,
String fileDescription)
putProperties(HttpServletRequest, UserInfo, Properties, String)
public static void putProperties(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
Properties p,
String fileDescription)
request - if not null, it contains fields for code internal substitutionsuserInfo - if not null, it contains fields for code internal substitutionsp - the Properties to be storedfileDescription - the path, optionally containing code internal substitution patterns
public static void putProperties(String host,
Properties p,
String fileDescription)
host - if not null, it contains fields for code internal substitutionsp - the Properties to be storedfileDescription - the path, optionally containing code internal substitution patterns
protected static void _putProperties(Properties p,
String fileName)
p - the PropertiesfileName - the full path of the file
public static String getPath(javax.servlet.http.HttpServletRequest request,
String fileDescription)
request - if not null, it contains fields for code internal substitutionsfileDescription - the path, optionally containing code internal substitution patterns
public static String getPath(javax.servlet.http.HttpServletRequest request,
UserInfo userInfo,
String fileDescription)
request - if not null, it contains fields for code internal substitutionsuserInfo - if not null, it contains fields for code internal substitutionsfileDescription - the path, optionally containing code internal substitution patterns
public static String getPath(String host,
String fileDescription)
host - if not null, it contains the host's namefileDescription - the path, optionally containing code internal substitution patterns
public static String getPath(String host,
UserInfo userInfo,
String fileDescription)
protected static String _getPath(javax.servlet.http.HttpServletRequest request,
String host,
UserInfo userInfo,
String fileDescription)
protected static String _internationalizePath(javax.servlet.http.HttpServletRequest request,
String path)
request - if not null, it contains fields for I18N code internal substitutionspath - the path, optionally containing I18N code internal substitution patterns
public static Locale getLocale(javax.servlet.http.HttpServletRequest request,
String fileDescription)
public static void refresh(String host)
host - the hostpublic static boolean fileExists(String filePath)
filePath - the full path of the file
public static String getFixedLanguagePath(String language,
String path)
public static boolean checkFileExists(String filePath)
filePath - the full path of the file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||