org.kohsuke.jnt
Class IssueEditor

java.lang.Object
  extended by org.kohsuke.jnt.AbstractIssueEditor<IssueEditor>
      extended by org.kohsuke.jnt.IssueEditor

public final class IssueEditor
extends AbstractIssueEditor<IssueEditor>

Object for making updates to an issue.

The procedure to update an issue will be as follows:

 // first obtain the JNIssue for the issue you'd like to update
 JNIssue issue = ...;

 // then begin an edit session
 IssueEditor e = issue.beginEdit();

 // call methods on IssueEditor to update as many fields as you need
 ...

 // then finally commit the change
 e.update(comment);
 

The class follows the fluent API pattern so that you can write multiple changes in a concise fashion.

Author:
Kohsuke Kawaguchi

Method Summary
 IssueEditor accept()
          Accepts an issue
 IssueEditor assignTo(JNUser u)
          Assigns this issue to the given user.
 IssueEditor close()
          Marks the issue as closed.
 void commit(String comment)
          Commits the change.
 IssueEditor duplicateOf(JNIssue issue)
          Marks this issue as a duplicate of another issue.
 IssueEditor reopen()
          Reopens an issue
 IssueEditor resolve(IssueResolution resolution)
          Marks the issue as resolved, with the specified resolution.
 IssueEditor verify()
          Marks the issue as verified.
 
Methods inherited from class org.kohsuke.jnt.AbstractIssueEditor
appendToWhiteBoard, setField, setPriority, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolve

public IssueEditor resolve(IssueResolution resolution)
Marks the issue as resolved, with the specified resolution.


accept

public IssueEditor accept()
Accepts an issue


reopen

public IssueEditor reopen()
Reopens an issue


verify

public IssueEditor verify()
Marks the issue as verified.


close

public IssueEditor close()
Marks the issue as closed.


assignTo

public IssueEditor assignTo(JNUser u)
Assigns this issue to the given user.


duplicateOf

public IssueEditor duplicateOf(JNIssue issue)
Marks this issue as a duplicate of another issue.


commit

public void commit(String comment)
            throws ProcessingException
Commits the change.

Parameters:
comment - Description of this update. This is a mandatory field.
Throws:
ProcessingException


Copyright © 2003-2010 Kohsuke Kawaguchi. All Rights Reserved.