com.atlassian.jira.event.issue
Class IssueEvent

java.lang.Object
  extended by com.atlassian.jira.event.AbstractEvent
      extended by com.atlassian.jira.event.issue.IssueEvent
All Implemented Interfaces:
JiraEvent

public final class IssueEvent
extends AbstractEvent

Basic representation of something that happens to an Issue, such as a modification or comment. Event listeners register to receive these.

The IssueEvent object thrown as a result of an edit operation, may now return null from a getChangeLog() call. This can occur when a user chooses to edit an issue but only leaves a comment and makes no other changes to the issue.

Prior to 3.5.2 no event was fired in this case and this was identified as a bug (JRA-9415) and has since been fixed. Check any calls to getChangeLog() for null.

See Also:
IssueEvent

Field Summary
static java.lang.String SEND_MAIL
           
 
Fields inherited from class com.atlassian.jira.event.AbstractEvent
params, time
 
Constructor Summary
IssueEvent(Issue issue, java.util.Map params, com.opensymphony.user.User remoteUser, java.lang.Long eventTypeId)
          Create a new IssueEvent with a given list of parameters.
IssueEvent(Issue issue, java.util.Map params, com.opensymphony.user.User remoteUser, java.lang.Long eventTypeId, boolean sendMail)
          Allows configuration of whether the mail notification should be sent
IssueEvent(Issue issue, com.opensymphony.user.User remoteUser, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, java.util.Map params, java.lang.Long eventTypeId)
          Create a new IssueEvent with a given list of parameters.
IssueEvent(Issue issue, com.opensymphony.user.User remoteUser, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, java.util.Map params, java.lang.Long eventTypeId, boolean sendMail)
          Create a new IssueEvent with a given list of parameters.
IssueEvent(Issue issue, com.opensymphony.user.User remoteUser, Comment comment, Worklog worklog, org.ofbiz.core.entity.GenericValue changeGroup, java.util.Map params, java.lang.Long eventTypeId, boolean sendMail, boolean subtasksUpdated)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Note: this will not compare the time stamps of two events - only everything else.
 org.ofbiz.core.entity.GenericValue getChangeLog()
           
 Comment getComment()
           
 java.lang.Long getEventTypeId()
           
 Issue getIssue()
           
 com.opensymphony.user.User getRemoteUser()
           
 Worklog getWorklog()
           
 int hashCode()
           
 boolean isSendMail()
           
 boolean isSubtasksUpdated()
           
 void setWorklog(Worklog worklog)
           
 java.lang.String toString()
           
 
Methods inherited from class com.atlassian.jira.event.AbstractEvent
getParams, getTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEND_MAIL

public static final java.lang.String SEND_MAIL
See Also:
Constant Field Values
Constructor Detail

IssueEvent

public IssueEvent(Issue issue,
                  java.util.Map params,
                  com.opensymphony.user.User remoteUser,
                  java.lang.Long eventTypeId)
Create a new IssueEvent with a given list of parameters.

Parameters:
issue - the issue this event refers to
params - parameters that can be retrieved by the Listener
remoteUser - the user who has initiated this event
eventTypeId - the type ID of this event

IssueEvent

public IssueEvent(Issue issue,
                  java.util.Map params,
                  com.opensymphony.user.User remoteUser,
                  java.lang.Long eventTypeId,
                  boolean sendMail)
Allows configuration of whether the mail notification should be sent

Parameters:
issue - the issue this event refers to
params - parameters that can be retrieved by the Listener
remoteUser - the user who has initiated this event
eventTypeId - the type ID of this event
sendMail - configure whether mail notifications should be sent

IssueEvent

public IssueEvent(Issue issue,
                  com.opensymphony.user.User remoteUser,
                  Comment comment,
                  Worklog worklog,
                  org.ofbiz.core.entity.GenericValue changeGroup,
                  java.util.Map params,
                  java.lang.Long eventTypeId)
Create a new IssueEvent with a given list of parameters.

This event also has an attached changeGroup, comment and worklog (any of which may be null).

Parameters:
issue - The issue this event refers to
comment - A comment for this event
worklog - A worklog for this event
changeGroup - An attached changeGroup for this event
params - Parameters that can be retrieved by the Listener

IssueEvent

public IssueEvent(Issue issue,
                  com.opensymphony.user.User remoteUser,
                  Comment comment,
                  Worklog worklog,
                  org.ofbiz.core.entity.GenericValue changeGroup,
                  java.util.Map params,
                  java.lang.Long eventTypeId,
                  boolean sendMail)
Create a new IssueEvent with a given list of parameters.

This event also has an attached changeGroup, comment and worklog (any of which may be null).

Parameters:
issue - the issue this event refers to
comment - comment for this event
worklog - A worklog for this event
changeGroup - an attached changeGroup for this event
params - parameters that can be retrieved by the Listener
sendMail - configure whether mail notifications should be sent

IssueEvent

public IssueEvent(Issue issue,
                  com.opensymphony.user.User remoteUser,
                  Comment comment,
                  Worklog worklog,
                  org.ofbiz.core.entity.GenericValue changeGroup,
                  java.util.Map params,
                  java.lang.Long eventTypeId,
                  boolean sendMail,
                  boolean subtasksUpdated)
Method Detail

getIssue

public Issue getIssue()

getRemoteUser

public com.opensymphony.user.User getRemoteUser()

getChangeLog

public org.ofbiz.core.entity.GenericValue getChangeLog()

getComment

public Comment getComment()

getWorklog

public Worklog getWorklog()

setWorklog

public void setWorklog(Worklog worklog)

getEventTypeId

public java.lang.Long getEventTypeId()

isSendMail

public boolean isSendMail()

isSubtasksUpdated

public boolean isSubtasksUpdated()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Note: this will not compare the time stamps of two events - only everything else.

Overrides:
equals in class AbstractEvent

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractEvent


Copyright © 2002-2010 Atlassian. All Rights Reserved.