net.refractions.udig.issues
Class AbstractIssue

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

public abstract class AbstractIssue
extends java.lang.Object
implements IIssue

Implements the non-required methods of IIssue.

Since:
1.0.0
Author:
jones

Constructor Summary
AbstractIssue()
           
 
Method Summary
 void addIssueListener(IIssueListener listener)
          Adds a IIssueListener to the issue.
 ReferencedEnvelope getBounds()
          Returns the area that this issue affects.
 java.lang.String getDescription()
          Gets the description of the Issue.
 java.lang.String getEditorID()
          returns null
 IEditorInput getEditorInput()
          Returns null;
 java.lang.String getGroupId()
          Default implementation returns "default".
 java.lang.String getId()
          Returns the id of the issue.
 java.lang.String getPerspectiveID()
          Returns null
 Priority getPriority()
          Returns the priority of the issue.
 java.lang.Object getProperty(java.lang.String property)
          Default implementation always returns null;
 java.lang.String[] getPropertyNames()
          Default implementation returns an empty array.
 Resolution getResolution()
          Indicates whether the issue has been resolved.
 void getViewMemento(IMemento memento)
          If the ViewPart identified by getViewPartID is a view and the IMemento returned by this method is non-null, the view will be initialized with the memento.
 java.lang.String getViewPartId()
          Returns the id of the ViewPart that the issue requires in order to be resolved.
protected  void notifyListeners(IssueChangeType type, java.lang.Object newValue, java.lang.Object oldValue)
           
protected  void notifyPropertyListeners(java.lang.String propertyName, java.lang.Object newValue, java.lang.Object oldValue)
           
 void removeIssueListener(IIssueListener listener)
          Removes a IIssueListener from the issue.
protected  void setBounds(ReferencedEnvelope bounds)
           
 void setDescription(java.lang.String description)
          Sets the description of the issue.
protected  void setGroupId(java.lang.String groupId)
           
 void setId(java.lang.String id)
          Sets the id of the issue.
 void setPriority(Priority newPriority)
          Sets the priority of the issue.
protected  void setProperty(java.lang.String propertyName, java.lang.String value)
          Sets a property
 void setResolution(Resolution newResolution)
          Sets the state of resolution.
protected  void setViewMemento(IMemento viewMemento)
          Memento is stored and is copied to memento argument in getViewMemento(IMemento)
 java.lang.String 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
fixIssue, getExtensionID, getProblemObject, init, save
 

Constructor Detail

AbstractIssue

public AbstractIssue()
Method Detail

getViewPartId

public java.lang.String getViewPartId()
Description copied from interface: IIssue
Returns the id of the ViewPart that the issue requires in order to be resolved. This is called by the issues view. If a non-null value is returned, the IssuesView will show the ViewPart identified by the id. Otherwise nothing is done.

Specified by:
getViewPartId in interface IIssue
Returns:
The id of the ViewPart the issue concerns.

getViewMemento

public void getViewMemento(IMemento memento)
Description copied from interface: IIssue
If the ViewPart identified by getViewPartID is a view and the IMemento returned by this method is non-null, the view will be initialized with the memento.

Specified by:
getViewMemento in interface IIssue

setViewMemento

protected void setViewMemento(IMemento viewMemento)
Memento is stored and is copied to memento argument in getViewMemento(IMemento)

Parameters:
viewMemento -

getEditorInput

public IEditorInput getEditorInput()
Returns null;

Specified by:
getEditorInput in interface IIssue

getEditorID

public java.lang.String getEditorID()
returns null

Specified by:
getEditorID in interface IIssue
Returns:
The id of the editor that will be opened to edit the Editor Input.

getPerspectiveID

public java.lang.String getPerspectiveID()
Returns null

Specified by:
getPerspectiveID in interface IIssue
Returns:
id of a perspective to open. Or null.

getResolution

public final Resolution getResolution()
Description copied from interface: IIssue
Indicates whether the issue has been resolved. This method MUST return quickly. If the resolution state cannot be determined quickly then either Resolution#UNKNOWN or Resolution#UNRESOLVED should be returned.

Specified by:
getResolution in interface IIssue
Returns:
true if the issue no longer exists.

setResolution

public void setResolution(Resolution newResolution)
Description copied from interface: IIssue
Sets the state of resolution.

Specified by:
setResolution in interface IIssue
Parameters:
newResolution - the new state.

setPriority

public void setPriority(Priority newPriority)
Description copied from interface: IIssue
Sets the priority of the issue.

Specified by:
setPriority in interface IIssue

getPriority

public final Priority getPriority()
Description copied from interface: IIssue
Returns the priority of the issue.

Specified by:
getPriority in interface IIssue
Returns:
the priority of the issue.

getDescription

public java.lang.String getDescription()
Description copied from interface: IIssue
Gets the description of the Issue. Should be a single line and around one line. Should be translateable.

Specified by:
getDescription in interface IIssue
Returns:
the description of the Issue.

setDescription

public final void setDescription(java.lang.String description)
Description copied from interface: IIssue
Sets the description of the issue.

Specified by:
setDescription in interface IIssue

getGroupId

public java.lang.String getGroupId()
Default implementation returns "default".

Specified by:
getGroupId in interface IIssue

getPropertyNames

public java.lang.String[] getPropertyNames()
Default implementation returns an empty array.

Specified by:
getPropertyNames in interface IIssue
Returns:
an array of all the property names in the issue

getProperty

public java.lang.Object getProperty(java.lang.String property)
Default implementation always returns null;

Specified by:
getProperty in interface IIssue
Parameters:
property - the name/key of the property

setProperty

protected void setProperty(java.lang.String propertyName,
                           java.lang.String value)
Sets a property

Parameters:
propertyName - name of the property added
value - value of the property.

getBounds

public ReferencedEnvelope getBounds()
Description copied from interface: IIssue
Returns the area that this issue affects. May return null.

Specified by:
getBounds in interface IIssue
Returns:
Returns the area that this issue affects. May return null.

setBounds

protected void setBounds(ReferencedEnvelope bounds)

setGroupId

protected void setGroupId(java.lang.String groupId)

getId

public java.lang.String getId()
Description copied from interface: IIssue
Returns the id of the issue.

Specified by:
getId in interface IIssue
Returns:
id of the issue.

setId

public void setId(java.lang.String id)
Description copied from interface: IIssue
Sets the id of the issue. This should only be called by the Issues list never by client code.

Specified by:
setId in interface IIssue

addIssueListener

public void addIssueListener(IIssueListener listener)
Description copied from interface: IIssue
Adds a IIssueListener to the issue. The IIssuesManager listens to the issue in order to know which issues need to be saved. If an implementation does not raise events when a property of the issue is changed and it does not call IIssuesManager.save(IProgressMonitor) then the change will not be saved.

Specified by:
addIssueListener in interface IIssue
Parameters:
listener - listener to add.

removeIssueListener

public void removeIssueListener(IIssueListener listener)
Description copied from interface: IIssue
Removes a IIssueListener from the issue.

Specified by:
removeIssueListener in interface IIssue
Parameters:
listener - listener to remove.

notifyListeners

protected void notifyListeners(IssueChangeType type,
                               java.lang.Object newValue,
                               java.lang.Object oldValue)

notifyPropertyListeners

protected void notifyPropertyListeners(java.lang.String propertyName,
                                       java.lang.Object newValue,
                                       java.lang.Object oldValue)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object