|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.wvs.client.pview.PViewCache
Manages the file cache used by the viewer
Supported API: false
Extendable: false
Field Summary | |
private Hashtable |
cache
|
private boolean |
debug
|
private String |
directoryCache
|
Constructor Summary | |
PViewCache()
Creates a new PViewCache. |
|
PViewCache(String directory)
Creates a new PViewCache. |
Method Summary | |
void |
addCacheEntry(String key,
String file,
int usedBy)
Adds a new entry to the cache |
void |
addCacheReference(String key,
int usedBy)
Returns a new unique filename in the cache |
void |
deleteCachedEntries(int usedBy)
Deletes a reference to an entry in the cache. |
private String |
directorySetup(String directory)
Initialize the directory |
String |
getCachedFilename(String key)
Returns the file name from the cache |
String |
getNewCacheFilename(String extension)
Returns a new unique filename in the cache |
boolean |
isDebug()
Returns the debug state |
boolean |
isInCache(String key)
Returns if the key is currently available from the cache |
boolean |
isInCache(String key,
int usedBy)
Returns if the key is currently available from the cache, and refernced by the specifed viewer |
void |
setDebug(boolean debug)
Switches debug information on/off |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Hashtable cache
private String directoryCache
private boolean debug
Constructor Detail |
public PViewCache()
public PViewCache(String directory)
Method Detail |
private String directorySetup(String directory)
directory
- the specified directory (it must already exist)
public void setDebug(boolean debug)
debug
- specifies if debug information is to be producedpublic boolean isDebug()
public String getNewCacheFilename(String extension)
extension
- to the filename
public void addCacheReference(String key, int usedBy)
key
- typically the url to the viewableusedBy
- a reference to the viewer, typically the HWND (window handle)public void addCacheEntry(String key, String file, int usedBy)
key
- typically the url to the viewablefile
- the file name in the cache directoryusedBy
- a reference to the viewer, typically the HWND (window handle)public boolean isInCache(String key)
key
- typically the url to the viewable
public boolean isInCache(String key, int usedBy)
key
- typically the url to the viewableusedBy
- a reference to the viewer, typically the HWND (window handle)
public String getCachedFilename(String key)
key
- typically the url to the viewable
public void deleteCachedEntries(int usedBy)
usedBy
- a reference to the viewer, typically the HWND (window handle)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |