|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openeai.OpenEaiObject
org.openeai.config.EnterpriseConfigurationObjectImpl
org.openeai.config.MailServiceConfig
public class MailServiceConfig
A MailServiceConfig is a wrapper class that takes information stored in an OpenEAI Deployment document (MailServiceConfig Element) and stores it in a Java object. Then the configuration object can be retrieved from AppConfig and the Properties object associated to the config object can be used within the application.
The MailServiceConfig object is simply an object that reads the elements contained in the deployment document and is used to instantiate a MailService object
Configuration Parameters:
These are the configuration parameters specified by the MailServiceConfig Element in the Deployment document. NOTE: Like all other OpenEAI configuration objects, there is a "container" level associated to MailServiceConfig objects. Many Elements and attributes are required at that level and may be optionally overridden at this level. This is to avoid having to enter redundant information in the Deployment document if all (or most) MailServiceConfig objects being configured should use the same configuration information. Therefore, many of the MailServiceConfig elements are optional at this level but required at the "container" level. Where this is the case, it will be indicated by an "*".
| Name | Required | Description |
|---|---|---|
| name | yes | Name of the MailServiceConfig object. This is how the object will be stored in AppConfig and should be unique. This allows developers to conveniently categorize MailService objects for an application and retrieve them by name |
| ConfigClass | no* | Name of the configuration class that wraps the config Element (this class) |
| ObjectClass | no* | Name of the Java object that will be instantiated with this Config class (for now, it's the org.openeai.loggingutils.MailService object) |
| RecipientList | yes | A comma separated list of email addresses to which an email message will be sent. This list can be overriden at runtime if needed. | FromAddress | yes | The email address of the sending application. This can be overriden at runtime if needed and doesn't have to be a "real" email address. | MailHost | yes | The SMTP host that will be used to send the email message. This can be overriden at runtime if needed. | Subject | no | A default subject to include with the message. Applications using this object will likely wish to override this default subject at runtime. | MessageBody | no | A default message body to include with the message. Applications using this object will likely wish to override this default MessageBody at runtime. Currently, only "text" is supported in the body. |
MailService| Field Summary |
|---|
| Fields inherited from class org.openeai.OpenEaiObject |
|---|
logger |
| Constructor Summary | |
|---|---|
MailServiceConfig()
This is the constructor used by AppConfig to instantiate the config object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFromAddress()
returns the from address variable |
java.lang.String |
getMailHost()
returns the value of the mail host variable |
java.lang.String |
getMessageBody()
returns the message body of the current message |
java.lang.String |
getRecipientList()
Returns the to address variable |
java.lang.String |
getSubject()
returns the subject of the current message |
void |
init(org.jdom.Element configElement)
Implements the init(Element) method that all EnterpriseConfiguration objects must implement. |
void |
setFromAddress(java.lang.String fromAddr)
Sets the fromAddr class variable to the data passed in |
void |
setMailHost(java.lang.String mailHost)
Sets the mailHost variable to the data passed in |
void |
setMessageBody(java.lang.String msg)
sets the msgBody variable to data passed from the client. |
void |
setRecipientList(java.lang.String addr)
Sets the toAddr class variable to the data passed in |
void |
setSubject(java.lang.String subject)
sets the subject variable to data passed in from the client |
| Methods inherited from class org.openeai.config.EnterpriseConfigurationObjectImpl |
|---|
addProperty, getAppName, getConfigDoc, getConfigElementByAttributeValue, getElementByAttributeValue, getName, getType, getValidation, refresh, setAppName, setConfigDoc, setName, setRefresh, setType, setValidation |
| Methods inherited from class org.openeai.OpenEaiObject |
|---|
getDebug, getFromAddr, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setDebug, setFromAddr, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openeai.config.EnterpriseConfigurationObject |
|---|
getAppName, getProperties, refresh, setAppName |
| Constructor Detail |
|---|
public MailServiceConfig()
| Method Detail |
|---|
public void setMailHost(java.lang.String mailHost)
setMailHost in class OpenEaiObjectmailHost - mail host set by the calling clientpublic java.lang.String getMailHost()
getMailHost in class OpenEaiObjectpublic void setRecipientList(java.lang.String addr)
addr - String coma separated list of email addresses to send messages to set by the client
AddressExceptionpublic java.lang.String getRecipientList()
public java.lang.String getFromAddress()
public void setFromAddress(java.lang.String fromAddr)
fromAddr - Address that messages are coming frompublic void setSubject(java.lang.String subject)
subject - subject of the message passed from the clientpublic java.lang.String getSubject()
public void setMessageBody(java.lang.String msg)
msg - String message to be sentpublic java.lang.String getMessageBody()
public void init(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
The Properties object that gets built is inherited from OpenEaiObject.
init in interface EnterpriseConfigurationObjectinit in class EnterpriseConfigurationObjectImplconfigElement - Element the configuration element that AppConfig has pulled from the configuration document
relevant to the PropertyConfig object being configured. Or, the element that was found in the init() method.
EnterpriseConfigurationObjectException - if errors occur processing the configuration Element.OpenEaiObject,
EnterpriseConfigurationObjectImpl.init(org.jdom.Element)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||