Class TagBase
java.lang.Object
com.biglybt.core.tag.impl.TagBase
- All Implemented Interfaces:
Tag, DataSourceResolver.ExportableDataSource, SimpleTimer.TimerTickReceiver, Tag
- Direct Known Subclasses:
CategoryImpl, OpenTorrentOptionsWindow.DiscoveredTag, SpeedLimitHandler.PeerSet.TagPeerImpl, TagWithState
public abstract class TagBase
extends Object
implements Tag, SimpleTimer.TimerTickReceiver, DataSourceResolver.ExportableDataSource
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprivate int[]private long[]private Stringprivate static final String[]private longprivate Stringprivate long[]private static final intprivate intprivate booleanprivate booleanprivate Stringprivate intprivate Booleanprivate booleanprivate Booleanprivate final Map<TagListener, TagListener> private long[]private long[]private long[]private long[]private final ListenerManager<TagListener> private TagFeatureFileLocationprivate final intprivate TagFeatureLimitsprivate Stringprivate TagFeatureRateLimitprivate TagFeatureRSSFeed(package private) final TagTypeBaseprivate booleanprivate static final intprivate static final intprivate static final intprivate long[]private long[]Fields inherited from interface DataSourceResolver.ExportableDataSource
OPT_CAN_MINIMIZE, OPT_ON_TOPFields inherited from interface Tag
FL_IS_FILTER, FL_IS_HIDDEN_WHEN_EMPTY, FL_NONE, TP_CONSTRAINT_ERROR, TP_SETTINGS_REQUESTED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTagBase(TagTypeBase _tag_type, int _tag_id, String _tag_name) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(TagListener listener) protected voidaddTag()voidvoidaddTaggableBatch(boolean starts) voidaddTagListener(TagListener listener, boolean fire_for_existing) voidbooleanprotected voidprotected voidclosing()protected TagFeatureProperties.TagPropertycreateTagProperty(String name, int type) private int[]protected voiddestroy()private StringencodeRGB(int[] rgb) voidgenerate(IndentWriter writer) intprotected booleanint[]getColor()long[]booleanbooleangetFlag(long flag) getGroup()intprotected TagManagerImplintintintbooleanintintbooleangetProperty(String name) protected booleanint[][]intbooleanintgetTag()intbooleanlonglong[]longgetTaggableAddedTime(Taggable taggble) intgetTagID()Unique ID within this tag typelongintintbooleanintintintlonglonglonggetTagName(boolean localize) protected Stringlong[]protected long[]private long[]long[]protected long[]private long[]Unique type denoting this species of taglongUnique across tag types and can be used to lookup by TagManager::lookuptagByUIDlong[]getTransientProperty(String property) protected booleanintprotected voidbooleanisActionEnabled(int action) booleanbooleanbooleanisPublic()boolean[]booleanbooleanbooleanprivate voidprivate voidprotected BooleanreadBooleanAttribute(String attr, Boolean def) protected LongreadLongAttribute(String attr, Long def) protected long[]readLongListAttribute(String attr, long[] def) readMapAttribute(String attr, Map<String, Object> def) protected StringreadStringAttribute(String attr, String def) protected String[]readStringListAttribute(String attr, String[] def) voidremoveListener(TagListener listener) voidvoidvoidremoveTagListener(TagListener listener) voidvoidvoidprivate voidprivate voidvoidsetActionEnabled(int action, boolean enabled) voidsetActionScript(String script) voidsetAutoApplySortInterval(int secs) voidsetCanBePublic(boolean can_be_public) voidsetColor(int[] rgb) voidsetColors(long[] params) voidsetDescription(String str) voidsetFirstPrioritySeeding(boolean priority) voidsetFlag(long flag, boolean value) voidvoidsetImageFile(String id) voidsetImageID(String id) voidsetImageSortOrder(int order) voidsetMaxActiveDownloads(int max) voidsetMaxActiveSeeds(int max) voidsetMaximumTaggables(int max) voidsetNotFirstPrioritySeeding(boolean priority) voidsetNotifyMessageChannel(String channel) voidsetOrdering(int id) voidsetPostingNotifications(int flags) voidsetPostMessageChannel(String channel) voidsetPreventDelete(boolean b) voidsetPublic(boolean v) voidsetRecentHistoryRetention(boolean required) voidsetRemovalStrategy(int id) voidsetStrictActivityLimits(boolean b) voidsetTagAssigns(List<Tag> tags) voidsetTagBoost(boolean boost) voidsetTagCopyOnCompleteFolder(File folder) voidsetTagCopyOnCompleteOptions(long options) voidsetTagInitialSaveFolder(File folder) voidsetTagInitialSaveOptions(long options) voidsetTagMaxAggregateShareRatio(int sr) voidsetTagMaxAggregateShareRatioAction(int action) voidsetTagMaxAggregateShareRatioHasPriority(boolean priority) voidsetTagMaxShareRatio(int sr) voidsetTagMaxShareRatioAction(int action) voidsetTagMinShareRatio(int sr) voidsetTagMoveOnAssignFolder(File folder) voidsetTagMoveOnAssignOptions(long options) voidsetTagMoveOnCompleteFolder(File folder) voidsetTagMoveOnCompleteOptions(long options) voidsetTagMoveOnRemoveFolder(File folder) voidsetTagMoveOnRemoveOptions(long options) voidsetTagName(String name) voidsetTagRemoves(List<Tag> tags) voidsetTagRSSFeedEnabled(boolean enable) voidsetTransientProperty(String property, Object value) voidsetVisible(boolean v) voidsetWeight(int weight) booleansupportsAction(int action) booleanbooleanbooleanbooleanbooleanprotected voidsync()voidtick(long mono_now, int count) protected booleanwriteBooleanAttribute(String attr, Boolean value) protected booleanwriteLongAttribute(String attr, long value) protected booleanwriteLongListAttribute(String attr, long[] value) protected voidwriteMapAttribute(String attr, Map<String, Object> value) protected booleanwriteStringAttribute(String attr, String value) protected booleanwriteStringListAttribute(String attr, String[] value) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataSourceResolver.ExportableDataSource
getBooleanOptionMethods inherited from interface Tag
dependsOnTags, getStatus, getTaggableTypes, getTagged, getTaggedCount, hasTaggable, isHiddenWhenEmpty, setHiddenWhenEmpty
-
Field Details
-
AT_RATELIMIT_UP
- See Also:
-
AT_RATELIMIT_DOWN
- See Also:
-
AT_VISIBLE
- See Also:
-
AT_PUBLIC
- See Also:
-
AT_FLAGS
- See Also:
-
AT_GROUP
- See Also:
-
AT_CAN_BE_PUBLIC
- See Also:
-
AT_ORIGINAL_NAME
- See Also:
-
AT_IMAGE_ID
- See Also:
-
AT_IMAGE_FILE
- See Also:
-
AT_IMAGE_SORT_ORDER
- See Also:
-
AT_COLOR_ID
- See Also:
-
AT_COLORS_ID
- See Also:
-
AT_RSS_ENABLE
- See Also:
-
AT_RATELIMIT_UP_PRI
- See Also:
-
AT_XCODE_TARGET
- See Also:
-
AT_FL_PREVENT_DELETE
- See Also:
-
AT_FL_MOVE_COMP
- See Also:
-
AT_FL_MOVE_COMP_OPT
- See Also:
-
AT_FL_MOVE_REM
- See Also:
-
AT_FL_MOVE_REM_OPT
- See Also:
-
AT_FL_COPY_COMP
- See Also:
-
AT_FL_COPY_COMP_OPT
- See Also:
-
AT_FL_INIT_LOC
- See Also:
-
AT_FL_INIT_LOC_OPT
- See Also:
-
AT_FL_MOVE_ASSIGN
- See Also:
-
AT_FL_MOVE_ASSIGN_OPT
- See Also:
-
AT_RATELIMIT_MIN_SR
- See Also:
-
AT_RATELIMIT_MAX_SR
- See Also:
-
AT_RATELIMIT_MAX_SR_ACTION
- See Also:
-
AT_RATELIMIT_MAX_AGGREGATE_SR
- See Also:
-
AT_RATELIMIT_MAX_AGGREGATE_SR_ACTION
- See Also:
-
AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY
- See Also:
-
AT_RATELIMIT_FP_SEEDING
- See Also:
-
AT_RATELIMIT_NOT_FP_SEEDING
- See Also:
-
AT_RATELIMIT_BOOST
- See Also:
-
AT_RATELIMIT_MAX_ACTIVE_DL
- See Also:
-
AT_RATELIMIT_MAX_ACTIVE_CD
- See Also:
-
AT_RATELIMIT_ACTIVE_LIMITS_STRICT
- See Also:
-
AT_PROPERTY_PREFIX
- See Also:
-
AT_BYTES_UP
- See Also:
-
AT_BYTES_DOWN
- See Also:
-
AT_DESCRIPTION
- See Also:
-
AT_MAX_TAGGABLES
- See Also:
-
AT_REMOVAL_STRATEGY
- See Also:
-
AT_EOS_SCRIPT
- See Also:
-
AT_EOS_OPTIONS_TEMPLATE
- See Also:
-
AT_EOS_PM
- See Also:
-
AT_NOTIFICATION_POST
- See Also:
-
AT_NOTIFICATION_PUBLISH
- See Also:
-
AT_LIMIT_ORDERING
- See Also:
-
AT_EOS_ASSIGN_TAGS
- See Also:
-
AT_EOS_REMOVE_TAGS
- See Also:
-
AT_AUTO_APPLY_SORT_INTERVAL
- See Also:
-
AT_WEIGHT
- See Also:
-
EMPTY_STRING_LIST
-
tag_type
-
tag_id
private final int tag_id -
tag_name
-
TL_ADD
private static final int TL_ADD- See Also:
-
TL_REMOVE
private static final int TL_REMOVE- See Also:
-
TL_SYNC
private static final int TL_SYNC- See Also:
-
t_listeners
-
listener_map
-
is_visible
-
is_public
-
flags
private long flags -
group
-
colour
private int[] colour -
colours
private long[] colours -
description
-
image_file
-
image_sort_order
private int image_sort_order -
tag_rl
-
tag_rss
-
tag_fl
-
tag_limits
-
transient_properties
-
is_removed
private boolean is_removed -
session_cache
-
total_up_at_start
private long[] total_up_at_start -
total_down_at_start
private long[] total_down_at_start -
session_up
private long[] session_up -
session_down
private long[] session_down -
session_up_reset
private long[] session_up_reset -
session_down_reset
private long[] session_down_reset -
HISTORY_MAX_SECS
private static final int HISTORY_MAX_SECS- See Also:
-
history_retention_required
private volatile boolean history_retention_required -
history
private long[] history -
history_pos
private int history_pos -
history_wrapped
private boolean history_wrapped -
timer_registered
private boolean timer_registered
-
-
Constructor Details
-
TagBase
-
-
Method Details
-
initialized
protected void initialized() -
exportDataSource
- Specified by:
exportDataSourcein interfaceDataSourceResolver.ExportableDataSource
-
getTag
-
addTag
protected void addTag() -
getManager
-
getTagType
Description copied from interface:TagUnique type denoting this species of tag- Specified by:
getTagTypein interfaceTag- Returns:
-
getTagID
-
getTagUID
-
getTagName
- Specified by:
getTagNamein interfaceTag
-
getTagNameRaw
-
getTagName
- Specified by:
getTagNamein interfaceTag
-
setTagName
- Specified by:
setTagNamein interfaceTag- Throws:
TagException
-
isPublic
-
setPublic
-
getPublicDefault
protected boolean getPublicDefault() -
setCanBePublic
public void setCanBePublic(boolean can_be_public) - Specified by:
setCanBePublicin interfaceTag
-
canBePublic
public boolean canBePublic()- Specified by:
canBePublicin interfaceTag
-
getCanBePublicDefault
protected boolean getCanBePublicDefault() -
setFlag
-
getFlag
-
isTagAuto
-
isVisible
-
setVisible
public void setVisible(boolean v) - Specified by:
setVisiblein interfaceTag
-
getGroup
-
setGroup
-
getGroupContainer
- Specified by:
getGroupContainerin interfaceTag
-
getVisibleDefault
protected boolean getVisibleDefault() -
getImageID
- Specified by:
getImageIDin interfaceTag
-
setImageID
- Specified by:
setImageIDin interfaceTag
-
getImageFile
- Specified by:
getImageFilein interfaceTag
-
setImageFile
- Specified by:
setImageFilein interfaceTag
-
setImageSortOrder
public void setImageSortOrder(int order) - Specified by:
setImageSortOrderin interfaceTag
-
getImageSortOrder
public int getImageSortOrder()- Specified by:
getImageSortOrderin interfaceTag
-
decodeRGB
-
encodeRGB
-
isColorDefault
public boolean isColorDefault()- Specified by:
isColorDefaultin interfaceTag
-
getColor
-
setColor
-
getColors
-
setColors
-
isTagRSSFeedEnabled
public boolean isTagRSSFeedEnabled() -
setTagRSSFeedEnabled
public void setTagRSSFeedEnabled(boolean enable) -
getPreventDelete
public boolean getPreventDelete() -
setPreventDelete
public void setPreventDelete(boolean b) -
getTagBoost
public boolean getTagBoost() -
setTagBoost
public void setTagBoost(boolean boost) -
getMaxActiveDownloads
public int getMaxActiveDownloads() -
setMaxActiveDownloads
public void setMaxActiveDownloads(int max) -
getMaxActiveSeeds
public int getMaxActiveSeeds() -
setMaxActiveSeeds
public void setMaxActiveSeeds(int max) -
getStrictActivityLimits
public boolean getStrictActivityLimits() -
setStrictActivityLimits
public void setStrictActivityLimits(boolean b) -
supportsTagInitialSaveFolder
public boolean supportsTagInitialSaveFolder() -
getTagInitialSaveFolder
-
setTagInitialSaveFolder
-
getTagInitialSaveOptions
public long getTagInitialSaveOptions() -
setTagInitialSaveOptions
public void setTagInitialSaveOptions(long options) -
supportsTagMoveOnComplete
public boolean supportsTagMoveOnComplete() -
getTagMoveOnCompleteFolder
-
setTagMoveOnCompleteFolder
-
getTagMoveOnCompleteOptions
public long getTagMoveOnCompleteOptions() -
setTagMoveOnCompleteOptions
public void setTagMoveOnCompleteOptions(long options) -
supportsTagCopyOnComplete
public boolean supportsTagCopyOnComplete() -
getTagCopyOnCompleteFolder
-
setTagCopyOnCompleteFolder
-
getTagCopyOnCompleteOptions
public long getTagCopyOnCompleteOptions() -
setTagCopyOnCompleteOptions
public void setTagCopyOnCompleteOptions(long options) -
supportsTagMoveOnRemove
public boolean supportsTagMoveOnRemove() -
getTagMoveOnRemoveFolder
-
setTagMoveOnRemoveFolder
-
getTagMoveOnRemoveOptions
public long getTagMoveOnRemoveOptions() -
setTagMoveOnRemoveOptions
public void setTagMoveOnRemoveOptions(long options) -
supportsTagMoveOnAssign
public boolean supportsTagMoveOnAssign() -
getTagMoveOnAssignFolder
-
setTagMoveOnAssignFolder
-
getTagMoveOnAssignOptions
public long getTagMoveOnAssignOptions() -
setTagMoveOnAssignOptions
public void setTagMoveOnAssignOptions(long options) -
getFirstPrioritySeeding
public boolean getFirstPrioritySeeding() -
setFirstPrioritySeeding
public void setFirstPrioritySeeding(boolean priority) -
getNotFirstPrioritySeeding
public boolean getNotFirstPrioritySeeding() -
setNotFirstPrioritySeeding
public void setNotFirstPrioritySeeding(boolean priority) -
getMaximumTaggables
public int getMaximumTaggables() -
setMaximumTaggables
public void setMaximumTaggables(int max) -
checkMaximumTaggables
protected void checkMaximumTaggables() -
getRemovalStrategy
public int getRemovalStrategy() -
setRemovalStrategy
public void setRemovalStrategy(int id) -
getOrdering
public int getOrdering() -
setOrdering
public void setOrdering(int id) -
getSupportedProperties
-
getProperty
-
createTagProperty
-
getSupportedActions
public int getSupportedActions() -
supportsAction
public boolean supportsAction(int action) -
isAnyActionEnabled
public boolean isAnyActionEnabled() -
isActionEnabled
public boolean isActionEnabled(int action) -
setActionEnabled
public void setActionEnabled(int action, boolean enabled) -
getActionScript
-
setActionScript
-
getPostMessageChannel
-
setPostMessageChannel
-
getOptionsTemplateHandler
-
getAutoApplySortInterval
public int getAutoApplySortInterval() -
setAutoApplySortInterval
public void setAutoApplySortInterval(int secs) -
applySort
public void applySort() -
getWeight
public int getWeight() -
setWeight
public void setWeight(int weight) -
getPostingNotifications
public int getPostingNotifications() -
setPostingNotifications
public void setPostingNotifications(int flags) -
getNotifyMessageChannel
-
setNotifyMessageChannel
-
getTagAssigns
-
setTagAssigns
-
getTagRemoves
-
setTagRemoves
-
getPropertiesString
-
getEOAString
-
addTaggableBatch
public void addTaggableBatch(boolean starts) - Specified by:
addTaggableBatchin interfaceTag
-
addTaggable
- Specified by:
addTaggablein interfaceTag
-
removeTaggable
- Specified by:
removeTaggablein interfaceTag
-
sync
protected void sync() -
closing
protected void closing() -
removeTag
-
isTagRemoved
public boolean isTagRemoved()- Specified by:
isTagRemovedin interfaceTag
-
getDescription
- Specified by:
getDescriptionin interfaceTag
-
setDescription
- Specified by:
setDescriptionin interfaceTag
-
setTransientProperty
- Specified by:
setTransientPropertyin interfaceTag
-
getTransientProperty
- Specified by:
getTransientPropertyin interfaceTag
-
addTagListener
- Specified by:
addTagListenerin interfaceTag
-
destroy
protected void destroy() -
removeTagListener
- Specified by:
removeTagListenerin interfaceTag
-
getTaggables
- Specified by:
getTaggablesin interfaceTag
-
requestAttention
public void requestAttention()- Specified by:
requestAttentionin interfaceTag
-
addListener
- Specified by:
addListenerin interfaceTag
-
removeListener
- Specified by:
removeListenerin interfaceTag
-
readBooleanAttribute
-
writeBooleanAttribute
-
readLongAttribute
-
writeLongAttribute
-
readStringAttribute
-
writeStringAttribute
-
readMapAttribute
-
writeMapAttribute
-
readStringListAttribute
-
writeStringListAttribute
-
readLongListAttribute
-
writeLongListAttribute
-
loadTransientStuff
private void loadTransientStuff() -
saveTransientStuff
private void saveTransientStuff() -
loadPersistentStuff
private void loadPersistentStuff() -
savePersistentStuff
private void savePersistentStuff() -
getTagUploadTotal
public long[] getTagUploadTotal() -
getTagSessionUploadTotal
public long[] getTagSessionUploadTotal() -
resetTagSessionUploadTotal
public void resetTagSessionUploadTotal() -
getTagSessionUploadTotalRaw
private long[] getTagSessionUploadTotalRaw() -
getTagSessionUploadTotalCurrent
protected long[] getTagSessionUploadTotalCurrent() -
getTagDownloadTotal
public long[] getTagDownloadTotal() -
getTagSessionDownloadTotal
public long[] getTagSessionDownloadTotal() -
resetTagSessionDownloadTotal
public void resetTagSessionDownloadTotal() -
getTagSessionDownloadTotalRaw
private long[] getTagSessionDownloadTotalRaw() -
getTagSessionDownloadTotalCurrent
protected long[] getTagSessionDownloadTotalCurrent() -
setRecentHistoryRetention
public void setRecentHistoryRetention(boolean required) -
getRecentHistory
public int[][] getRecentHistory() -
getTaggableAddedTime
- Specified by:
getTaggableAddedTimein interfaceTag
-
tick
public void tick(long mono_now, int count) - Specified by:
tickin interfaceSimpleTimer.TimerTickReceiver
-
getVuzeFile
- Specified by:
getVuzeFilein interfaceTag
-
generate
-