|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.groboutils.pmti.v1.defimpl.AbstractEditableIssue
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:
Constructor Summary | |
AbstractEditableIssue(IIssue base)
|
Method Summary | |
protected void |
assertStateCanBeNext(IIssueState state)
|
abstract void |
commit()
Commits all changes from the issue to the tracker. |
protected abstract IEditableAttributeSet |
createEditableAttributeSet(IAttributeSet as)
Creates an editable set of attributes based on the immutable attribute set. |
protected abstract IIssueState |
createImmutableIssueState(IEditableIssueState eis)
Create a non-editable version of eis. |
protected abstract IEditableIssueState[] |
createNextEditableIssueStates(IIssueState is)
Creates a set of editable issue states that can be set as 'next' for is. |
IAttributeSet |
getAttributes()
Returns a list of all attributes associated with this issue. |
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. |
java.lang.String |
getID()
Returns the unique ID associated with this issue. |
IEditableIssueState[] |
getNextStates()
Returns the list of all states that this issue can move to next. |
java.lang.String |
getShortDescription()
Retrieves the short description of the issue. |
IIssueState |
getState()
Queries the "state" of the issue. |
java.lang.String |
getType()
Returns the type of issue. |
boolean |
hasShortDescriptionChanged()
|
boolean |
hasStateChanged()
|
abstract IIssue |
reload()
Returns a new issue instance, containing the most up-to-date tracker information for this issue. |
void |
setShortDescription(java.lang.String desc)
|
void |
setState(IIssueState state)
Sets the current state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractEditableIssue(IIssue base)
Method Detail |
public java.lang.String getID()
IIssue
getID
in interface IIssue
public java.lang.String getType()
IIssue
NOTE: this field may be deprecated in the future in favor of specific IAttributeSet types.
getType
in interface IIssue
IIssue.getAttributes()
public java.lang.String getShortDescription()
IIssue
getShortDescription
in interface IIssue
public IIssueState getState()
IIssue
Some trackers may have different state categories for different issue types.
getState
in interface IIssue
public IAttributeSet getAttributes()
IIssue
getAttributes
in interface IIssue
public abstract IIssue reload() throws ProblemManagerException
IIssue
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.
reload
in interface IIssue
ProblemManagerException
- if there was an underlying tracker
error.public void setShortDescription(java.lang.String desc)
setShortDescription
in interface IEditableIssue
public boolean hasShortDescriptionChanged()
hasShortDescriptionChanged
in interface IEditableIssue
public IEditableIssueState[] getNextStates()
getNextStates
in interface IEditableIssue
public void setState(IIssueState state) throws ProblemManagerException
setState
in interface IEditableIssue
ProblemManagerException
- if the input state is not a valid
next state.public boolean hasStateChanged()
hasStateChanged
in interface IEditableIssue
public IEditableAttributeSet getEditableAttributes()
getEditableAttributes
in interface IEditableIssue
public abstract void commit() throws ProblemManagerException
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.
commit
in interface IEditableIssue
ProblemManagerException
- if there was an underlying tracker
error.protected abstract IEditableIssueState[] createNextEditableIssueStates(IIssueState is)
protected abstract IEditableAttributeSet createEditableAttributeSet(IAttributeSet as)
protected abstract IIssueState createImmutableIssueState(IEditableIssueState eis)
protected void assertStateCanBeNext(IIssueState state) throws ProblemManagerException
ProblemManagerException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |