net.sourceforge.groboutils.pmti.v1
Interface IEditableIssue

All Superinterfaces:
IIssue
All Known Implementing Classes:
AbstractEditableIssue

public interface IEditableIssue
extends IIssue

Allows for editing of an issue. The only parts that can't be edited are the ID and type, since those uniquely identify the issue at hand. Editing an issue has several constraints that should be known by the user:

Since:
July 6, 2002
Version:
$Date: 2003/02/10 22:51:54 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Method Summary
 void commit()
          Commits all changes from the issue to the tracker.
 IEditableAttributeSet getEditableAttributes()
          This is a synonymn for getAttributes(), but this explicitly sets the returned value as an editable set, without the need for an extra cast.
 IEditableIssueState[] getNextStates()
          Returns the list of all states that this issue can move to next.
 boolean hasShortDescriptionChanged()
           
 boolean hasStateChanged()
           
 void setShortDescription(java.lang.String desc)
           
 void setState(IIssueState state)
          Sets the current state.
 
Methods inherited from interface net.sourceforge.groboutils.pmti.v1.IIssue
getAttributes, getID, getShortDescription, getState, getType, reload
 

Method Detail

setShortDescription

public void setShortDescription(java.lang.String desc)

hasShortDescriptionChanged

public boolean hasShortDescriptionChanged()
Returns:
true if setShortDescription( String ) was called with a different description string than the original issue, otherwise false.

getNextStates

public IEditableIssueState[] getNextStates()
Returns the list of all states that this issue can move to next. This is part of the workflow logic of the underlying PMT. The returned states may be safely edited without any affect; the only effect will be when the state is explicitly set. This will always return, in index 0, a copy of the current state as editable.


setState

public void setState(IIssueState state)
              throws ProblemManagerException
Sets the current state. Since there is no getEditableState() method, use this method if any information in the current state needs to be updated. You can retrieve the current state as an editable state using getNextStates()[0], but note that any changes to that editable version will not affect the tracker's state unless that editable instance is explicitly set in this method.

Throws:
ProblemManagerException - if the input state is not a valid next state.

hasStateChanged

public boolean hasStateChanged()
Returns:
true if the setState( IIssueState ) method has been invoked and did not throw an exception, otherwise false. Note that even if the set state is an unchanged version of the current issue's state, this will still return true.

getEditableAttributes

public IEditableAttributeSet getEditableAttributes()
This is a synonymn for getAttributes(), but this explicitly sets the returned value as an editable set, without the need for an extra cast. The returned attribute set may be safely edited, and changes there will affect the issue that returned them.


commit

public void commit()
            throws ProblemManagerException
Commits all changes from the issue to the tracker.

In theory, issues should never be removed. However, some systems allow them to be deleted (say, if there was an accidental creation). In this case, an IssueRemovedException will be thrown.

Throws:
ProblemManagerException - if there was an underlying tracker error.


Copyright © 2001-2003 by The GroboUtils Project