|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ploin.pmf.impl.PropertiesLoader
public class PropertiesLoader
Description: Implementation of the IPropertiesLoader interface.
This class is responsible to read properties files.
| Constructor Summary | |
|---|---|
PropertiesLoader()
|
|
| Method Summary | |
|---|---|
String |
getDirectory()
Gets the path to the properties file. |
Properties |
getProperties(String client,
String name)
This method looks for a properties file with the given name "propName". It looks for a properties file in the following directories in this order: client directory mail directory class-root |
Properties |
getPropertiesOnlyClient(String client,
String name)
This method looks for a properties file with the given name "propertyFilename". It looks for the file only in the client-directory. |
Properties |
getPropertiesOnlyDirectory(String name)
This method looks for a properties file with the given name "propertyFilename". It looks for the file only in the mail-directory. |
Properties |
getPropertiesOnlyRoot(String name)
This method looks for a properties file with the given name "propertyFilename". It looks for the file only in the root-directory (class-root). |
String |
getPropFile()
Gets the name of the properties file. |
String |
getValue(String key)
Returns a message with the key "key" from the property file "propFile". |
String |
getValue(String client,
String key)
Returns a message with the key "key" from the property file. |
void |
replaceVariables(String client,
MailConfig mailConfig)
This method replaces all variables with keys like "${variable}" in the email-addresses of the receivers (to, cc, bcc) with values found in the mail.properties having the key "variable". |
void |
replaceVariables(TemplateConfig templateConfig)
This method replaces all variables with keys like "${variable}" in the map of the templateConfig with values found in the mail.properties having the key "variable". |
void |
setDirectory(String directory)
Sets the path to the properties file. |
void |
setPropFile(String propFile)
Sets the name of the properties file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesLoader()
| Method Detail |
|---|
public String getValue(String key)
throws MailFactoryException
IPropertiesLoader
getValue in interface IPropertiesLoaderkey - :the key to search
MailFactoryException
public String getValue(String client,
String key)
throws MailFactoryException
IPropertiesLoader
getValue in interface IPropertiesLoaderclient - :the client for the mailkey - :the key to search
MailFactoryException
public void replaceVariables(TemplateConfig templateConfig)
throws MailFactoryException
IPropertiesLoader
replaceVariables in interface IPropertiesLoadertemplateConfig - containing client, locale, template-name and map.
MailFactoryException
public void replaceVariables(String client,
MailConfig mailConfig)
throws MailFactoryException
IPropertiesLoader
replaceVariables in interface IPropertiesLoadermailConfig - containing receiver-Emailadresses (to, cc, bcc)
MailFactoryException
public Properties getProperties(String client,
String name)
throws MailFactoryException
IPropertiesLoader
getProperties in interface IPropertiesLoaderclient - - the client of the mailname - - the name of the properties file
MailFactoryException
public Properties getPropertiesOnlyClient(String client,
String name)
throws MailFactoryException
IPropertiesLoader
getPropertiesOnlyClient in interface IPropertiesLoaderclient - - the client of the mailname - - the file name of the properties file.
MailFactoryException
public Properties getPropertiesOnlyDirectory(String name)
throws MailFactoryException
IPropertiesLoader
getPropertiesOnlyDirectory in interface IPropertiesLoadername - - the client of the mail
MailFactoryException
public Properties getPropertiesOnlyRoot(String name)
throws MailFactoryException
IPropertiesLoader
getPropertiesOnlyRoot in interface IPropertiesLoadername - - the client of the mail
MailFactoryExceptionpublic String getDirectory()
IPropertiesLoader
getDirectory in interface IPropertiesLoaderpublic void setDirectory(String directory)
IPropertiesLoader
setDirectory in interface IPropertiesLoaderdirectory - - path to the directory there the mail-templates are placed.public String getPropFile()
IPropertiesLoader
getPropFile in interface IPropertiesLoaderpublic void setPropFile(String propFile)
IPropertiesLoader
setPropFile in interface IPropertiesLoaderpropFile - - the name of the properties files.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||