Class TagBase

    • Field Detail

      • AT_RATELIMIT_UP

        protected static final java.lang.String AT_RATELIMIT_UP
        See Also:
        Constant Field Values
      • AT_RATELIMIT_DOWN

        protected static final java.lang.String AT_RATELIMIT_DOWN
        See Also:
        Constant Field Values
      • AT_CAN_BE_PUBLIC

        protected static final java.lang.String AT_CAN_BE_PUBLIC
        See Also:
        Constant Field Values
      • AT_ORIGINAL_NAME

        protected static final java.lang.String AT_ORIGINAL_NAME
        See Also:
        Constant Field Values
      • AT_IMAGE_SORT_ORDER

        protected static final java.lang.String AT_IMAGE_SORT_ORDER
        See Also:
        Constant Field Values
      • AT_RATELIMIT_UP_PRI

        protected static final java.lang.String AT_RATELIMIT_UP_PRI
        See Also:
        Constant Field Values
      • AT_XCODE_TARGET

        protected static final java.lang.String AT_XCODE_TARGET
        See Also:
        Constant Field Values
      • AT_FL_PREVENT_DELETE

        protected static final java.lang.String AT_FL_PREVENT_DELETE
        See Also:
        Constant Field Values
      • AT_FL_MOVE_COMP

        protected static final java.lang.String AT_FL_MOVE_COMP
        See Also:
        Constant Field Values
      • AT_FL_MOVE_COMP_OPT

        protected static final java.lang.String AT_FL_MOVE_COMP_OPT
        See Also:
        Constant Field Values
      • AT_FL_MOVE_REM_OPT

        protected static final java.lang.String AT_FL_MOVE_REM_OPT
        See Also:
        Constant Field Values
      • AT_FL_COPY_COMP

        protected static final java.lang.String AT_FL_COPY_COMP
        See Also:
        Constant Field Values
      • AT_FL_COPY_COMP_OPT

        protected static final java.lang.String AT_FL_COPY_COMP_OPT
        See Also:
        Constant Field Values
      • AT_FL_INIT_LOC_OPT

        protected static final java.lang.String AT_FL_INIT_LOC_OPT
        See Also:
        Constant Field Values
      • AT_FL_MOVE_ASSIGN

        protected static final java.lang.String AT_FL_MOVE_ASSIGN
        See Also:
        Constant Field Values
      • AT_FL_MOVE_ASSIGN_OPT

        protected static final java.lang.String AT_FL_MOVE_ASSIGN_OPT
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MIN_SR

        protected static final java.lang.String AT_RATELIMIT_MIN_SR
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MAX_SR

        protected static final java.lang.String AT_RATELIMIT_MAX_SR
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MAX_SR_ACTION

        protected static final java.lang.String AT_RATELIMIT_MAX_SR_ACTION
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MAX_AGGREGATE_SR

        protected static final java.lang.String AT_RATELIMIT_MAX_AGGREGATE_SR
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MAX_AGGREGATE_SR_ACTION

        protected static final java.lang.String AT_RATELIMIT_MAX_AGGREGATE_SR_ACTION
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY

        protected static final java.lang.String AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY
        See Also:
        Constant Field Values
      • AT_RATELIMIT_FP_SEEDING

        protected static final java.lang.String AT_RATELIMIT_FP_SEEDING
        See Also:
        Constant Field Values
      • AT_RATELIMIT_BOOST

        protected static final java.lang.String AT_RATELIMIT_BOOST
        See Also:
        Constant Field Values
      • AT_RATELIMIT_MAX_ACTIVE_DL

        protected static final java.lang.String AT_RATELIMIT_MAX_ACTIVE_DL
        See Also:
        Constant Field Values
      • AT_PROPERTY_PREFIX

        protected static final java.lang.String AT_PROPERTY_PREFIX
        See Also:
        Constant Field Values
      • AT_MAX_TAGGABLES

        protected static final java.lang.String AT_MAX_TAGGABLES
        See Also:
        Constant Field Values
      • AT_REMOVAL_STRATEGY

        protected static final java.lang.String AT_REMOVAL_STRATEGY
        See Also:
        Constant Field Values
      • AT_EOS_OPTIONS_TEMPLATE

        protected static final java.lang.String AT_EOS_OPTIONS_TEMPLATE
        See Also:
        Constant Field Values
      • AT_NOTIFICATION_POST

        protected static final java.lang.String AT_NOTIFICATION_POST
        See Also:
        Constant Field Values
      • AT_NOTIFICATION_PUBLISH

        protected static final java.lang.String AT_NOTIFICATION_PUBLISH
        See Also:
        Constant Field Values
      • AT_LIMIT_ORDERING

        protected static final java.lang.String AT_LIMIT_ORDERING
        See Also:
        Constant Field Values
      • AT_EOS_ASSIGN_TAGS

        protected static final java.lang.String AT_EOS_ASSIGN_TAGS
        See Also:
        Constant Field Values
      • EMPTY_STRING_LIST

        private static final java.lang.String[] EMPTY_STRING_LIST
      • tag_id

        private final int tag_id
      • tag_name

        private java.lang.String tag_name
      • is_visible

        private java.lang.Boolean is_visible
      • is_public

        private java.lang.Boolean is_public
      • flags

        private long flags
      • group

        private java.lang.String group
      • colour

        private int[] colour
      • colours

        private long[] colours
      • description

        private java.lang.String description
      • image_sort_order

        private int image_sort_order
      • transient_properties

        private java.util.HashMap<java.lang.String,​java.lang.Object> transient_properties
      • session_cache

        private static final java.util.Map<java.lang.Long,​long[][]> 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_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 Detail

      • TagBase

        protected TagBase​(TagTypeBase _tag_type,
                          int _tag_id,
                          java.lang.String _tag_name)
    • Method Detail

      • initialized

        protected void initialized()
      • getTag

        public Tag getTag()
      • addTag

        protected void addTag()
      • getTagType

        public TagTypeBase getTagType()
        Description copied from interface: Tag
        Unique type denoting this species of tag
        Specified by:
        getTagType in interface Tag
        Returns:
      • getTagID

        public int getTagID()
        Description copied from interface: Tag
        Unique ID within this tag type
        Specified by:
        getTagID in interface Tag
        Returns:
      • getTagUID

        public long getTagUID()
        Description copied from interface: Tag
        Unique across tag types and can be used to lookup by TagManager::lookuptagByUID
        Specified by:
        getTagUID in interface Tag
        Returns:
      • getTagName

        public java.lang.String getTagName()
        Specified by:
        getTagName in interface Tag
      • getTagNameRaw

        protected java.lang.String getTagNameRaw()
      • getTagName

        public java.lang.String getTagName​(boolean localize)
        Specified by:
        getTagName in interface Tag
      • isPublic

        public boolean isPublic()
        Specified by:
        isPublic in interface Tag
      • setPublic

        public void setPublic​(boolean v)
        Specified by:
        setPublic in interface Tag
      • getPublicDefault

        protected boolean getPublicDefault()
      • setCanBePublic

        public void setCanBePublic​(boolean can_be_public)
        Specified by:
        setCanBePublic in interface Tag
      • canBePublic

        public boolean canBePublic()
        Specified by:
        canBePublic in interface Tag
      • getCanBePublicDefault

        protected boolean getCanBePublicDefault()
      • setFlag

        public void setFlag​(long flag,
                            boolean value)
        Specified by:
        setFlag in interface Tag
      • getFlag

        public boolean getFlag​(long flag)
        Specified by:
        getFlag in interface Tag
      • isTagAuto

        public boolean[] isTagAuto()
        Specified by:
        isTagAuto in interface Tag
        Returns:
        [ auto_add, auto_remove, auto_new_download_only (tag constraint) ]
      • isVisible

        public boolean isVisible()
        Specified by:
        isVisible in interface Tag
      • setVisible

        public void setVisible​(boolean v)
        Specified by:
        setVisible in interface Tag
      • getGroup

        public java.lang.String getGroup()
        Specified by:
        getGroup in interface Tag
      • setGroup

        public void setGroup​(java.lang.String new_group)
        Specified by:
        setGroup in interface Tag
      • getVisibleDefault

        protected boolean getVisibleDefault()
      • getImageID

        public java.lang.String getImageID()
        Specified by:
        getImageID in interface Tag
      • setImageID

        public void setImageID​(java.lang.String id)
        Specified by:
        setImageID in interface Tag
      • getImageFile

        public java.lang.String getImageFile()
        Specified by:
        getImageFile in interface Tag
      • setImageFile

        public void setImageFile​(java.lang.String id)
        Specified by:
        setImageFile in interface Tag
      • setImageSortOrder

        public void setImageSortOrder​(int order)
        Specified by:
        setImageSortOrder in interface Tag
      • getImageSortOrder

        public int getImageSortOrder()
        Specified by:
        getImageSortOrder in interface Tag
      • decodeRGB

        private int[] decodeRGB​(java.lang.String str)
      • encodeRGB

        private java.lang.String encodeRGB​(int[] rgb)
      • isColorDefault

        public boolean isColorDefault()
        Specified by:
        isColorDefault in interface Tag
      • getColor

        public int[] getColor()
        Specified by:
        getColor in interface Tag
      • setColor

        public void setColor​(int[] rgb)
        Specified by:
        setColor in interface Tag
      • getColors

        public long[] getColors()
        Specified by:
        getColors in interface Tag
      • setColors

        public void setColors​(long[] params)
        Specified by:
        setColors in interface Tag
      • 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)
      • supportsTagInitialSaveFolder

        public boolean supportsTagInitialSaveFolder()
      • getTagInitialSaveFolder

        public java.io.File getTagInitialSaveFolder()
      • setTagInitialSaveFolder

        public void setTagInitialSaveFolder​(java.io.File folder)
      • getTagInitialSaveOptions

        public long getTagInitialSaveOptions()
      • setTagInitialSaveOptions

        public void setTagInitialSaveOptions​(long options)
      • supportsTagMoveOnComplete

        public boolean supportsTagMoveOnComplete()
      • getTagMoveOnCompleteFolder

        public java.io.File getTagMoveOnCompleteFolder()
      • setTagMoveOnCompleteFolder

        public void setTagMoveOnCompleteFolder​(java.io.File folder)
      • getTagMoveOnCompleteOptions

        public long getTagMoveOnCompleteOptions()
      • setTagMoveOnCompleteOptions

        public void setTagMoveOnCompleteOptions​(long options)
      • supportsTagCopyOnComplete

        public boolean supportsTagCopyOnComplete()
      • getTagCopyOnCompleteFolder

        public java.io.File getTagCopyOnCompleteFolder()
      • setTagCopyOnCompleteFolder

        public void setTagCopyOnCompleteFolder​(java.io.File folder)
      • getTagCopyOnCompleteOptions

        public long getTagCopyOnCompleteOptions()
      • setTagCopyOnCompleteOptions

        public void setTagCopyOnCompleteOptions​(long options)
      • supportsTagMoveOnRemove

        public boolean supportsTagMoveOnRemove()
      • getTagMoveOnRemoveFolder

        public java.io.File getTagMoveOnRemoveFolder()
      • setTagMoveOnRemoveFolder

        public void setTagMoveOnRemoveFolder​(java.io.File folder)
      • getTagMoveOnRemoveOptions

        public long getTagMoveOnRemoveOptions()
      • setTagMoveOnRemoveOptions

        public void setTagMoveOnRemoveOptions​(long options)
      • supportsTagMoveOnAssign

        public boolean supportsTagMoveOnAssign()
      • getTagMoveOnAssignFolder

        public java.io.File getTagMoveOnAssignFolder()
      • setTagMoveOnAssignFolder

        public void setTagMoveOnAssignFolder​(java.io.File folder)
      • getTagMoveOnAssignOptions

        public long getTagMoveOnAssignOptions()
      • setTagMoveOnAssignOptions

        public void setTagMoveOnAssignOptions​(long options)
      • getTagMinShareRatio

        public int getTagMinShareRatio()
      • setTagMinShareRatio

        public void setTagMinShareRatio​(int sr)
      • getTagMaxShareRatio

        public int getTagMaxShareRatio()
      • setTagMaxShareRatio

        public void setTagMaxShareRatio​(int sr)
      • getTagMaxShareRatioAction

        public int getTagMaxShareRatioAction()
      • setTagMaxShareRatioAction

        public void setTagMaxShareRatioAction​(int action)
      • getTagAggregateShareRatio

        public int getTagAggregateShareRatio()
      • getTagMaxAggregateShareRatio

        public int getTagMaxAggregateShareRatio()
      • setTagMaxAggregateShareRatio

        public void setTagMaxAggregateShareRatio​(int sr)
      • getTagMaxAggregateShareRatioAction

        public int getTagMaxAggregateShareRatioAction()
      • setTagMaxAggregateShareRatioAction

        public void setTagMaxAggregateShareRatioAction​(int action)
      • getTagMaxAggregateShareRatioHasPriority

        public boolean getTagMaxAggregateShareRatioHasPriority()
      • setTagMaxAggregateShareRatioHasPriority

        public void setTagMaxAggregateShareRatioHasPriority​(boolean priority)
      • getFirstPrioritySeeding

        public boolean getFirstPrioritySeeding()
      • setFirstPrioritySeeding

        public void setFirstPrioritySeeding​(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)
      • 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

        public java.lang.String getActionScript()
      • setActionScript

        public void setActionScript​(java.lang.String script)
      • getPostMessageChannel

        public java.lang.String getPostMessageChannel()
      • setPostMessageChannel

        public void setPostMessageChannel​(java.lang.String channel)
      • getPostingNotifications

        public int getPostingNotifications()
      • setPostingNotifications

        public void setPostingNotifications​(int flags)
      • getNotifyMessageChannel

        public java.lang.String getNotifyMessageChannel()
      • setNotifyMessageChannel

        public void setNotifyMessageChannel​(java.lang.String channel)
      • getTagAssigns

        public java.util.List<Tag> getTagAssigns()
      • setTagAssigns

        public void setTagAssigns​(java.util.List<Tag> tags)
      • sync

        protected void sync()
      • closing

        protected void closing()
      • removeTag

        public void removeTag()
        Specified by:
        removeTag in interface Tag
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface Tag
      • setDescription

        public void setDescription​(java.lang.String str)
        Specified by:
        setDescription in interface Tag
      • setTransientProperty

        public void setTransientProperty​(java.lang.String property,
                                         java.lang.Object value)
        Specified by:
        setTransientProperty in interface Tag
      • getTransientProperty

        public java.lang.Object getTransientProperty​(java.lang.String property)
        Specified by:
        getTransientProperty in interface Tag
      • addTagListener

        public void addTagListener​(TagListener listener,
                                   boolean fire_for_existing)
        Specified by:
        addTagListener in interface Tag
      • destroy

        protected void destroy()
      • requestAttention

        public void requestAttention()
        Specified by:
        requestAttention in interface Tag
      • readBooleanAttribute

        protected java.lang.Boolean readBooleanAttribute​(java.lang.String attr,
                                                         java.lang.Boolean def)
      • writeBooleanAttribute

        protected boolean writeBooleanAttribute​(java.lang.String attr,
                                                java.lang.Boolean value)
      • readLongAttribute

        protected java.lang.Long readLongAttribute​(java.lang.String attr,
                                                   java.lang.Long def)
      • writeLongAttribute

        protected boolean writeLongAttribute​(java.lang.String attr,
                                             long value)
      • readStringAttribute

        protected java.lang.String readStringAttribute​(java.lang.String attr,
                                                       java.lang.String def)
      • writeStringAttribute

        protected boolean writeStringAttribute​(java.lang.String attr,
                                               java.lang.String value)
        Returns:
        Whether attribute was changed from existing value
      • readMapAttribute

        protected java.util.Map<java.lang.String,​java.lang.Object> readMapAttribute​(java.lang.String attr,
                                                                                          java.util.Map<java.lang.String,​java.lang.Object> def)
      • writeMapAttribute

        protected void writeMapAttribute​(java.lang.String attr,
                                         java.util.Map<java.lang.String,​java.lang.Object> value)
      • readStringListAttribute

        protected java.lang.String[] readStringListAttribute​(java.lang.String attr,
                                                             java.lang.String[] def)
      • writeStringListAttribute

        protected boolean writeStringListAttribute​(java.lang.String attr,
                                                   java.lang.String[] value)
      • readLongListAttribute

        protected long[] readLongListAttribute​(java.lang.String attr,
                                               long[] def)
      • writeLongListAttribute

        protected boolean writeLongListAttribute​(java.lang.String attr,
                                                 long[] value)
      • 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()