net.sourceforge.cruisecontrol.publishers
Class YahooPublisher

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.publishers.YahooPublisher
All Implemented Interfaces:
Publisher, java.io.Serializable

public class YahooPublisher
extends java.lang.Object
implements Publisher

Publisher which establishes this transport to publish build results via Yahoo Instant Messaging framework. Parameters are: username - required - YahooId (should not be an eMail address) password - required - Password for YahooId recipient - required - YahooId (no eMail, please), to which the message should be send buildResultsURL - required - You know... proxyHost - not required - since we are using HTTP connection, a HTTP Proxy proxyPort - not required - the port for the HTTP Proxy

Version:
1.0
Author:
Markus M. May
See Also:
Serialized Form

Constructor Summary
YahooPublisher()
           
 
Method Summary
 boolean connect()
          connect to the server and set necessary info.
protected  java.lang.String createMessage(XMLLogHelper logHelper)
          Creates the IM message body.
 void publish(org.jdom.Element cruisecontrolLog)
          Publish the results to the Yahoo transport via an instant message.
 void setBuildResultsURL(java.lang.String buildResultsURL)
           
 void setPassword(java.lang.String password)
           
 void setProxyHost(java.lang.String pProxyHost)
          Setter for proxyHost
 void setProxyPort(java.lang.String pProxyPort)
          Setter for proxyPort
 void setRecipient(java.lang.String recipient)
           
 void setUsername(java.lang.String username)
           
 void validate()
          Validate that all the mandatory parameters were specified in order to properly initial the Yahoo client service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YahooPublisher

public YahooPublisher()
Method Detail

setUsername

public void setUsername(java.lang.String username)

setPassword

public void setPassword(java.lang.String password)

setRecipient

public void setRecipient(java.lang.String recipient)

setBuildResultsURL

public void setBuildResultsURL(java.lang.String buildResultsURL)

setProxyHost

public void setProxyHost(java.lang.String pProxyHost)
Setter for proxyHost

Parameters:
pProxyHost - proxyHost

setProxyPort

public void setProxyPort(java.lang.String pProxyPort)
Setter for proxyPort

Parameters:
pProxyPort - proxyPort

validate

public void validate()
              throws CruiseControlException
Validate that all the mandatory parameters were specified in order to properly initial the Yahoo client service. Note that this is called after the configuration file is read.

Specified by:
validate in interface Publisher
Throws:
CruiseControlException - if there was a configuration error.

publish

public void publish(org.jdom.Element cruisecontrolLog)
             throws CruiseControlException
Publish the results to the Yahoo transport via an instant message.

Specified by:
publish in interface Publisher
Parameters:
cruisecontrolLog - JDOM Element representation of the main cruisecontrol build log
Throws:
CruiseControlException

connect

public boolean connect()
connect to the server and set necessary info.


createMessage

protected java.lang.String createMessage(XMLLogHelper logHelper)
                                  throws CruiseControlException
Creates the IM message body. This currently creates a message that is a link to a web page with the details of the build.

Returns:
String the link that makes up the body of the IM message
Throws:
CruiseControlException