|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.wsrf.utils.FilePersistenceHelper
This helper contains common functions for managing persistent information stored as files.
| Nested Class Summary | |
private static class |
FilePersistenceHelper.Filter
|
| Field Summary | |
protected Class |
beanClass
|
private static String |
FILE_PERSISTENCE_DIR
|
protected String |
fileSuffix
|
private static org.globus.util.I18n |
i18n
|
private static org.apache.commons.logging.Log |
logger
|
static String |
SERVER_ID
|
protected File |
storageDir
|
| Constructor Summary | |
FilePersistenceHelper(Class beanClass,
String suffix)
Creates FilePersistenceHelper with default storage directory based on the beanClass name and specified suffix. |
|
FilePersistenceHelper(Class beanClass,
String storageDir,
String suffix)
Creates FilePersistenceHelper with specific storage directory and file suffix. |
|
| Method Summary | |
Class |
getBeanClass()
|
private static String |
getDefaultStorageDir(Class beanClass)
|
String |
getFileSuffix()
|
File |
getKeyAsFile(Object key)
Create a file object based on the key supplied in parameter. |
private static String |
getServerID()
|
File |
getStorageDirectory()
|
List |
list()
This function returns the keys of the objects that have been stored. |
void |
remove(Object key)
|
void |
removeAll()
Removes all stored objects from file system. |
protected void |
setStorageDirectory(String strDir)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static org.globus.util.I18n i18n
public static final String SERVER_ID
private static final String FILE_PERSISTENCE_DIR
private static org.apache.commons.logging.Log logger
protected Class beanClass
protected File storageDir
protected String fileSuffix
| Constructor Detail |
public FilePersistenceHelper(Class beanClass,
String suffix)
throws IOException
public FilePersistenceHelper(Class beanClass,
String storageDir,
String suffix)
throws IOException
| Method Detail |
private static String getServerID()
private static String getDefaultStorageDir(Class beanClass)
throws IOException
IOException
protected void setStorageDirectory(String strDir)
throws IOException
IOExceptionpublic File getStorageDirectory()
public String getFileSuffix()
public Class getBeanClass()
public File getKeyAsFile(Object key)
file name :== (class name)_(key scalar value).xml
where:
key - the key of the object
public void remove(Object key)
throws ResourceException
ResourceException
public List list()
throws IOException
IOException
public void removeAll()
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||