|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.deployment.common.event.DeploymentEmailer
public class DeploymentEmailer
A deployment event listener that sends email out when a deployment succeeds or fails.
When registered with the deployment server as a deployment event listener, this listener will wait for a deployment completion event or any event that is an error. Upon receiving either, the listener will use the SMTPEmailSender service to send an email to the specified address. The useShortMessage property can be set accordingly for either a brief message (ideal for pagers) or a detailed listing of properties from the deployment event.
Multiple email listeners can be registered and customized to suit varying needs. The email listener properties file will look similar to:
$class=atg.deployment.common.event.DeploymentEmailer SMTPEmailSender=/atg/dynamo/service/SMTPEmail fromAddress=important-guy@thebigcompany.com toAddress=another-important-guy@thebigcompany.com useShortMessage=trueThe listener can conveniently be turned off and on via the active property in the ComponentBrowser.
DeploymentEventListener
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Constructor Summary | |
---|---|
DeploymentEmailer()
Constructs the DeploymentEmailer with no special arguments. |
Method Summary | |
---|---|
void |
deploymentEvent(DeploymentEvent pEvent)
DeploymentEventListener method called for event firing. |
java.lang.String |
getFromAddress()
The email address deployment notifications should claim to be from. |
SMTPEmailSender |
getSMTPEmailSender()
The SMTPEmailSender service to send emails through. |
java.lang.String |
getToAddress()
The email address to send deployment notifications to. |
boolean |
getUseShortMessage()
Whether to send a short, pager-sized message or a longer, more verbose message. |
boolean |
isActive()
Whether or not the listener should send email notifications. |
void |
setActive(boolean pActive)
Whether or not the listener should send email notifications. |
void |
setFromAddress(java.lang.String pFromAddress)
The email address deployment notifications should claim to be from. |
void |
setSMTPEmailSender(SMTPEmailSender pSMTPEmailSender)
The SMTPEmailSender service to send emails through. |
void |
setToAddress(java.lang.String pToAddress)
The email address to send deployment notifications to. |
void |
setUseShortMessage(boolean pUseShortMessage)
Whether to send a short, pager-sized message or a longer, more verbose message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public DeploymentEmailer()
Method Detail |
---|
public void setSMTPEmailSender(SMTPEmailSender pSMTPEmailSender)
pSMTPEmailSender
- new value to setpublic SMTPEmailSender getSMTPEmailSender()
public void setFromAddress(java.lang.String pFromAddress)
pFromAddress
- new value to setpublic java.lang.String getFromAddress()
public void setToAddress(java.lang.String pToAddress)
pAddress
- new value to setpublic java.lang.String getToAddress()
public void setUseShortMessage(boolean pUseShortMessage)
pUseShortMessage
- new value to setpublic boolean getUseShortMessage()
public void setActive(boolean pActive)
pActive
- new value to setpublic boolean isActive()
public void deploymentEvent(DeploymentEvent pEvent)
deploymentEvent
in interface DeploymentEventListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |