|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alltimeflashdreamer.mailwebform.MailFormProvider
Title: MailFormProvider
Description: This class stores the values for one registered mailform
provider. It is able to return the each separate as well as the highest
active setting per type (see description of MailWebFormServlet) and reload
the property files dynamically.
Field Summary |
Constructor Summary | |
(package private) |
MailFormProvider(String sName,
GlobalProperties globalProperties)
The constructor receives the name of the current mailform provider together with the pointer to the ResourceBundle where the default settings are stored. |
Method Summary | |
String |
getDefaultErrorURL()
Returns the default error url setting. |
String |
getDefaultSMTPHost()
Returns the default SMTP host setting. |
int |
getDefaultSMTPPort()
Returns the default SMTP port setting. |
String |
getDefaultSuccessURL()
Returns the default success url setting. |
String |
getDefaultTemplate()
Returns the default template setting. |
String |
getDefaultToAddress()
Returns the default to-address setting. |
String |
getDefaultToName()
Returns the default to-name setting. |
String |
getErrorURL()
Returns the error url setting. |
(package private) String[] |
getGlobalPropertiesPart()
Returns an array filled with strings formatted like "<key>=<value>", ready to be written into the global properties file, together with the description of the section wherein these strings are located in the file. |
String |
getIndividualErrorURL()
Returns the individual error url setting. |
String |
getIndividualSMTPHost()
Returns the individual SMTP host setting. |
int |
getIndividualSMTPPort()
Returns the individual SMTP host setting. |
String |
getIndividualSuccessURL()
Returns the individual success url setting. |
String |
getIndividualTemplate()
Returns the individual template setting. |
String |
getIndividualToAddress()
Returns the individual to-address setting. |
String |
getIndividualToName()
Returns the individual to-name setting. |
String |
getName()
Returns the name of this provider. |
String |
getPassword()
Returns the encoded password that the provider uses to log in into the admin tool. |
String |
getProviderDirectory()
Returns the value of the provider's individual path property. |
String |
getSMTPHost()
Returns the individual or the SMTP host setting or null, if both aren't defined. |
int |
getSMTPPort()
Returns the SMTP port setting. |
String |
getSuccessURL()
Returns the success url setting. |
String |
getTemplate()
Returns the template setting. |
String |
getToAddress()
Returns the individual or the default to-address setting or null, if both aren't defined. |
String |
getToName()
Returns the individual or the default to-name setting or null, if both aren't defined. |
boolean |
isSMTPOverwritingAllowed()
Returns whether the overwriting of the default SMTP server is allowed for this provider or not. |
(package private) boolean |
isSystemProvider()
Returns whether this provider is the system provider or not. |
(package private) static boolean |
isSystemProvider(String sProviderName)
Returns whether the given provider name is the one of the system provider or not. |
(package private) void |
readIndividualProperties()
Checks whether it's necessary to read/update the provider-specific settings. |
(package private) void |
updateGlobalSettings(String sProviderDirectory,
String sToName,
String sToAddress,
String sSMTPOverwritingAllowed,
String sTemplate)
Sets/Updates the "global" properties of this provider after having verified the input. |
(package private) void |
updateIndividualSettings(String sToName,
String sToAddress,
String sSMTPHost,
int iSMTPPort,
String sSuccessURL,
String sErrorURL,
String sTemplate)
Sets/Updates the individual properties of this provider after having verified the input. |
(package private) void |
updatePassword(String sPassword)
Sets/Updates the password property of this provider. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
MailFormProvider(String sName, GlobalProperties globalProperties) throws MailWebFormException, IOException
sName
- the name fo this providerglobalProperties
- the list containing the global properties of the
MailWebForm application
MailWebFormException
- thrown on problems with the config dir
property
IOException
- in case an I/O error occurred while accessing the
provider's properties fileMethod Detail |
void updateGlobalSettings(String sProviderDirectory, String sToName, String sToAddress, String sSMTPOverwritingAllowed, String sTemplate)
sProviderDirectory
- the new setting for the path to the provider's
individual files (overwriting property file and mail template)sToName
- the new setting for the "master" to-namesToAddress
- the new setting for the "master" to-addresssSMTPOverwritingAllowed
- the new setting for the allowing of
overwrite (if null, then the default value is used which is
true)sTemplate
- the name of the mail template to be usedvoid updatePassword(String sPassword)
sPassword
- the encoded password that the provider uses to log in
into the admin toolvoid updateIndividualSettings(String sToName, String sToAddress, String sSMTPHost, int iSMTPPort, String sSuccessURL, String sErrorURL, String sTemplate)
sToName
- the new setting for the individual to-namesToAddress
- the new setting for the individual to-addresssSMTPHost
- the new setting for the SMTP hostiSMTPPort
- the new setting for the SMTP portsSuccessURL
- the new setting of the site to be shown after having
successfully sent a mailsErrorURL
- the new setting of the site to be shown in case an
error occurred while trying to send a mailsTemplate
- the name of the mail template to be usedpublic String getName()
public String getProviderDirectory()
public boolean isSMTPOverwritingAllowed()
public String getPassword()
void readIndividualProperties() throws MailWebFormException
MailWebFormException
- in case there are problems accessing the
file or the config dir property isn't defined (yet)public String getDefaultToName()
public String getIndividualToName()
public String getToName()
public String getDefaultToAddress()
public String getIndividualToAddress()
public String getToAddress()
public String getDefaultSMTPHost()
public String getIndividualSMTPHost()
public String getSMTPHost()
public int getDefaultSMTPPort()
public int getIndividualSMTPPort()
public int getSMTPPort()
public String getDefaultSuccessURL()
public String getIndividualSuccessURL()
public String getSuccessURL()
public String getDefaultErrorURL()
public String getIndividualErrorURL()
public String getErrorURL()
public String getDefaultTemplate()
public String getIndividualTemplate()
public String getTemplate()
String[] getGlobalPropertiesPart()
boolean isSystemProvider()
static boolean isSystemProvider(String sProviderName)
sProviderName
- the provider name to be checked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |