Class CategoryManager

java.lang.Object
com.biglybt.core.category.CategoryManager

public class CategoryManager extends Object
A singleton to manage Categories of Torrents (DownloadManagers).
  • Constructor Details

    • CategoryManager

      public CategoryManager()
  • Method Details

    • addCategoryManagerListener

      public static void addCategoryManagerListener(CategoryManagerListener l)
      Add a CategoryManager Listener
      Parameters:
      l - Listener to Add
    • removeCategoryManagerListener

      public static void removeCategoryManagerListener(CategoryManagerListener l)
      Removes a CategoryManager Listener
      Parameters:
      l - Listener to remove
      See Also:
    • createCategory

      public static Category createCategory(String name)
      Creates a new Category object and adds it to the list
      Parameters:
      name - Name of Category to add
      Returns:
      If successful, returns the newly created Category. Otherwise, returns null.
    • removeCategory

      public static void removeCategory(Category category)
      Removes a Category from the list
      Parameters:
      category - Category to remove
    • getCategories

      public static Category[] getCategories()
      Retrieves the list of Categories To sort the categories by name (TYPE_USER last): Arrays.sort(categories);
      Returns:
      List of Categories
    • getCategory

      public static Category getCategory(String name)
      Retrieve a Category
      Parameters:
      name - Name of Category
      Returns:
      Category you asked for
    • getCategory

      public static Category getCategory(int type)
      Retrieve a non-user Category
      Parameters:
      type - any type except TYPE_USER
      Returns:
      The Category, or null if not found.
      See Also:
    • getCategorisedDownloadCount

      public static int getCategorisedDownloadCount()