Class TagManagerImpl
java.lang.Object
com.biglybt.core.tag.impl.TagManagerImpl
- All Implemented Interfaces:
TagManager, AEDiagnosticsEvidenceGenerator, DataSourceResolver.DataSourceImporter, DownloadCompletionListener
public class TagManagerImpl
extends Object
implements TagManager, DownloadCompletionListener, AEDiagnosticsEvidenceGenerator, DataSourceResolver.DataSourceImporter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Set<DownloadManager> (package private) final AsyncDispatcherprivate TagPropertyTrackerHandlerprivate booleanprivate static final Stringprivate WeakReference<Map<String, Object>> private TagPropertyConstraintHandlerprivate static final intprivate static final intprivate static final intprivate static final intprivate final FrequencyLimitedDispatcherprivate static final booleanprivate final CopyOnWriteList<Object[]> private booleanprivate static Objectprivate final Map<Long, TagManagerImpl.LifecycleHandlerImpl> private final CopyOnWriteList<TagManagerListener> (package private) final AsyncDispatcherprivate final RSSGeneratorPlugin.Providerprivate static final Stringprivate static TagManagerImpl(package private) final CopyOnWriteList<TagTypeBase> private static final Stringprivate TagPropertyUntaggedHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddConfigUpdate(int type, TagWithState tag) voidaddTagFeatureListener(int features, TagFeatureListener listener) voidaddTaggableLifecycleListener(long taggable_type, TaggableLifecycleListener listener) voidaddTagManagerListener(TagManagerListener listener, boolean fire_for_existing) voidaddTagType(TagTypeBase tag_type) private voidapplyConfigUpdates(Map config) protected voidcheckRSSFeeds(TagBase tag, boolean enable) compileConstraint(String expression) private voiddestroy()protected ObjectevalScript(Tag tag, String script, List<DownloadManager> dms, String intent_key) protected String[]explain(Tag tag, TagFeatureProperties.TagProperty property, Taggable taggable) exportTags(List<Tag> tags) protected voidfeatureChanged(Tag tag, int feature) voidgenerate(IndentWriter writer) voidgenerate(IndentWriter writer, TagTypeBase tag_type) voidgenerate(IndentWriter writer, TagTypeBase tag_type, TagBase tag) getConf(TagTypeBase tag_type, boolean create) getConf(TagTypeBase tag_type, TagBase tag, boolean create) getDependsOnTags(Tag tag) getResolver(long taggable_type) static TagManagerImplbooleangetTagsByName(String name, boolean is_localized) getTagsForTaggable(int[] tts, Taggable taggable) getTagsForTaggable(int tag_type, Taggable taggable) getTagsForTaggable(Taggable taggable) protected StringgetTagStatus(Tag tag) getTagType(int tag_type) getVuzeFile(TagBase tag) importDataSource(Map map) private TagimportVuzeFile(Map content) private voidinit()private voidbooleanprivate voidloadTags(TagTypeWithState tt_with_state) lookupTagByUID(long tag_uid) lookupTagsByName(String tag_name) private voidmoveOnAssign(DownloadManager dm, File location, long options) voidCalled when a download enters a complete state (previously being incomplete).protected BooleanreadBooleanAttribute(TagTypeBase tag_type, TagBase tag, String attr, Boolean def) private Mapprotected LongreadLongAttribute(TagTypeBase tag_type, TagBase tag, String attr, Long def) protected long[]readLongListAttribute(TagTypeBase tag_type, TagBase tag, String attr, long[] def) readMapAttribute(TagTypeBase tag_type, TagBase tag, String attr, Map<String, Object> def) protected StringreadStringAttribute(TagTypeBase tag_type, TagBase tag, String attr, String def) protected String[]readStringListAttribute(TagTypeBase tag_type, TagBase tag, String attr, String[] def) registerTaggableResolver(TaggableResolver resolver) protected voidremoveConfig(Tag tag) protected voidremoveConfig(TagType tag_type) voidremoveTagFeatureListener(TagFeatureListener listener) private voidremoveTaggable(TaggableResolver resolver, Taggable taggable) voidremoveTaggableLifecycleListener(long taggable_type, TaggableLifecycleListener listener) voidremoveTagManagerListener(TagManagerListener listener) protected voidremoveTagType(TagTypeBase tag_type) private voidresolverInitialized(TaggableResolver resolver) protected voidprivate voidsetDirty()voidsetProcessingEnabled(boolean enabled) voidsetTagPublicDefault(boolean pub) protected voidtagChanged(TagWithState tag) protected voidprotected voidtagCreated(TagWithState tag) voidtaggableAdded(TagType tag_type, Tag tag, Taggable tagged) voidtaggableRemoved(TagType tag_type, Tag tag, Taggable tagged) protected voidtagGroupCreated(TagTypeBase tag_type, TagTypeBase.TagGroupImpl group, TagTypeBase.TagGroupImpl old_group) protected voidtagGroupDeleted(TagTypeBase tag_type, TagTypeBase.TagGroupImpl group) protected voidtagGroupRenamed(TagTypeBase tag_type, TagTypeBase.TagGroupImpl old_group, TagTypeBase.TagGroupImpl new_group) protected voidtagGroupUpdated(TagTypeBase tag_type, TagTypeBase.TagGroupImpl group) protected voidtagRemoved(TagWithState tag) protected booleanwriteBooleanAttribute(TagTypeBase tag_type, TagBase tag, String attr, Boolean value) private voidprotected booleanwriteLongAttribute(TagTypeBase tag_type, TagBase tag, String attr, Long value) protected booleanwriteLongListAttribute(TagTypeBase tag_type, TagBase tag, String attr, long[] value) protected voidwriteMapAttribute(TagTypeBase tag_type, TagBase tag, String attr, Map<String, Object> value) protected booleanwriteStringAttribute(TagTypeBase tag_type, TagBase tag, String attr, String value) protected booleanwriteStringListAttribute(TagTypeBase tag_type, TagBase tag, String attr, String[] value)
-
Field Details
-
CONFIG_FILE
- See Also:
-
CU_TAG_CREATE
private static final int CU_TAG_CREATE- See Also:
-
CU_TAG_CHANGE
private static final int CU_TAG_CHANGE- See Also:
-
CU_TAG_CONTENTS
private static final int CU_TAG_CONTENTS- See Also:
-
CU_TAG_REMOVE
private static final int CU_TAG_REMOVE- See Also:
-
enabled
private static final boolean enabled -
singleton
-
KEY_TG_COLUMNS
-
tag_types
-
tag_type_map
-
RSS_PROVIDER
- See Also:
-
rss_tags
-
active_copy_on_complete
-
rss_generator
-
async_dispatcher
-
move_on_assign_dispatcher
-
dirty_dispatcher
-
config
-
config_ref
-
config_dirty
private boolean config_dirty -
config_change_queue
-
listeners
-
feature_listeners
-
lifecycle_handlers
-
auto_tracker
-
untagged_handler
-
constraint_handler
-
js_plugin_install_tried
private boolean js_plugin_install_tried -
TTP_TAGS_FOR_TAGGABLE_CACHE
- See Also:
-
-
Constructor Details
-
TagManagerImpl
private TagManagerImpl()
-
-
Method Details
-
getSingleton
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceTagManager
-
init
private void init() -
setProcessingEnabled
public void setProcessingEnabled(boolean enabled) - Specified by:
setProcessingEnabledin interfaceTagManager
-
onCompletion
Description copied from interface:DownloadCompletionListenerCalled when a download enters a complete state (previously being incomplete).- Specified by:
onCompletionin interfaceDownloadCompletionListener- Parameters:
d- Download which has been completed.
-
evalScript
-
loadTags
-
initializeSwarmTags
private void initializeSwarmTags() -
resolverInitialized
-
removeTaggable
-
addTagType
-
getTagType
- Specified by:
getTagTypein interfaceTagManager
-
removeTagType
-
getTagTypes
- Specified by:
getTagTypesin interfaceTagManager
-
taggableAdded
-
moveOnAssign
-
taggableRemoved
-
getTagsForTaggable
- Specified by:
getTagsForTaggablein interfaceTagManager
-
getTagsForTaggable
- Specified by:
getTagsForTaggablein interfaceTagManager
-
getTagsForTaggable
- Specified by:
getTagsForTaggablein interfaceTagManager
-
getTagsByName
- Specified by:
getTagsByNamein interfaceTagManager
-
lookupTagByUID
- Specified by:
lookupTagByUIDin interfaceTagManager
-
lookupTagsByName
- Specified by:
lookupTagsByNamein interfaceTagManager
-
importDataSource
- Specified by:
importDataSourcein interfaceDataSourceResolver.DataSourceImporter
-
registerTaggableResolver
- Specified by:
registerTaggableResolverin interfaceTagManager
-
setTagPublicDefault
public void setTagPublicDefault(boolean pub) - Specified by:
setTagPublicDefaultin interfaceTagManager
-
getTagPublicDefault
public boolean getTagPublicDefault()- Specified by:
getTagPublicDefaultin interfaceTagManager
-
tagGroupCreated
protected void tagGroupCreated(TagTypeBase tag_type, TagTypeBase.TagGroupImpl group, TagTypeBase.TagGroupImpl old_group) -
tagGroupUpdated
-
tagGroupDeleted
-
tagGroupRenamed
protected void tagGroupRenamed(TagTypeBase tag_type, TagTypeBase.TagGroupImpl old_group, TagTypeBase.TagGroupImpl new_group) -
checkRSSFeeds
-
getTagStatus
-
getDependsOnTags
-
addTagManagerListener
- Specified by:
addTagManagerListenerin interfaceTagManager
-
removeTagManagerListener
- Specified by:
removeTagManagerListenerin interfaceTagManager
-
addTagFeatureListener
- Specified by:
addTagFeatureListenerin interfaceTagManager
-
removeTagFeatureListener
- Specified by:
removeTagFeatureListenerin interfaceTagManager
-
featureChanged
-
getResolver
-
addTaggableLifecycleListener
- Specified by:
addTaggableLifecycleListenerin interfaceTagManager
-
removeTaggableLifecycleListener
- Specified by:
removeTaggableLifecycleListenerin interfaceTagManager
-
tagCreated
-
tagChanged
-
tagRemoved
-
tagContentsChanged
-
addConfigUpdate
-
applyConfigUpdates
-
destroy
private void destroy() -
setDirty
private void setDirty() -
readConfig
-
getConfig
-
writeConfig
private void writeConfig() -
getConf
-
getConf
-
setConf
-
readBooleanAttribute
-
writeBooleanAttribute
protected boolean writeBooleanAttribute(TagTypeBase tag_type, TagBase tag, String attr, Boolean value) -
readLongAttribute
-
writeLongAttribute
-
readStringAttribute
-
writeStringAttribute
protected boolean writeStringAttribute(TagTypeBase tag_type, TagBase tag, String attr, String value) - Returns:
- Whether attribute was changed from existing value
-
readMapAttribute
-
writeMapAttribute
-
readStringListAttribute
protected String[] readStringListAttribute(TagTypeBase tag_type, TagBase tag, String attr, String[] def) -
writeStringListAttribute
protected boolean writeStringListAttribute(TagTypeBase tag_type, TagBase tag, String attr, String[] value) -
readLongListAttribute
-
writeLongListAttribute
protected boolean writeLongListAttribute(TagTypeBase tag_type, TagBase tag, String attr, long[] value) -
removeConfig
-
removeConfig
-
importVuzeFile
-
getVuzeFile
-
compileConstraint
- Specified by:
compileConstraintin interfaceTagManager
-
exportTags
- Specified by:
exportTagsin interfaceTagManager
-
duplicate
- Specified by:
duplicatein interfaceTagManager
-
explain
-
generate
- Specified by:
generatein interfaceAEDiagnosticsEvidenceGenerator
-
generate
-
generate
-