com.atlassian.jira.event.issue
Class AbstractIssueEventListener

java.lang.Object
  extended by com.atlassian.jira.event.issue.AbstractIssueEventListener
All Implemented Interfaces:
IssueEventListener, JiraListener, EventListener
Direct Known Subclasses:
BackgroundIndexListener, DebugListener, IssueAssignHistoryListener, IssueIndexListener, MailListener

public abstract class AbstractIssueEventListener
extends Object
implements IssueEventListener

Subclasses of IssueEventListener can now override relevant functions in the interface as opposed to having to provide a dummy implementation for all methods.


Constructor Summary
AbstractIssueEventListener()
           
 
Method Summary
 void customEvent(IssueEvent event)
          Implement this method to deal with any custom events within the system
 String[] getAcceptedParams()
          Returns the parameters used by this listener.
 String getDescription()
          Returns a textual description of the listener.
protected  I18nHelper getI18NBean()
           
 void init(Map params)
          Initialises the listener with the given parameters.
 boolean isInternal()
          Indicates whether this listener is internal, meaning it cannot be removed by an administrator.
 void issueAssigned(IssueEvent event)
          Fired when an issue is assigned or unassigned.
 void issueClosed(IssueEvent event)
          Fired when an issue is closed.
 void issueCommentDeleted(IssueEvent event)
          The default behaviour for this method calls issueUpdated(IssueEvent event).
 void issueCommented(IssueEvent event)
          Fired when a user comments on an issue.
 void issueCommentEdited(IssueEvent event)
           
 void issueCreated(IssueEvent event)
          Fired when an issue is created.
 void issueDeleted(IssueEvent event)
          Fired when an issue is deleted.
 void issueGenericEvent(IssueEvent event)
          Fired for all other events, eg.
 void issueMoved(IssueEvent event)
          Fired when an issue is moved.
 void issueReopened(IssueEvent event)
          Fired when an issue is reopened.
 void issueResolved(IssueEvent event)
          Fired when an issue is resolved.
 void issueStarted(IssueEvent event)
          Fired when user starts work on an issue (start progress)
 void issueStopped(IssueEvent event)
          Fired when user stops work on an issue (stop progress)
 void issueUpdated(IssueEvent event)
          Fired when an issue is updated.
 void issueWorklogDeleted(IssueEvent event)
           
 void issueWorkLogged(IssueEvent event)
          Fired when work is logged against an issue.
 void issueWorklogUpdated(IssueEvent event)
           
 boolean isUnique()
          Indicates whether JIRA should only create one instance of this listener.
 void workflowEvent(IssueEvent event)
          Determines how the event should be processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIssueEventListener

public AbstractIssueEventListener()
Method Detail

issueCreated

public void issueCreated(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is created.

Specified by:
issueCreated in interface IssueEventListener

issueUpdated

public void issueUpdated(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is updated.

The update changelog will be attached to the event as an action.

Specified by:
issueUpdated in interface IssueEventListener

issueAssigned

public void issueAssigned(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is assigned or unassigned.

Check the issue assignee to work out which is the case.

Specified by:
issueAssigned in interface IssueEventListener

issueResolved

public void issueResolved(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is resolved.

The resolution comment (if there is one) will be attached to the event as an action.

Specified by:
issueResolved in interface IssueEventListener

issueClosed

public void issueClosed(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is closed.

The closure comment (if there is one) will be attached to the event as an action.

Specified by:
issueClosed in interface IssueEventListener

issueCommented

public void issueCommented(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when a user comments on an issue.

The comment will be attached to the event as an action.

Specified by:
issueCommented in interface IssueEventListener

issueCommentEdited

public void issueCommentEdited(IssueEvent event)

issueCommentDeleted

public void issueCommentDeleted(IssueEvent event)
The default behaviour for this method calls issueUpdated(IssueEvent event). This preserves the behaviour of JIRA prior to v5.2

Since:
v5.2

issueWorklogUpdated

public void issueWorklogUpdated(IssueEvent event)

issueWorklogDeleted

public void issueWorklogDeleted(IssueEvent event)

issueReopened

public void issueReopened(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is reopened.

Specified by:
issueReopened in interface IssueEventListener

issueDeleted

public void issueDeleted(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is deleted.

Specified by:
issueDeleted in interface IssueEventListener

issueWorkLogged

public void issueWorkLogged(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when work is logged against an issue.

The work log will be attached to the event as an action.

Specified by:
issueWorkLogged in interface IssueEventListener

issueStarted

public void issueStarted(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when user starts work on an issue (start progress)

Specified by:
issueStarted in interface IssueEventListener

issueStopped

public void issueStopped(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when user stops work on an issue (stop progress)

Specified by:
issueStopped in interface IssueEventListener

issueMoved

public void issueMoved(IssueEvent event)
Description copied from interface: IssueEventListener
Fired when an issue is moved.

Specified by:
issueMoved in interface IssueEventListener

issueGenericEvent

public void issueGenericEvent(IssueEvent event)
Description copied from interface: IssueEventListener
Fired for all other events, eg. those fired from new workflow transitions.

Specified by:
issueGenericEvent in interface IssueEventListener

workflowEvent

public void workflowEvent(IssueEvent event)
Determines how the event should be processed. Based on the event type ID within the event, the appropriate actions are called.

An event with an unknown event type ID is logged and discarded.

The customEvent method should be implemented to deal with any custom events that are added to the system

Specified by:
workflowEvent in interface IssueEventListener
Parameters:
event - - the IssueEvent object containing the event type ID

customEvent

public void customEvent(IssueEvent event)
Implement this method to deal with any custom events within the system

Specified by:
customEvent in interface IssueEventListener
Parameters:
event - IssueEvent

init

public void init(Map params)
Description copied from interface: JiraListener
Initialises the listener with the given parameters.

Specified by:
init in interface JiraListener
Parameters:
params - the initialisation parameters given in the Listener Properties

getAcceptedParams

public String[] getAcceptedParams()
Description copied from interface: JiraListener
Returns the parameters used by this listener.

Specified by:
getAcceptedParams in interface JiraListener
Returns:
a non-null array (can be empty)

isInternal

public boolean isInternal()
Description copied from interface: JiraListener
Indicates whether this listener is internal, meaning it cannot be removed by an administrator.

Specified by:
isInternal in interface JiraListener
Returns:
true if this is an Atlassian listener, otherwise false

isUnique

public boolean isUnique()
Description copied from interface: JiraListener
Indicates whether JIRA should only create one instance of this listener. For example, having multiple mail listeners would be fine if you wanted multiple mails sent out. For other listeners, such as cache listeners, it makes no sense to have multiple instances.

Specified by:
isUnique in interface JiraListener
Returns:
whether this listener should be a singleton

getDescription

public String getDescription()
Description copied from interface: JiraListener
Returns a textual description of the listener. You can include HTML if required, but do not use tables or DHTML, as the description may be displayed inside tables or frames.

A good description will describe what this listener does and explain the parameters required for configuring it.

Specified by:
getDescription in interface JiraListener
Returns:
a description of the listener, or null if no description is appropriate

getI18NBean

protected I18nHelper getI18NBean()


Copyright © 2002-2014 Atlassian. All Rights Reserved.