Package com.biglybt.core.category.impl
Class CategoryManagerImpl
java.lang.Object
com.biglybt.core.tag.impl.TagTypeBase
com.biglybt.core.category.impl.CategoryManagerImpl
- All Implemented Interfaces:
CategoryListener
,TagListener
,TagType
,TrackerWebPageGenerator
,RSSGeneratorPlugin.Provider
public class CategoryManagerImpl
extends TagTypeBase
implements RSSGeneratorPlugin.Provider, CategoryListener
-
Nested Class Summary
Nested classes/interfaces inherited from class com.biglybt.core.tag.impl.TagTypeBase
TagTypeBase.TagGroupImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private CategoryImpl
private final Map
<String, CategoryImpl> private final AEMonitor
private final ListenerManager
private static CategoryManagerImpl
private CategoryImpl
private static final AEMonitor
private static final int[]
private final AtomicInteger
private boolean
private static final int
private static final int
private static final int
(package private) boolean
private static final String
private static final String
Fields inherited from class com.biglybt.core.tag.impl.TagTypeBase
AT_COLOR_ID
Fields inherited from interface com.biglybt.core.tag.TagType
TT_DOWNLOAD_CATEGORY, TT_DOWNLOAD_INTERNAL, TT_DOWNLOAD_MANUAL, TT_DOWNLOAD_STATE, TT_PEER_IPSET, TT_SWARM_TAG, TT_TAG_SUGGESTION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
createCategory
(String name) void
downloadManagerAdded
(Category cat, DownloadManager manager) A DownloadManager has been added to a Categoryvoid
downloadManagerRemoved
(Category cat, DownloadManager manager) A DownloadManager has been removed from a Categoryprotected String
protected void
boolean
generate
(TrackerWebPageRequest request, TrackerWebPageResponse response) protected long
getAddedTime
(Download download) Category[]
int
getCategory
(int type) getCategory
(String name) int[]
private String
static CategoryManagerImpl
int
getTags()
boolean
protected void
private void
void
removeCategory
(Category category) void
protected void
protected void
saveCategories
(Category category) private void
setMDEventsEnabled
(boolean enabled) protected void
sync()
Methods inherited from class com.biglybt.core.tag.impl.TagTypeBase
addTag, addTagListener, addTagType, addTagTypeListener, closing, fireChanged, generate, generateConfig, getResolver, getTag, getTag, getTagAndTaggableMut, getTagGroup, getTagManager, getTagsForTaggable, getTagType, getTagTypeFeatures, getTagTypeName, hasTagTypeFeature, isTagTypeAuto, isTagTypePersistent, readBooleanAttribute, readLongAttribute, readLongListAttribute, readMapAttribute, readStringAttribute, readStringListAttribute, removeTag, removeTaggable, removeTagListener, removeTagType, removeTagTypeListener, requestAttention, resolveTaggable, setTagGroup, taggableAdded, taggableRemoved, taggableSync, tagsOrMembershipChanged, writeBooleanAttribute, writeLongAttribute, writeLongListAttribute, writeMapAttribute, writeStringAttribute, writeStringListAttribute
-
Field Details
-
color_default
private static final int[] color_default -
PROVIDER
- See Also:
-
UNCAT_NAME
- See Also:
-
ALL_NAME
- See Also:
-
catMan
-
class_mon
-
catAll
-
catUncategorized
-
doneLoading
private boolean doneLoading -
categories
-
categories_mon
-
dms_with_cats
-
LDT_CATEGORY_ADDED
private static final int LDT_CATEGORY_ADDED- See Also:
-
LDT_CATEGORY_REMOVED
private static final int LDT_CATEGORY_REMOVED- See Also:
-
LDT_CATEGORY_CHANGED
private static final int LDT_CATEGORY_CHANGED- See Also:
-
category_listeners
-
md_events_enabled
boolean md_events_enabled -
pending_md_events
-
-
Constructor Details
-
CategoryManagerImpl
private CategoryManagerImpl()
-
-
Method Details
-
setMDEventsEnabled
private void setMDEventsEnabled(boolean enabled) -
fireMetadataChanged
- Overrides:
fireMetadataChanged
in classTagTypeBase
-
addCategoryManagerListener
-
removeCategoryManagerListener
-
getInstance
-
loadCategories
protected void loadCategories() -
saveCategories
-
saveCategories
protected void saveCategories() -
createCategory
-
removeCategory
-
getCategories
-
getCategory
-
getCategory
-
makeSpecialCategories
private void makeSpecialCategories() -
downloadManagerAdded
Description copied from interface:CategoryListener
A DownloadManager has been added to a Category- Specified by:
downloadManagerAdded
in interfaceCategoryListener
- Parameters:
cat
- Category that the DownloadManager has been added tomanager
- DownloadManager that was added
-
downloadManagerRemoved
Description copied from interface:CategoryListener
A DownloadManager has been removed from a Category- Specified by:
downloadManagerRemoved
in interfaceCategoryListener
- Parameters:
cat
- Category that the DownloadManager was removed frommanager
- The DownloadManager that was removed
-
getCategorisedDownloadCount
public int getCategorisedDownloadCount() -
getColorDefault
public int[] getColorDefault()- Specified by:
getColorDefault
in interfaceTagType
- Overrides:
getColorDefault
in classTagTypeBase
-
getTagCount
public int getTagCount()- Specified by:
getTagCount
in interfaceTagType
-
getTags
-
createTag
- Specified by:
createTag
in interfaceTagType
- Overrides:
createTag
in classTagTypeBase
- Throws:
TagException
-
sync
protected void sync()- Overrides:
sync
in classTagTypeBase
-
checkConfig
private void checkConfig() -
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceRSSGeneratorPlugin.Provider
-
generate
public boolean generate(TrackerWebPageRequest request, TrackerWebPageResponse response) throws IOException - Specified by:
generate
in interfaceTrackerWebPageGenerator
- Parameters:
request
-response
-- Returns:
- true if the request was handled
- Throws:
IOException
-
getDisplayName
-
getAddedTime
-
escape
-