|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cruisecontrol.publishers.EmailPublisher net.sourceforge.cruisecontrol.publishers.HTMLEmailPublisher
Used to publish an HTML e-mail that includes the build report
Nested Class Summary |
Nested classes inherited from class net.sourceforge.cruisecontrol.publishers.EmailPublisher |
EmailPublisher.Address, EmailPublisher.Alert, EmailPublisher.Always, EmailPublisher.Failure, EmailPublisher.Ignore, EmailPublisher.Success |
Constructor Summary | |
HTMLEmailPublisher()
|
Method Summary | |
protected void |
addContentToMessage(java.lang.String htmlContent,
javax.mail.Message msg)
sets the content as an attachment w/proper mime-type |
protected void |
appendFooter(java.lang.StringBuffer messageBuffer)
|
protected void |
appendHeader(java.lang.StringBuffer messageBuffer)
|
protected void |
appendTransform(java.io.File inFile,
java.lang.StringBuffer messageBuffer,
javax.xml.transform.TransformerFactory tFactory,
java.io.File xsl)
|
protected java.lang.String |
createLinkLine(java.lang.String logFileName)
|
protected java.lang.String |
createMessage(XMLLogHelper logHelper)
Create the message to be mailed |
Property |
createParameter()
|
protected java.lang.String[] |
getXslFileNames()
Provided as an alternative to setXSLFileNames for changing the list of files to use. |
void |
setCharset(java.lang.String characterSet)
|
void |
setCSS(java.lang.String cssFilename)
Path to cruisecontrol.css. |
void |
setLogDir(java.lang.String directory)
Path to the log file as set in the log element of the configuration xml file. |
void |
setXSLDir(java.lang.String xslDirectory)
Directory where xsl files are located. |
void |
setXSLFile(java.lang.String fullPathToXslFile)
If xslFile is set then both xslDir and css are ignored. |
void |
setXSLFileList(java.lang.String relativePathToXslFile)
updates xslFileNames, based on value of xslFileList If first character is + the list is appended, otherwise the list is replaced. xslFileNames is comma or space-separated list of existing files, located in xslDir. |
protected void |
setXSLFileNames(java.lang.String[] fileNames)
Method to override the default list of file names that will be looked for in the directory specified by xslDir. |
protected java.lang.String |
transform(java.io.File inFile)
|
protected java.lang.String |
transformFile(javax.xml.transform.Source logFile,
javax.xml.transform.TransformerFactory tFactory,
javax.xml.transform.Source xsl)
|
void |
validate()
Called after the configuration is read to make sure that all the mandatory parameters were specified.. |
Methods inherited from class net.sourceforge.cruisecontrol.publishers.EmailPublisher |
add, add, createAlert, createAlertUserList, createAlertUserSet, createAlways, createEmailString, createFailure, createIgnore, createSubject, createSuccess, createUserList, createUserSet, getBuildResultsURL, getDefaultSuffix, getEmailMapper, getFromAddress, getMailHost, getMailPort, getMailProperties, getPassword, getReturnAddress, getReturnName, getSubjectPrefix, getUsername, matchRegExpr, publish, sendMail, setBuildResultsURL, setDefaultSuffix, setFailAsImportant, setMailHost, setMailPort, setPassword, setReportSuccess, setReturnAddress, setReturnName, setSkipUsers, setSpamWhileBroken, setSubjectPrefix, setUsername, setUseSSL, shouldSend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HTMLEmailPublisher()
Method Detail |
public void validate() throws CruiseControlException
Publisher
validate
in interface Publisher
validate
in class EmailPublisher
CruiseControlException
public Property createParameter()
protected void addContentToMessage(java.lang.String htmlContent, javax.mail.Message msg) throws javax.mail.MessagingException
addContentToMessage
in class EmailPublisher
htmlContent
- content returned by createMessagemsg
- mail Message with headers and addresses added elsewhere
javax.mail.MessagingException
public void setXSLFileList(java.lang.String relativePathToXslFile)
public void setXSLFile(java.lang.String fullPathToXslFile)
public void setXSLDir(java.lang.String xslDirectory)
protected void setXSLFileNames(java.lang.String[] fileNames)
fileNames
- protected java.lang.String[] getXslFileNames()
public void setCSS(java.lang.String cssFilename)
public void setLogDir(java.lang.String directory)
public void setCharset(java.lang.String characterSet)
protected java.lang.String createMessage(XMLLogHelper logHelper)
createMessage
in class EmailPublisher
logHelper
- utility object that has parsed the log files
protected java.lang.String transform(java.io.File inFile) throws javax.xml.transform.TransformerException, java.io.FileNotFoundException, java.io.IOException
javax.xml.transform.TransformerException
java.io.FileNotFoundException
java.io.IOException
protected java.lang.String createLinkLine(java.lang.String logFileName)
protected void appendTransform(java.io.File inFile, java.lang.StringBuffer messageBuffer, javax.xml.transform.TransformerFactory tFactory, java.io.File xsl)
protected java.lang.String transformFile(javax.xml.transform.Source logFile, javax.xml.transform.TransformerFactory tFactory, javax.xml.transform.Source xsl) throws java.io.IOException, javax.xml.transform.TransformerException
java.io.IOException
javax.xml.transform.TransformerException
protected void appendHeader(java.lang.StringBuffer messageBuffer) throws java.io.IOException
java.io.IOException
protected void appendFooter(java.lang.StringBuffer messageBuffer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |