|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alltimeflashdreamer.mailwebform.MailFormProviderList
Title: MailFormProviderList
Description: Represents a handler of a list of known/defined providers of a
mailwebform site, as defined in the application's global properties file.
Constructor Summary | |
(package private) |
MailFormProviderList(GlobalProperties globalProperties)
The constructor receives the Properties object where the providers' settings are stored, especially the comma-separated list of defined/active providers which is used to build the internal list of providers |
Method Summary | |
(package private) void |
checkProviderSettings()
Steps through the list of registered providers and forces each one to check whether the provider-specific settings file has been changed since the last access. |
(package private) void |
checkProviderSettings(String sProviderName)
Searches the given provider in the list and forces him to reread the settings from the individual property file. |
(package private) String |
getErrorURL(String sProviderName,
String sDefaultErrorURL)
Returns the given provider's "ERROR_URL" setting. |
(package private) String[] |
getGlobalPropertiesPart(String sProviderName)
Returns the list of lines that are to be written into the global properties file for the given provider. |
String |
getPassword(String sProviderName)
Returns the password parameter of the given provider or null, if the specified provider doesn't exist. |
(package private) MailFormProvider |
getProvider(String sProviderName)
Returns the specified provider instance or null, if the specified provider name is not registered (case-insensitive check). |
String |
getProviderDirectory(String sProviderName)
Returns the ProviderDirectory parameter of the given provider or null, if the specified provider doesn't exist. |
(package private) String[] |
getProviderNames()
Returns a String[] containing the names of the registered providers. |
(package private) String |
getSMTPHost(String sProviderName,
String sDefaultSMTPHost)
Returns the given provider's "SMTP_HOST" setting. |
(package private) int |
getSMTPPort(String sProviderName,
int iDefaultSMTPPort)
Returns the given provider's "SMTP_PORT" setting. |
(package private) String |
getSuccessURL(String sProviderName,
String sDefaultSuccessURL)
Returns the given provider's "SUCCESS_URL" setting. |
String |
getToAddress(String sProviderName,
String sDefaultToAddress)
Returns the given provider's "TOADDRESS" setting. |
String |
getToName(String sProviderName,
String sDefaultToName)
Returns the given provider's "TONAME" setting. |
(package private) static String |
getValidProperty(String sProperty,
String sDefaultProperty)
Returns the given property, if not null and not empty, else the given default one. |
(package private) boolean |
hasProvider(String sProviderName)
Returns whether the given provider name is in the list of all registered providers or not (case-insensitive check). |
boolean |
isSMTPOverwriteAllowed(String sProviderName)
Returns the boolean value of the given provider's "SMTP_ALLOWOVERWRITE" setting. |
(package private) void |
removeProvider(String sProviderName)
Removes the given provider from the list. |
(package private) void |
updatePassword(String sProviderName,
String sPassword)
Sets/Updates the password property of the specified provider. |
(package private) void |
updateProvider(String sProviderName,
String sProviderDirectory,
String sToName,
String sToAddress,
String sAllowOverwrite,
String sTemplate,
GlobalProperties globalProperties)
Updates the "personal" setting of the specified provider by recreating the MailFormProvider instance and overwriting the old one within this list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
MailFormProviderList(GlobalProperties globalProperties) throws MailWebFormException, IOException
globalProperties
- a Properties object which loaded the data of the
global properties file before
MailWebFormException
- thrown on problems with the config dir
property
IOException
- in case an I/O error occurred during the accessing
of a provider's own properties fileMethod Detail |
String[] getProviderNames()
boolean hasProvider(String sProviderName)
sProviderName
- the provider name to search for
MailFormProvider getProvider(String sProviderName)
sProviderName
- the name of the provider to be returned
public String getProviderDirectory(String sProviderName)
sProviderName
- the name of the provider
String[] getGlobalPropertiesPart(String sProviderName)
sProviderName
- the name of the provider
String getSMTPHost(String sProviderName, String sDefaultSMTPHost)
sProviderName
- the name of the providersDefaultSMTPHost
- the value to use in case the provider is not
known
int getSMTPPort(String sProviderName, int iDefaultSMTPPort)
sProviderName
- the name of the provideriDefaultSMTPPort
- the value to use in case the provider is not
known
String getSuccessURL(String sProviderName, String sDefaultSuccessURL)
sProviderName
- the name of the providersDefaultSuccessURL
- the value to use in case the provider is not
known
String getErrorURL(String sProviderName, String sDefaultErrorURL)
sProviderName
- the name of the providersDefaultErrorURL
- the value to use in case the provider is not
known
public String getToName(String sProviderName, String sDefaultToName)
sProviderName
- the name of the providersDefaultToName
- the value to use in case the provider is not known
public String getToAddress(String sProviderName, String sDefaultToAddress)
sProviderName
- the name of the providersDefaultToAddress
- the value to use in case the provider is not
known
public boolean isSMTPOverwriteAllowed(String sProviderName)
sProviderName
- the name of the provider
public String getPassword(String sProviderName)
sProviderName
- the name of the provider
void checkProviderSettings() throws MailWebFormException
MailWebFormException
- in case there are problems accessing the
file or the config dir property isn't defined (yet)void checkProviderSettings(String sProviderName) throws MailWebFormException
sProviderName
- name of the provider, to find its instance
MailWebFormException
- in case there are problems accessing the
file or the config dir property isn't defined (yet)void updateProvider(String sProviderName, String sProviderDirectory, String sToName, String sToAddress, String sAllowOverwrite, String sTemplate, GlobalProperties globalProperties) throws MailWebFormException, IOException
sProviderName
- update whom?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-addresssAllowOverwrite
- 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 usedglobalProperties
- the list containing the global properties
MailWebFormException
- thrown on problems with the config dir
property
IOException
- in case problems occurred while accessing the
provider's properties filevoid updatePassword(String sProviderName, String sPassword)
sProviderName
- update whom?sPassword
- the encoded password that the provider uses to log in
into the admin toolvoid removeProvider(String sProviderName)
sProviderName
- remove whom?static String getValidProperty(String sProperty, String sDefaultProperty)
sProperty
- the - optional - individual propertysDefaultProperty
- the fallback value, if the given property is
null or empty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |