|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.publishers.WeblogPublisher
Used to publish a blog entry based on the build report using the Blogger API, MetaWeblog API or the LiveJournal API.
Here's a sample of the publisher element to put into your config.xml:
<weblog blogurl="http://yourblogserver:port/blog/xmlrpc" api="metaweblog" blogid="yourblog" username="user1" password="secret" category="cruisecontrol" reportsuccess="fixes" subjectprefix="[CC]" buildresultsurl="http://yourbuildserver:port/cc/buildresults" logdir="/var/cruisecontrol/logs/YourProject" xsldir="/opt/cruisecontrol/reporting/jsp/xsl" css="/opt/cruisecontrol/reporting/jsp/css/cruisecontrol.css" />
And you also need to register the 'weblog' task with the following entry if you're using this task with an older version of CruiseControl which doesn't have the WeblogPublisher registered by default.
<project name="foo"> <plugin name="weblog" classname="net.sourceforge.cruisecontrol.publishers.WeblogPublisher"/> ... </project>
Nested Class Summary | |
static class |
WeblogPublisher.BloggerApiClient
A BloggingApi implementation for the Blogger API. |
static class |
WeblogPublisher.LiveJournalApiClient
A BloggingApi implementation for the LiveJournal API. |
static class |
WeblogPublisher.MetaWeblogApiClient
A BloggingApi implementation for the MetaWeblogAPI. |
Constructor Summary | |
WeblogPublisher()
|
Method Summary | |
net.sourceforge.cruisecontrol.publishers.WeblogPublisher.BloggingApi |
getBloggingApiImplementation(java.lang.String apiName)
Selects a BloggingApi implementation based on a user-friendly name. |
protected java.lang.String[] |
getXslFileNames()
Provided as an alternative to setXSLFileNames for changing the list of files to use. |
void |
postBlogEntry(java.lang.String subject,
java.lang.String content)
Posts the build results to the blog. |
void |
publish(org.jdom.Element cruisecontrolLog)
Implementing the Publisher interface. |
void |
setApi(java.lang.String api)
The API used for posting to your blog. |
void |
setBlogId(java.lang.String blogId)
The "blog ID" for the blog you're posting to. |
void |
setBlogUrl(java.lang.String blogUrl)
The URL where your blog's remote API is running at. |
void |
setBuildResultsURL(java.lang.String url)
The base build results URL where your CruiseControl reporting application is running. |
void |
setCategory(java.lang.String category)
The category to set for the blog entry. |
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 |
setPassword(java.lang.String password)
The password to use for authentication. |
void |
setReportSuccess(java.lang.String reportSuccess)
The rule for posting a blog entry for successful builds. |
void |
setSpamWhileBroken(boolean spamWhileBroken)
The rule for posting a blog entry for each subsequent failed build. |
void |
setSubjectPrefix(java.lang.String prefix)
The prefix to be used before the title of the blog entry. |
void |
setUsername(java.lang.String username)
The username to use for authentication. |
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. |
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. |
void |
validate()
Called after the configuration is read to make sure that all the mandatory parameters were specified.. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WeblogPublisher()
Method Detail |
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 setApi(java.lang.String api)
public void setBlogId(java.lang.String blogId)
public void setBlogUrl(java.lang.String blogUrl)
public void setUsername(java.lang.String username)
public void setPassword(java.lang.String password)
public void setCategory(java.lang.String category)
public void setSubjectPrefix(java.lang.String prefix)
public void setBuildResultsURL(java.lang.String url)
public void setReportSuccess(java.lang.String reportSuccess)
public void setSpamWhileBroken(boolean spamWhileBroken)
public void publish(org.jdom.Element cruisecontrolLog)
Publisher
interface.
publish
in interface Publisher
cruisecontrolLog
- The build results XMLpublic net.sourceforge.cruisecontrol.publishers.WeblogPublisher.BloggingApi getBloggingApiImplementation(java.lang.String apiName) throws CruiseControlException
apiName
- The name of the blogging API to use. One of blogger,
metaweblog or livejournal.
CruiseControlException
public void postBlogEntry(java.lang.String subject, java.lang.String content)
subject
- The subject for the blog entry.content
- The content for the blog entry.public void validate() throws CruiseControlException
validate
in interface Publisher
CruiseControlException
- if there was a configuration error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |