org.gudy.azureus2.core3.category
Interface Category

All Superinterfaces:
Tag
All Known Implementing Classes:
CategoryImpl

public interface Category
extends Tag

A Category for grouping torrents (DownloadManagers)

Author:
TuxPaper

Field Summary
static java.lang.String AT_AUTO_TRANSCODE_TARGET
           
static java.lang.String AT_RSS_GEN
           
static java.lang.String AT_UPLOAD_PRIORITY
           
static int TYPE_ALL
          Category which contains all DownloadManagers
static int TYPE_UNCATEGORIZED
          Category which contains DownloadManagers that do not have a category assigned to them.
static int TYPE_USER
          User created Category
 
Fields inherited from interface com.aelitis.azureus.core.tag.Tag
TP_SETTINGS_REQUESTED
 
Method Summary
 void addCategoryListener(CategoryListener l)
          Add a Category Listener
 void addManager(DownloadManagerState manager)
          Add a DownloadManager to this category.
 void dump(IndentWriter writer)
           
 boolean getBooleanAttribute(java.lang.String name)
           
 java.util.List<DownloadManager> getDownloadManagers(java.util.List<DownloadManager> all_download_managers)
          Retrieve a list of DownloadManagers for this category
 int getDownloadSpeed()
           
 int getIntAttribute(java.lang.String name)
           
 java.lang.String getName()
          Retrieve the name of the category.
 java.lang.String getStringAttribute(java.lang.String name)
           
 int getType()
          Retrieves what type of Category this is
 int getUploadSpeed()
           
 boolean hasCategoryListener(CategoryListener l)
           
 void removeCategoryListener(CategoryListener l)
          Remove a Category Listener
 void removeManager(DownloadManagerState manager)
          Remove a DownloadManager object from this Category.
 void setBooleanAttribute(java.lang.String name, boolean value)
           
 void setDownloadSpeed(int speed)
           
 void setIntAttribute(java.lang.String name, int value)
           
 void setStringAttribute(java.lang.String name, java.lang.String value)
           
 void setUploadSpeed(int speed)
           
 
Methods inherited from interface com.aelitis.azureus.core.tag.Tag
addTaggable, addTagListener, canBePublic, getColor, getDescription, getGroup, getImageID, getTaggableAddedTime, getTaggableTypes, getTagged, getTaggedCount, getTagID, getTagName, getTagType, getTagUID, getTransientProperty, hasTaggable, isPublic, isTagAuto, isVisible, removeTag, removeTaggable, removeTagListener, requestAttention, setCanBePublic, setColor, setDescription, setGroup, setImageID, setPublic, setTagName, setTransientProperty, setVisible
 
Methods inherited from interface org.gudy.azureus2.plugins.tag.Tag
addListener, getTaggables, getTagName, removeListener
 

Field Detail

TYPE_USER

static final int TYPE_USER
User created Category

See Also:
Constant Field Values

TYPE_ALL

static final int TYPE_ALL
Category which contains all DownloadManagers

See Also:
Constant Field Values

TYPE_UNCATEGORIZED

static final int TYPE_UNCATEGORIZED
Category which contains DownloadManagers that do not have a category assigned to them. Currently not used.

See Also:
Constant Field Values

AT_AUTO_TRANSCODE_TARGET

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

AT_RSS_GEN

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

AT_UPLOAD_PRIORITY

static final java.lang.String AT_UPLOAD_PRIORITY
See Also:
Constant Field Values
Method Detail

addCategoryListener

void addCategoryListener(CategoryListener l)
Add a Category Listener

Parameters:
l - Listener to add

removeCategoryListener

void removeCategoryListener(CategoryListener l)
Remove a Category Listener

Parameters:
l - Listener to remove

hasCategoryListener

boolean hasCategoryListener(CategoryListener l)

getName

java.lang.String getName()
Retrieve the name of the category. All category names are unique.

Returns:
If type is TYPE_USER, returns name of the category Otherwise, returns ID in MessageBundle.

getType

int getType()
Retrieves what type of Category this is

Returns:
TYPE_* constant

getDownloadManagers

java.util.List<DownloadManager> getDownloadManagers(java.util.List<DownloadManager> all_download_managers)
Retrieve a list of DownloadManagers for this category

Returns:
DownloadManager List

addManager

void addManager(DownloadManagerState manager)
Add a DownloadManager to this category. Used by DownloadManager. You should not have to add a DownloadManager object manually. If you wish to change a DownloadManager's category, use DownloadManager.setCategory(..) instead.

Parameters:
manager - DownloadManager object to add to Category

removeManager

void removeManager(DownloadManagerState manager)
Remove a DownloadManager object from this Category. Used by DownloadManager. You should not have to add a DownloadManager object manually. If you wish to change a DownloadManager's category, use DownloadManager.setCategory(..) instead.

Parameters:
manager - DownloadManager object to remove from Category

setDownloadSpeed

void setDownloadSpeed(int speed)

getDownloadSpeed

int getDownloadSpeed()

setUploadSpeed

void setUploadSpeed(int speed)

getUploadSpeed

int getUploadSpeed()

getStringAttribute

java.lang.String getStringAttribute(java.lang.String name)

setStringAttribute

void setStringAttribute(java.lang.String name,
                        java.lang.String value)

getBooleanAttribute

boolean getBooleanAttribute(java.lang.String name)

setBooleanAttribute

void setBooleanAttribute(java.lang.String name,
                         boolean value)

getIntAttribute

int getIntAttribute(java.lang.String name)

setIntAttribute

void setIntAttribute(java.lang.String name,
                     int value)

dump

void dump(IndentWriter writer)