net.refractions.udig.issues
Class AbstractFixableIssue

java.lang.Object
  extended by net.refractions.udig.issues.AbstractIssue
      extended by net.refractions.udig.issues.AbstractFixableIssue
All Implemented Interfaces:
IIssue
Direct Known Subclasses:
FixableIssue

public abstract class AbstractFixableIssue
extends AbstractIssue

Base implementation of IIssue which persists a fixerMemento (for use with an IssueFixer).

Since:
1.1.0
Author:
chorner

Field Summary
static java.lang.String ATT_CLASS
           
static java.lang.String ATT_ID
           
static java.lang.String ATT_KEY
           
static java.lang.String ATT_REQKEY
           
static java.lang.String ATT_TARGET
           
static java.lang.String KEY_FIXERMEMENTO
           
static java.lang.String XPID_ISSUEFIXER
           
 
Constructor Summary
AbstractFixableIssue()
           
 
Method Summary
protected  IFixer findIssueFixer(IMemento fixerMemento)
           
 void fixIssue(IViewPart part, IEditorPart editor)
          This is called when the user wishes to fix the issue.
 IMemento getFixerMemento()
          Obtains the fixer memento, which contains issue state and initialization data for the IssueFixer.
 void init(IMemento memento, IMemento viewMemento, java.lang.String issueId, java.lang.String groupId, ReferencedEnvelope bounds)
          Called by framework to initialize the Issue.
 void save(IMemento memento)
          Subclasses should override and call super.save().
 void setFixerMemento(IMemento fixerMemento)
          Overwrites the current fixerMemento with new issue state data.
 
Methods inherited from class net.refractions.udig.issues.AbstractIssue
addIssueListener, getBounds, getDescription, getEditorID, getEditorInput, getGroupId, getId, getPerspectiveID, getPriority, getProperty, getPropertyNames, getResolution, getViewMemento, getViewPartId, notifyListeners, notifyPropertyListeners, removeIssueListener, setBounds, setDescription, setGroupId, setId, setPriority, setProperty, setResolution, setViewMemento, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.refractions.udig.issues.IIssue
getExtensionID, getProblemObject
 

Field Detail

ATT_ID

public static final java.lang.String ATT_ID
See Also:
Constant Field Values

ATT_CLASS

public static final java.lang.String ATT_CLASS
See Also:
Constant Field Values

ATT_TARGET

public static final java.lang.String ATT_TARGET
See Also:
Constant Field Values

ATT_KEY

public static final java.lang.String ATT_KEY
See Also:
Constant Field Values

ATT_REQKEY

public static final java.lang.String ATT_REQKEY
See Also:
Constant Field Values

KEY_FIXERMEMENTO

public static final java.lang.String KEY_FIXERMEMENTO
See Also:
Constant Field Values

XPID_ISSUEFIXER

public static final java.lang.String XPID_ISSUEFIXER
See Also:
Constant Field Values
Constructor Detail

AbstractFixableIssue

public AbstractFixableIssue()
Method Detail

fixIssue

public void fixIssue(IViewPart part,
                     IEditorPart editor)
Description copied from interface: IIssue
This is called when the user wishes to fix the issue. It will be called after the WorkbenchPath has been shown and set with the memento if it is a view.

This method can do other initializations and return or it can run the user through a workflow and only return when the problem is fixed or the user cancels the operation.

This method does NOT have to fix the issue

This method IS run in the display thread.

Parameters:
part - The workbenchpart identified by IIssue.getViewPartId() or null.
editor - The editor that was identified by IIssue.getEditorID() or null.
See Also:
FeatureIssue

findIssueFixer

protected IFixer findIssueFixer(IMemento fixerMemento)
Parameters:
fixerMemento -
Returns:
IssueFixer

init

public void init(IMemento memento,
                 IMemento viewMemento,
                 java.lang.String issueId,
                 java.lang.String groupId,
                 ReferencedEnvelope bounds)
Description copied from interface: IIssue
Called by framework to initialize the Issue.

Parameters:
memento - The saved state of a Issue. May be null.
viewMemento - the memento for initializing the view, may be null
issueId - the id the issue is assigned. IIssue.getId() must return the same id.
groupId - the group id of the issue.
bounds - the bounds of the issue.

save

public void save(IMemento memento)
Subclasses should override and call super.save().

Parameters:
memento - the memento to populate with state data.

getFixerMemento

public IMemento getFixerMemento()
Obtains the fixer memento, which contains issue state and initialization data for the IssueFixer.

Returns:
fixerMemento

setFixerMemento

public void setFixerMemento(IMemento fixerMemento)
Overwrites the current fixerMemento with new issue state data.

Parameters:
fixerMemento -