com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events
Class CommentAdded

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.lifecycle.GerritEventLifecycle
      extended by com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.GerritTriggeredEvent
          extended by com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.ChangeBasedEvent
              extended by com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.CommentAdded
All Implemented Interfaces:
GerritEvent, GerritJsonDTO, GerritJsonEvent

public class CommentAdded
extends ChangeBasedEvent
implements GerritJsonEvent

A DTO representation of the comment-added Gerrit Event.

Author:
James E. Blair <jeblair@hp.com>

Field Summary
 
Fields inherited from class com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.ChangeBasedEvent
change, patchSet
 
Fields inherited from class com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.GerritTriggeredEvent
account
 
Constructor Summary
CommentAdded()
           
 
Method Summary
 void fromJson(net.sf.json.JSONObject json)
          Takes a JSON object and fills its internal data-structure.
 List<Approval> getApprovals()
          Get the code review approvals associated with this Gerrit comment.
 GerritEventType getEventType()
          Returns what type of event it is.
 boolean isScorable()
          Returns if a score (code review or verify) can be submitted to Gerrit.
 void setApprovals(List<Approval> approvals)
          Set the code review approvals for this event.
 
Methods inherited from class com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.ChangeBasedEvent
equals, getChange, getFiles, getPatchSet, hashCode, setChange, setPatchset
 
Methods inherited from class com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.GerritTriggeredEvent
getAccount, setAccount
 
Methods inherited from class com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.lifecycle.GerritEventLifecycle
addListener, fireAllBuildsCompleted, fireBuildCompleted, fireBuildStarted, fireProjectTriggered, fireTriggerScanDone, fireTriggerScanStarting, getListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentAdded

public CommentAdded()
Method Detail

getEventType

public GerritEventType getEventType()
Description copied from interface: GerritEvent
Returns what type of event it is.

Specified by:
getEventType in interface GerritEvent
Returns:
the event type.

getApprovals

public List<Approval> getApprovals()
Get the code review approvals associated with this Gerrit comment.

Returns:
a list of code review approvals.

setApprovals

public void setApprovals(List<Approval> approvals)
Set the code review approvals for this event.

Parameters:
approvals - the list of Approvals.

isScorable

public boolean isScorable()
Description copied from interface: GerritEvent
Returns if a score (code review or verify) can be submitted to Gerrit.

Specified by:
isScorable in interface GerritEvent
Returns:
true if so, otherwise false

fromJson

public void fromJson(net.sf.json.JSONObject json)
Description copied from class: ChangeBasedEvent
Takes a JSON object and fills its internal data-structure.

Specified by:
fromJson in interface GerritJsonDTO
Overrides:
fromJson in class ChangeBasedEvent
Parameters:
json - the JSON Object.


Copyright © 2004-2012 Hudson. All Rights Reserved.