com.elasticpath.persistence
Interface PropertiesDao

All Known Implementing Classes:
PropertiesDaoImpl

public interface PropertiesDao

Reads data from properties files.


Method Summary
 ElasticPath getElasticPath()
          Get the ElasticPath instance.
 java.util.Properties getPropertiesFile(java.lang.String propertyFileName)
          Get the properties of the given filename, takes filename with properties extension or without extension.
 java.util.Map loadProperties()
          Returns a properties map where the keys are properties file names and the values are Properties objects.
 void setElasticPath(ElasticPath elasticPath)
          Set the ElasticPath instance.
 void setPropertiesDir(java.lang.String propertiesDir)
          Set the name of the alternative properties directory.
 void storePropertiesFile(java.util.Properties property, java.lang.String propertyFileName)
          Persist the properties object to file, takes filename with properties extension or without extension.
 

Method Detail

getElasticPath

ElasticPath getElasticPath()
Get the ElasticPath instance.

Returns:
ElasticPath instance.

getPropertiesFile

java.util.Properties getPropertiesFile(java.lang.String propertyFileName)
Get the properties of the given filename, takes filename with properties extension or without extension.

Parameters:
propertyFileName - the filename of the properties file
Returns:
the properties object of the provided file

loadProperties

java.util.Map loadProperties()
Returns a properties map where the keys are properties file names and the values are Properties objects.

Returns:
the Map of properties file names to Properties objects

setElasticPath

void setElasticPath(ElasticPath elasticPath)
Set the ElasticPath instance.

Parameters:
elasticPath - the instance of ElasticPath

setPropertiesDir

void setPropertiesDir(java.lang.String propertiesDir)
Set the name of the alternative properties directory. If it is not set, the default one -- "WEB-INF/conf/resources" will be used.

Parameters:
propertiesDir - the directory containing properties files

storePropertiesFile

void storePropertiesFile(java.util.Properties property,
                         java.lang.String propertyFileName)
Persist the properties object to file, takes filename with properties extension or without extension.

Parameters:
property - the properties object to store to file
propertyFileName - the filename for the properties