Cytoscape 2.8.0 API

cytoscape.plugin
Class PluginTracker

java.lang.Object
  extended by cytoscape.plugin.PluginTracker

public class PluginTracker
extends Object


Constructor Summary
protected PluginTracker(File file)
           
protected PluginTracker(File Dir, String FileName)
          Used for testing
 
Method Summary
protected  void addDownloadable(DownloadableInfo obj, PluginStatus Status)
           
 void clearCorruptedElements()
          Clears the list of elements and sets the found flag to false.
protected  void delete()
          Deletes the tracker file.
protected  List<DownloadableInfo> getDownloadableListByStatus(PluginStatus Status)
          Get the list of all downloadable object by their status.
protected  org.jdom.Element getMatchingInfoObj(DownloadableInfo Obj, PluginStatus Status)
          Matches one of the following rule: 1.
protected  List<PluginInfo> getPluginListByStatus(PluginStatus Status)
          Gets a list of plugins by their status.
protected  List<ThemeInfo> getThemeListByStatus(PluginStatus Status)
          Gets a list of themes by their status.
 int getTotalCorruptedElements()
           
protected  File getTrackerFile()
           
 boolean hasCorruptedElements()
           
protected  void removeDownloadable(DownloadableInfo obj, PluginStatus Status)
          Removes the given DownloadableInfo object from the list of plugins/themes sharing the given status.
 String toString()
           
protected  void write()
          Writes doc to file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginTracker

protected PluginTracker(File Dir,
                        String FileName)
                 throws IOException,
                        TrackerException
Used for testing

Parameters:
FileName - Xml file name
Dir - directory to to write xml file
Throws:
IOException
TrackerException

PluginTracker

protected PluginTracker(File file)
                 throws IOException,
                        TrackerException
Throws:
IOException
TrackerException
Method Detail

getTrackerFile

protected File getTrackerFile()

getPluginListByStatus

protected List<PluginInfo> getPluginListByStatus(PluginStatus Status)
Gets a list of plugins by their status. CURRENT: currently installed DELETED: to be deleted INSTALL: to be installed

Parameters:
Status -
Returns:
List of PluginInfo objects

getDownloadableListByStatus

protected List<DownloadableInfo> getDownloadableListByStatus(PluginStatus Status)
Get the list of all downloadable object by their status. CURRENT: currently installed DELETED: to be deleted INSTALLED: to be installed

Parameters:
Status -
Returns:

getThemeListByStatus

protected List<ThemeInfo> getThemeListByStatus(PluginStatus Status)
Gets a list of themes by their status. CURRENT: currently installed DELETED: to be deleted INSTALL: to be installed

Parameters:
Status -
Returns:
List of ThemeInfo objects

addDownloadable

protected void addDownloadable(DownloadableInfo obj,
                               PluginStatus Status)

removeDownloadable

protected void removeDownloadable(DownloadableInfo obj,
                                  PluginStatus Status)
Removes the given DownloadableInfo object from the list of plugins/themes sharing the given status.

Parameters:
obj -
Status -

getMatchingInfoObj

protected org.jdom.Element getMatchingInfoObj(DownloadableInfo Obj,
                                              PluginStatus Status)
Matches one of the following rule: 1. Plugin class name 2. uniqueID && projUrl 3. Plugin specific Url (on the assumption that no two plugins can be downloaded from the same url)

Parameters:
Obj -
Tag -
Returns:

write

protected void write()
Writes doc to file


hasCorruptedElements

public boolean hasCorruptedElements()
Returns:
True if one or more corrupted elements were found.

getTotalCorruptedElements

public int getTotalCorruptedElements()
Returns:
Total number of corrupted elements found in the file.

clearCorruptedElements

public void clearCorruptedElements()
Clears the list of elements and sets the found flag to false. This should only be called after checking the hadCorruptedElements() or getTotalCorruptedElements();


toString

public String toString()
Overrides:
toString in class Object

delete

protected void delete()
Deletes the tracker file. This is currently never used outside of tests.


Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.