com.atlassian.jira.event.listeners
Class DebugListener

java.lang.Object
  extended by com.atlassian.jira.event.issue.AbstractIssueEventListener
      extended by com.atlassian.jira.event.listeners.DebugListener
All Implemented Interfaces:
IssueEventListener, JiraListener, UserEventListener, EventListener
Direct Known Subclasses:
DebugParamListener

public class DebugListener
extends AbstractIssueEventListener
implements UserEventListener

A listener for debugging - prints everything it 'hears' to System.err

Useful for debuggin when certain events are fired, and the content of those events.


Constructor Summary
DebugListener()
           
 
Method Summary
 void customEvent(IssueEvent event)
          Implement this method to deal with any custom events within the system
 String[] getAcceptedParams()
          Get a list of the parameters for this listener.
 String getDescription()
          A textual description of the listener.
 void init(Map params)
          Initialise the listener.
 boolean isInternal()
          Indicates whether administrators can delete this listener from within the web interface.
 void issueAssigned(IssueEvent event)
          Fired when an issue is assigned or unassigned.
 void issueClosed(IssueEvent event)
          Fired when an issue is closed.
 void issueCommented(IssueEvent event)
          Fired when a user comments on an issue.
 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 issueUpdated(IssueEvent event)
          Fired when an issue is updated.
 void issueWorkLogged(IssueEvent event)
          Fired when work is logged against an issue.
 boolean isUnique()
          Whether this listener class should be unique.
 void userCreated(UserEvent event)
          Fired when a user is created automatically
 void userForgotPassword(UserEvent event)
          Fired when a user indicates they have forgotten their password
 void userForgotUsername(UserEvent event)
           
 void userSignup(UserEvent event)
          Fired when a user signs up manually
 
Methods inherited from class com.atlassian.jira.event.issue.AbstractIssueEventListener
getI18NBean, issueCommentEdited, issueStarted, issueStopped, issueWorklogDeleted, issueWorklogUpdated, workflowEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugListener

public DebugListener()
Method Detail

init

public void init(Map params)
Description copied from interface: JiraListener
Initialise the listener.

For custom listeners, the list of parameters is always empty.

Specified by:
init in interface JiraListener
Overrides:
init in class AbstractIssueEventListener

getAcceptedParams

public String[] getAcceptedParams()
Description copied from interface: JiraListener
Get a list of the parameters for this listener.

Specified by:
getAcceptedParams in interface JiraListener
Overrides:
getAcceptedParams in class AbstractIssueEventListener

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
Overrides:
issueAssigned in class AbstractIssueEventListener

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
Overrides:
issueClosed in class AbstractIssueEventListener

issueCreated

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

Specified by:
issueCreated in interface IssueEventListener
Overrides:
issueCreated in class AbstractIssueEventListener

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
Overrides:
issueResolved in class AbstractIssueEventListener

issueReopened

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

Specified by:
issueReopened in interface IssueEventListener
Overrides:
issueReopened in class AbstractIssueEventListener

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
Overrides:
issueUpdated in class AbstractIssueEventListener

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
Overrides:
issueCommented in class AbstractIssueEventListener

issueDeleted

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

Specified by:
issueDeleted in interface IssueEventListener
Overrides:
issueDeleted in class AbstractIssueEventListener

issueMoved

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

Specified by:
issueMoved in interface IssueEventListener
Overrides:
issueMoved in class AbstractIssueEventListener

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
Overrides:
issueWorkLogged in class AbstractIssueEventListener

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
Overrides:
issueGenericEvent in class AbstractIssueEventListener

customEvent

public void customEvent(IssueEvent event)
Description copied from class: AbstractIssueEventListener
Implement this method to deal with any custom events within the system

Specified by:
customEvent in interface IssueEventListener
Overrides:
customEvent in class AbstractIssueEventListener

userSignup

public void userSignup(UserEvent event)
Description copied from interface: UserEventListener
Fired when a user signs up manually

Specified by:
userSignup in interface UserEventListener

userCreated

public void userCreated(UserEvent event)
Description copied from interface: UserEventListener
Fired when a user is created automatically

Specified by:
userCreated in interface UserEventListener

userForgotPassword

public void userForgotPassword(UserEvent event)
Description copied from interface: UserEventListener
Fired when a user indicates they have forgotten their password

Specified by:
userForgotPassword in interface UserEventListener

userForgotUsername

public void userForgotUsername(UserEvent event)
Specified by:
userForgotUsername in interface UserEventListener

isInternal

public boolean isInternal()
Description copied from interface: JiraListener
Indicates whether administrators can delete this listener from within the web interface.

Basically only Atlassian listeners should return true from this.

Specified by:
isInternal in interface JiraListener
Overrides:
isInternal in class AbstractIssueEventListener

isUnique

public boolean isUnique()
Description copied from interface: JiraListener
Whether this listener class should be unique. Some listeners are fine to have multiples, and some are not.

Having multiple mail listeners could be fine - if you wanted multiple mails sent out.

With other listeners, such as the cache listeners, it makes no sense to have multiple listeners of the one class.

Specified by:
isUnique in interface JiraListener
Overrides:
isUnique in class AbstractIssueEventListener
Returns:
Whether this listener class should be unique.

getDescription

public String getDescription()
Description copied from interface: JiraListener
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 / frames.

A good description will describe what this listener does, and then explains the parameters required for configuring the listener.

If no description is appropriate, return null.

Specified by:
getDescription in interface JiraListener
Overrides:
getDescription in class AbstractIssueEventListener
Returns:
A HTML description of the listener


Copyright © 2002-2008 Atlassian. All Rights Reserved.