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 TagTypeBase
TagTypeBase.TagGroupImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate CategoryImplprivate final Map<String, CategoryImpl> private final AEMonitorprivate final ListenerManagerprivate static CategoryManagerImplprivate CategoryImplprivate static final AEMonitorprivate static final int[]private final AtomicIntegerprivate booleanprivate static final intprivate static final intprivate static final int(package private) booleanprivate static final Stringprivate static final StringFields inherited from class TagTypeBase
AT_COLOR_IDFields inherited from interface 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 TypeMethodDescriptionvoidprivate voidcreateCategory(String name) voiddownloadManagerAdded(Category cat, DownloadManager manager) A DownloadManager has been added to a CategoryvoiddownloadManagerRemoved(Category cat, DownloadManager manager) A DownloadManager has been removed from a Categoryprotected Stringprotected voidbooleangenerate(TrackerWebPageRequest request, TrackerWebPageResponse response) protected longgetAddedTime(Download download) Category[]intgetCategory(int type) getCategory(String name) int[]private Stringstatic CategoryManagerImplintgetTags()booleanprotected voidprivate voidvoidremoveCategory(Category category) voidprotected voidprotected voidsaveCategories(Category category) private voidsetMDEventsEnabled(boolean enabled) protected voidsync()Methods inherited from class 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:
fireMetadataChangedin 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:CategoryListenerA DownloadManager has been added to a Category- Specified by:
downloadManagerAddedin interfaceCategoryListener- Parameters:
cat- Category that the DownloadManager has been added tomanager- DownloadManager that was added
-
downloadManagerRemoved
Description copied from interface:CategoryListenerA DownloadManager has been removed from a Category- Specified by:
downloadManagerRemovedin 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:
getColorDefaultin interfaceTagType- Overrides:
getColorDefaultin classTagTypeBase
-
getTagCount
public int getTagCount()- Specified by:
getTagCountin interfaceTagType
-
getTags
-
createTag
- Specified by:
createTagin interfaceTagType- Overrides:
createTagin classTagTypeBase- Throws:
TagException
-
sync
protected void sync()- Overrides:
syncin classTagTypeBase
-
checkConfig
private void checkConfig() -
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceRSSGeneratorPlugin.Provider
-
generate
public boolean generate(TrackerWebPageRequest request, TrackerWebPageResponse response) throws IOException - Specified by:
generatein interfaceTrackerWebPageGenerator- Parameters:
request-response-- Returns:
- true if the request was handled
- Throws:
IOException
-
getDisplayName
-
getAddedTime
-
escape
-