net.refractions.udig.issues
Class StrategizedIssuesList

java.lang.Object
  extended by net.refractions.udig.issues.StrategizedIssuesList
All Implemented Interfaces:
java.lang.Iterable<IIssue>, java.util.Collection<IIssue>, java.util.List<IIssue>, IIssuesList, IRemoteIssuesList

public class StrategizedIssuesList
extends java.lang.Object
implements IRemoteIssuesList

An implementation that uses a strategy object to communicate with the storage device. This object takes care of notification listening and saving.

Since:
1.1.0
Author:
Jesse

Constructor Summary
StrategizedIssuesList()
           
 
Method Summary
 boolean add(IIssue o)
           
 void add(int index, IIssue element)
           
 boolean addAll(java.util.Collection<? extends IIssue> c)
           
 boolean addAll(int index, java.util.Collection<? extends IIssue> c)
           
 void addFirst(IIssue o)
           
 void addLast(IIssue o)
           
 void addListener(IIssuesListListener listener)
          Add Listener to list
 void clear()
           
 boolean contains(java.lang.Object arg0)
           
 boolean containsAll(java.util.Collection<?> arg0)
           
 boolean equals(java.lang.Object arg0)
           
 IIssue get(int index)
           
 java.lang.String getExtensionID()
          Returns The extension id of the list as defined in a plugin.xml file.
 java.util.Set<java.lang.String> getGroups()
          Returns a set of all the issue groups that are in the list.
 java.util.List<IIssue> getIssues(java.lang.String groupId)
          Gets the all issues with the groupID
 int hashCode()
           
 int indexOf(java.lang.Object arg0)
           
 void init(IListStrategy strategy)
           
 boolean isEmpty()
           
 java.util.Iterator<IIssue> iterator()
           
 int lastIndexOf(java.lang.Object arg0)
           
 java.util.ListIterator<IIssue> listIterator()
           
 java.util.ListIterator<IIssue> listIterator(int index)
           
 void refresh()
          Queries the data source to ensure that the list accurately reflects the state of the backend store
 IIssue remove()
           
 IIssue remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 IIssue removeFirst()
           
 void removeIssues(java.lang.String groupId)
          Remove all issues in the group.
 IIssue removeLast()
           
 void removeListener(IIssuesListListener listener)
          Remove listener from list
 boolean retainAll(java.util.Collection<?> c)
           
 void save(IIssue issue)
          Writes the state of the IIssue out to the store.
 IIssue set(int index, IIssue element)
           
 void setStrategy(IListStrategy strategy)
           
 int size()
           
 java.util.List<IIssue> subList(int arg0, int arg1)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] arg0)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StrategizedIssuesList

public StrategizedIssuesList()
Method Detail

init

public void init(IListStrategy strategy)
          throws java.io.IOException
Throws:
java.io.IOException

refresh

public void refresh()
             throws java.io.IOException
Description copied from interface: IRemoteIssuesList
Queries the data source to ensure that the list accurately reflects the state of the backend store

Specified by:
refresh in interface IRemoteIssuesList
Throws:
java.io.IOException

add

public boolean add(IIssue o)
Specified by:
add in interface java.util.Collection<IIssue>
Specified by:
add in interface java.util.List<IIssue>

add

public void add(int index,
                IIssue element)
Specified by:
add in interface java.util.List<IIssue>

addAll

public boolean addAll(java.util.Collection<? extends IIssue> c)
Specified by:
addAll in interface java.util.Collection<IIssue>
Specified by:
addAll in interface java.util.List<IIssue>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends IIssue> c)
Specified by:
addAll in interface java.util.List<IIssue>

addFirst

public void addFirst(IIssue o)

addLast

public void addLast(IIssue o)

addListener

public void addListener(IIssuesListListener listener)
Description copied from interface: IIssuesList
Add Listener to list

Specified by:
addListener in interface IIssuesList
Parameters:
listener - listener to add

clear

public void clear()
Specified by:
clear in interface java.util.Collection<IIssue>
Specified by:
clear in interface java.util.List<IIssue>

contains

public boolean contains(java.lang.Object arg0)
Specified by:
contains in interface java.util.Collection<IIssue>
Specified by:
contains in interface java.util.List<IIssue>

containsAll

public boolean containsAll(java.util.Collection<?> arg0)
Specified by:
containsAll in interface java.util.Collection<IIssue>
Specified by:
containsAll in interface java.util.List<IIssue>

equals

public boolean equals(java.lang.Object arg0)
Specified by:
equals in interface java.util.Collection<IIssue>
Specified by:
equals in interface java.util.List<IIssue>
Overrides:
equals in class java.lang.Object

get

public IIssue get(int index)
Specified by:
get in interface java.util.List<IIssue>

getGroups

public java.util.Set<java.lang.String> getGroups()
Description copied from interface: IIssuesList
Returns a set of all the issue groups that are in the list.

Specified by:
getGroups in interface IIssuesList
Returns:
a set of all the issue groups.

getIssues

public java.util.List<IIssue> getIssues(java.lang.String groupId)
Description copied from interface: IIssuesList
Gets the all issues with the groupID

Specified by:
getIssues in interface IIssuesList
Parameters:
groupId - groupId of a group of issues
Returns:
all issues with the groupID

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<IIssue>
Specified by:
hashCode in interface java.util.List<IIssue>
Overrides:
hashCode in class java.lang.Object

indexOf

public int indexOf(java.lang.Object arg0)
Specified by:
indexOf in interface java.util.List<IIssue>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<IIssue>
Specified by:
isEmpty in interface java.util.List<IIssue>

iterator

public java.util.Iterator<IIssue> iterator()
Specified by:
iterator in interface java.lang.Iterable<IIssue>
Specified by:
iterator in interface java.util.Collection<IIssue>
Specified by:
iterator in interface java.util.List<IIssue>

lastIndexOf

public int lastIndexOf(java.lang.Object arg0)
Specified by:
lastIndexOf in interface java.util.List<IIssue>

listIterator

public java.util.ListIterator<IIssue> listIterator()
Specified by:
listIterator in interface java.util.List<IIssue>

listIterator

public java.util.ListIterator<IIssue> listIterator(int index)
Specified by:
listIterator in interface java.util.List<IIssue>

remove

public IIssue remove()

remove

public IIssue remove(int index)
Specified by:
remove in interface java.util.List<IIssue>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<IIssue>
Specified by:
remove in interface java.util.List<IIssue>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<IIssue>
Specified by:
removeAll in interface java.util.List<IIssue>

removeFirst

public IIssue removeFirst()

removeIssues

public void removeIssues(java.lang.String groupId)
Description copied from interface: IIssuesList
Remove all issues in the group.

Specified by:
removeIssues in interface IIssuesList
Parameters:
groupId - group id of issues to remove

removeLast

public IIssue removeLast()

removeListener

public void removeListener(IIssuesListListener listener)
Description copied from interface: IIssuesList
Remove listener from list

Specified by:
removeListener in interface IIssuesList
Parameters:
listener - listener to remove

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<IIssue>
Specified by:
retainAll in interface java.util.List<IIssue>

set

public IIssue set(int index,
                  IIssue element)
Specified by:
set in interface java.util.List<IIssue>

size

public int size()
Specified by:
size in interface java.util.Collection<IIssue>
Specified by:
size in interface java.util.List<IIssue>

subList

public java.util.List<IIssue> subList(int arg0,
                                      int arg1)
Specified by:
subList in interface java.util.List<IIssue>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<IIssue>
Specified by:
toArray in interface java.util.List<IIssue>

toArray

public <T> T[] toArray(T[] arg0)
Specified by:
toArray in interface java.util.Collection<IIssue>
Specified by:
toArray in interface java.util.List<IIssue>

toString

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

save

public void save(IIssue issue)
          throws java.io.IOException
Description copied from interface: IRemoteIssuesList
Writes the state of the IIssue out to the store.

Specified by:
save in interface IRemoteIssuesList
Throws:
java.io.IOException

setStrategy

public void setStrategy(IListStrategy strategy)

getExtensionID

public java.lang.String getExtensionID()
Description copied from interface: IIssuesList
Returns The extension id of the list as defined in a plugin.xml file.

Specified by:
getExtensionID in interface IIssuesList
Returns:
The extension id of the list as defined in a plugin.xml file.