cdx.scorebot.scoring
Class ManualScoreEvent

java.lang.Object
  extended by cdx.scorebot.util.Event
      extended by cdx.scorebot.scoring.ScoreEvent
          extended by cdx.scorebot.scoring.ManualScoreEvent
All Implemented Interfaces:
java.io.Serializable

public class ManualScoreEvent
extends ScoreEvent
implements java.io.Serializable

describes a change in score due to a penalty or bonus resulting from a manually, user-entered request for such a change

Author:
David Underhill
See Also:
Serialized Form

Field Summary
static java.lang.String XML_EXT
          extension for files of this type serialized to XML
 
Constructor Summary
ManualScoreEvent(java.lang.String title, int scoreChange)
          Creates the ManualScoreEvent with the specified score change and an empty message
ManualScoreEvent(java.lang.String title, int scoreChange, java.lang.String msg)
          Creates the ManualScoreEvent with the specified score change and explanation
ManualScoreEvent(java.lang.String title, int scoreChange, java.lang.String msg, Timestamp reported)
          Instantiates a ManualScoreEvent
 
Method Summary
 Timestamp getTime()
          gets the time of the "event" which caused this score change to be entered
 Timestamp getTimeReported()
          gets the time the event was reported
 void setTime(Timestamp relevantTime)
          sets the time of the "event" which caused this score change to be entered
 void setTimeReported(Timestamp time)
          sets the time the event was reported
 
Methods inherited from class cdx.scorebot.scoring.ScoreEvent
getExplanation, getScoringInfo, getTitle, setExplanation, setTitle, toString
 
Methods inherited from class cdx.scorebot.util.Event
getFilename, getTimeGenerated, isReported, setFilename, setTimeGenerated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_EXT

public static final java.lang.String XML_EXT
extension for files of this type serialized to XML

See Also:
Constant Field Values
Constructor Detail

ManualScoreEvent

public ManualScoreEvent(java.lang.String title,
                        int scoreChange)
Creates the ManualScoreEvent with the specified score change and an empty message

Parameters:
title - a descriptive heading for the event
scoreChange - the number of points to add to the score (negative number => penalty)

ManualScoreEvent

public ManualScoreEvent(java.lang.String title,
                        int scoreChange,
                        java.lang.String msg)
Creates the ManualScoreEvent with the specified score change and explanation

Parameters:
title - a descriptive heading for the event
scoreChange - the number of points to add to the score (negative number => penalty)
msg - explanation for the score change

ManualScoreEvent

public ManualScoreEvent(java.lang.String title,
                        int scoreChange,
                        java.lang.String msg,
                        Timestamp reported)
Instantiates a ManualScoreEvent

Parameters:
title - a descriptive heading for the event
scoreChange - the number of points to add to the score (negative number => penalty)
msg - explanation for the score change
reported - whetn this event ws been reported (null if not yet)
Method Detail

getTime

public Timestamp getTime()
gets the time of the "event" which caused this score change to be entered

Returns:
the time of the "event" which caused this score change to be entered

setTime

public void setTime(Timestamp relevantTime)
sets the time of the "event" which caused this score change to be entered

Parameters:
relevantTime - the time of the "event" which caused this score change to be entered

getTimeReported

public Timestamp getTimeReported()
Description copied from class: Event
gets the time the event was reported

Specified by:
getTimeReported in class Event

setTimeReported

public void setTimeReported(Timestamp time)
Description copied from class: Event
sets the time the event was reported

Specified by:
setTimeReported in class Event