|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kerrybuckley.cctrayicon.AbstractCcStatus
Abstract implementation of CcStatus, with no display functionality.
| Field Summary | |
protected static java.lang.String |
DEFAULT_URL
|
protected static java.lang.String |
PREF_KEY_ALERT_ON_FAIL
|
protected static java.lang.String |
PREF_KEY_ALERT_ON_FIX
|
protected static java.lang.String |
PREF_KEY_ALERT_ON_SUCCESS
|
protected static java.lang.String |
PREF_KEY_PROJECTS
|
protected static java.lang.String |
PREF_KEY_URL
|
protected static java.util.prefs.Preferences |
PREFS
|
| Constructor Summary | |
|
AbstractCcStatus(CcStatusMonitor monitor)
Construct a new status object, reading server details from user preferences. |
protected |
AbstractCcStatus(CcStatusMonitor monitor,
java.lang.String serverUrl,
java.util.prefs.Preferences prefs)
Construct a new status object using the specified URL. |
| Method Summary | |
protected boolean |
getAlertOnFail()
|
protected boolean |
getAlertOnFix()
|
protected boolean |
getAlertOnSuccess()
|
protected boolean |
getCheckAllProjects()
|
protected java.util.List |
getProjectsToCheck()
|
protected java.lang.String |
getServer()
|
boolean |
isBuildClean()
Returns a flag indicating whether the build was clean when last checked. |
boolean |
isServerReachable()
Returns a flag indicating whether the server was reachable when last checked. |
protected void |
readPrefs()
Read the current configuration from the user preferences, or set defaults if no preferences found. |
void |
setServer(java.lang.String serverUrl)
Set the server to monitor. |
protected void |
setUrl(java.lang.String serverUrl)
Set the URL. |
void |
update()
Update the status from the CruiseControl web page. |
protected abstract void |
warn(java.lang.String message)
Generate a warning to the user. |
protected void |
writePrefs()
Write the current configuration to the user preferences. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.util.prefs.Preferences PREFS
protected static final java.lang.String PREF_KEY_URL
protected static final java.lang.String DEFAULT_URL
protected static final java.lang.String PREF_KEY_PROJECTS
protected static final java.lang.String PREF_KEY_ALERT_ON_FAIL
protected static final java.lang.String PREF_KEY_ALERT_ON_FIX
protected static final java.lang.String PREF_KEY_ALERT_ON_SUCCESS
| Constructor Detail |
public AbstractCcStatus(CcStatusMonitor monitor)
monitor - the monitor which this object should communicate
protected AbstractCcStatus(CcStatusMonitor monitor,
java.lang.String serverUrl,
java.util.prefs.Preferences prefs)
monitor - the monitor which this object should communicateserverUrl - the URL of the Cruise Control server status pageprefs - a Preferences object to read from and write to.| Method Detail |
public boolean isBuildClean()
throws java.io.IOException
CcStatus
isBuildClean in interface CcStatusjava.io.IOException - if the status can't be read from the configured serverCcStatus.isBuildClean()public boolean isServerReachable()
CcStatus
isServerReachable in interface CcStatusCcStatus.isServerReachable()public void update()
CcStatus
update in interface CcStatusCcStatus.update()
protected void setUrl(java.lang.String serverUrl)
throws java.net.MalformedURLException
serverUrl - the new URL (as a string)
java.net.MalformedURLException - if the URL can't be parsedpublic void setServer(java.lang.String serverUrl)
CcStatus
setServer in interface CcStatusserverUrl - the URL of the Cruise Control serverCcStatus.setServer(java.lang.String)protected java.lang.String getServer()
protected abstract void warn(java.lang.String message)
message - the message to displayprotected void readPrefs()
protected void writePrefs()
protected boolean getAlertOnFail()
protected boolean getAlertOnFix()
protected boolean getAlertOnSuccess()
protected boolean getCheckAllProjects()
protected java.util.List getProjectsToCheck()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||