com.facetmap.servlet
Class PropertiesFilePersister

java.lang.Object
  extended by com.facetmap.servlet.PropertiesFilePersister

public class PropertiesFilePersister
extends java.lang.Object


Constructor Summary
PropertiesFilePersister(java.io.File propertiesFile)
           
PropertiesFilePersister(java.lang.String propertiesFileName)
           
PropertiesFilePersister(java.lang.String propertiesFileName, ServletContext servletContext)
           
PropertiesFilePersister(java.net.URL propertiesUrl)
           
 
Method Summary
 boolean canWrite()
           
static com.facetmap.servlet.PropertiesPersister createInServlet(java.lang.String resourceFilename, ServletContext servletContext)
          The resource here can be a web application resource (relative to the root of the webapp), or it can be a ClassLoader resource (relative to the CLASSPATH), or it can be a file on the filesystem.
 java.util.Properties read()
           
 void readInto(java.util.Properties props)
           
 void write(java.util.Properties props, java.lang.String info)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesFilePersister

public PropertiesFilePersister(java.lang.String propertiesFileName)

PropertiesFilePersister

public PropertiesFilePersister(java.lang.String propertiesFileName,
                               ServletContext servletContext)

PropertiesFilePersister

public PropertiesFilePersister(java.io.File propertiesFile)

PropertiesFilePersister

public PropertiesFilePersister(java.net.URL propertiesUrl)
Method Detail

createInServlet

public static com.facetmap.servlet.PropertiesPersister createInServlet(java.lang.String resourceFilename,
                                                                       ServletContext servletContext)
The resource here can be a web application resource (relative to the root of the webapp), or it can be a ClassLoader resource (relative to the CLASSPATH), or it can be a file on the filesystem. Some of these things are writeable as Files, and some are not.


read

public java.util.Properties read()
                          throws ConfigurationException
Throws:
ConfigurationException

readInto

public void readInto(java.util.Properties props)
              throws ConfigurationException
Throws:
ConfigurationException

write

public void write(java.util.Properties props,
                  java.lang.String info)
           throws ConfigurationException
Throws:
ConfigurationException

canWrite

public boolean canWrite()