Class TagTypeBase
java.lang.Object
com.biglybt.core.tag.impl.TagTypeBase
- All Implemented Interfaces:
TagListener, TagType
- Direct Known Subclasses:
CategoryManagerImpl, OpenTorrentOptionsWindow.DiscoveredTag.TagTypeDiscovery, TagTypeWithState
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AtomicIntegerprotected static final Stringprivate static final TagManagerImplprivate Map<String, TagTypeBase.TagGroupImpl> private final Map<Taggable, List<TagListener>> private final intprivate final intprivate final Stringprivate final AtomicIntegerprivate final ListenerManager<TagTypeListener> private static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final StringFields 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
ConstructorsModifierConstructorDescriptionprotectedTagTypeBase(int _tag_type, int _tag_features, String _tag_type_name) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddTagListener(Taggable taggable, TagListener listener) taggable-specific listneer for this tag-typeprotected voidvoidaddTagTypeListener(TagTypeListener listener, boolean fire_for_existing) protected voidclosing()protected voidprivate voidprotected voidvoidgenerate(IndentWriter writer) protected voidgenerateConfig(IndentWriter writer, TagBase tag) int[]protected TaggableResolvergetTag(int tag_id) static intprotected TagGroupgetTagGroup(String name) getTagsForTaggable(Taggable taggable) intUnique type denoting this species of taglonggetTagTypeName(boolean localize) booleanhasTagTypeFeature(long feature) booleanbooleanprotected BooleanreadBooleanAttribute(TagBase tag, String attr, Boolean def) protected LongreadLongAttribute(TagBase tag, String attr, Long def) protected long[]readLongListAttribute(TagBase tag, String attr, long[] def) protected StringreadStringAttribute(TagBase tag, String attr, String def) protected String[]readStringListAttribute(TagBase tag, String attr, String[] def) voidprotected voidremoveTaggable(TaggableResolver resolver, Taggable taggable) voidremoveTagListener(Taggable taggable, TagListener listener) voidvoidremoveTagTypeListener(TagTypeListener listener) voidprotected Taggableprotected voidsetTagGroup(Tag tag, String old_name, String new_name) private voidsetTagGroupName(TagTypeBase.TagGroupImpl old_group, String new_name) protected voidsync()voidtaggableAdded(Tag tag, Taggable tagged) voidtaggableRemoved(Tag tag, Taggable tagged) voidtaggableSync(Tag tag) protected voidprotected booleanwriteBooleanAttribute(TagBase tag, String attr, Boolean value) protected booleanwriteLongAttribute(TagBase tag, String attr, Long value) protected booleanwriteLongListAttribute(TagBase tag, String attr, long[] value) protected voidprotected booleanwriteStringAttribute(TagBase tag, String attr, String value) protected booleanwriteStringListAttribute(TagBase tag, String attr, String[] value) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TagType
getTagCount, getTags
-
Field Details
-
AT_COLOR_ID
- See Also:
-
tag_type
private final int tag_type -
tag_type_features
private final int tag_type_features -
tag_type_name
-
TTL_ADD
private static final int TTL_ADD- See Also:
-
TTL_TAG_MEMBERHIP_CHANGE
private static final int TTL_TAG_MEMBERHIP_CHANGE- See Also:
-
TTL_TAG_METADATA_CHANGE
private static final int TTL_TAG_METADATA_CHANGE- See Also:
-
TTL_REMOVE
private static final int TTL_REMOVE- See Also:
-
TTL_TYPE_CHANGE
private static final int TTL_TYPE_CHANGE- See Also:
-
TTL_ATTENTION_REQUESTED
private static final int TTL_ATTENTION_REQUESTED- See Also:
-
manager
-
all_tags_or_tag_membership_mut
-
tags_or_tag_membership_mut
-
tt_listeners
-
tag_listeners
-
tag_groups
-
TTP_TAGS_FOR_TAGGABLE_CACHE
-
-
Constructor Details
-
TagTypeBase
-
-
Method Details
-
getTagAndTaggableMut
public static int getTagAndTaggableMut() -
addTagType
protected void addTagType() -
getTagManager
- Specified by:
getTagManagerin interfaceTagType
-
getResolver
-
resolveTaggable
-
removeTaggable
-
getTagType
public int getTagType()Description copied from interface:TagTypeUnique type denoting this species of tag- Specified by:
getTagTypein interfaceTagType- Returns:
-
getTagTypeName
- Specified by:
getTagTypeNamein interfaceTagType
-
isTagTypeAuto
public boolean isTagTypeAuto()- Specified by:
isTagTypeAutoin interfaceTagType
-
isTagTypePersistent
public boolean isTagTypePersistent()- Specified by:
isTagTypePersistentin interfaceTagType
-
getTagTypeFeatures
public long getTagTypeFeatures()- Specified by:
getTagTypeFeaturesin interfaceTagType
-
hasTagTypeFeature
public boolean hasTagTypeFeature(long feature) - Specified by:
hasTagTypeFeaturein interfaceTagType
-
fireChanged
protected void fireChanged() -
createTag
- Specified by:
createTagin interfaceTagType- Throws:
TagException
-
tagsOrMembershipChanged
protected void tagsOrMembershipChanged() -
addTag
-
removeTag
-
requestAttention
-
getColorDefault
public int[] getColorDefault()- Specified by:
getColorDefaultin interfaceTagType
-
sync
protected void sync() -
closing
protected void closing() -
getTag
-
getTag
-
getTagsForTaggable
- Specified by:
getTagsForTaggablein interfaceTagType
-
fireMembershipChanged
-
fireMetadataChanged
-
removeTagType
public void removeTagType()- Specified by:
removeTagTypein interfaceTagType
-
addTagTypeListener
- Specified by:
addTagTypeListenerin interfaceTagType
-
removeTagTypeListener
- Specified by:
removeTagTypeListenerin interfaceTagType
-
taggableAdded
- Specified by:
taggableAddedin interfaceTagListener
-
taggableSync
- Specified by:
taggableSyncin interfaceTagListener
-
taggableRemoved
- Specified by:
taggableRemovedin interfaceTagListener
-
addTagListener
Description copied from interface:TagTypetaggable-specific listneer for this tag-type- Specified by:
addTagListenerin interfaceTagType- Parameters:
taggable-listener-
-
removeTagListener
- Specified by:
removeTagListenerin interfaceTagType
-
readBooleanAttribute
-
writeBooleanAttribute
-
readLongAttribute
-
writeLongAttribute
-
readStringAttribute
-
writeStringAttribute
-
readMapAttribute
-
writeMapAttribute
-
readStringListAttribute
-
writeStringListAttribute
-
readLongListAttribute
-
writeLongListAttribute
-
setTagGroupName
-
setTagGroup
-
getTagGroup
-
generate
-
generateConfig
-