com.aelitis.azureus.core.tag.impl
Class TagDownloadWithState

java.lang.Object
  extended by com.aelitis.azureus.core.tag.impl.TagBase
      extended by com.aelitis.azureus.core.tag.impl.TagWithState
          extended by com.aelitis.azureus.core.tag.impl.TagDownloadWithState
All Implemented Interfaces:
TagDownload, TagFeature, TagFeatureExecOnAssign, TagFeatureFileLocation, TagFeatureLimits, TagFeatureNotifications, TagFeatureProperties, TagFeatureRateLimit, TagFeatureRSSFeed, TagFeatureRunState, TagFeatureTranscode, SimpleTimer.TimerTickReceiver, Tag

public class TagDownloadWithState
extends TagWithState
implements TagDownload


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aelitis.azureus.core.tag.impl.TagWithState
TagWithState.ActivityCallback
 
Nested classes/interfaces inherited from interface com.aelitis.azureus.core.tag.TagFeatureProperties
TagFeatureProperties.TagProperty, TagFeatureProperties.TagPropertyListener
 
Field Summary
 
Fields inherited from class com.aelitis.azureus.core.tag.impl.TagBase
AT_BYTES_DOWN, AT_BYTES_UP, AT_CAN_BE_PUBLIC, AT_COLOR_ID, AT_DESCRIPTION, AT_EOA_PREFIX, AT_EOS_SCRIPT, AT_FL_COPY_COMP, AT_FL_COPY_COMP_OPT, AT_FL_INIT_LOC, AT_FL_INIT_LOC_OPT, AT_FL_MOVE_COMP, AT_FL_MOVE_COMP_OPT, AT_GROUP, AT_IMAGE_ID, AT_LIMIT_ORDERING, AT_MAX_TAGGABLES, AT_NOTIFICATION_POST, AT_ORIGINAL_NAME, AT_PROPERTY_PREFIX, AT_PUBLIC, AT_RATELIMIT_DOWN, AT_RATELIMIT_MAX_AGGREGATE_SR, AT_RATELIMIT_MAX_AGGREGATE_SR_ACTION, AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY, AT_RATELIMIT_MAX_SR, AT_RATELIMIT_MAX_SR_ACTION, AT_RATELIMIT_MIN_SR, AT_RATELIMIT_UP, AT_RATELIMIT_UP_PRI, AT_REMOVAL_STRATEGY, AT_RSS_ENABLE, AT_VISIBLE, AT_XCODE_TARGET
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagDownload
FEATURES
 
Fields inherited from interface com.aelitis.azureus.core.tag.Tag
TP_SETTINGS_REQUESTED
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureRunState
RSC_ALL, RSC_NONE, RSC_PAUSE, RSC_RESUME, RSC_START, RSC_START_STOP_PAUSE, RSC_STOP, RSC_STOP_PAUSE
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureRateLimit
AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY_DEFAULT, SR_ACTION_PAUSE, SR_ACTION_QUEUE, SR_ACTION_STOP, SR_AGGREGATE_ACTION_DEFAULT, SR_INDIVIDUAL_ACTION_DEFAULT
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeature
TF_EXEC_ON_ASSIGN, TF_FILE_LOCATION, TF_LIMITS, TF_NONE, TF_NOTIFICATIONS, TF_PROPERTIES, TF_RATE_LIMIT, TF_RSS_FEED, TF_RUN_STATE, TF_XCODE
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureFileLocation
FL_BOTH, FL_DATA, FL_DEFAULT, FL_NONE, FL_TORRENT
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureProperties
PR_CONSTRAINT, PR_TRACKER_TEMPLATES, PR_TRACKERS, PR_UNTAGGED, PT_BOOLEAN, PT_LONG, PT_STRING_LIST
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureExecOnAssign
ACTION_DESTROY, ACTION_FORCE_START, ACTION_NONE, ACTION_NOT_FORCE_START, ACTION_PAUSE, ACTION_RESUME, ACTION_SCRIPT, ACTION_START, ACTION_STOP
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureLimits
OP_ADDED_TO_VUZE, OP_ADED_TO_TAG, OP_DEFAULT, RS_ARCHIVE, RS_DEFAULT, RS_DELETE_FROM_COMPUTER, RS_MOVE_TO_OLD_TAG, RS_NONE, RS_REMOVE_FROM_LIBRARY
 
Fields inherited from interface com.aelitis.azureus.core.tag.TagFeatureNotifications
NOTIFY_NONE, NOTIFY_ON_ADD, NOTIFY_ON_REMOVE
 
Constructor Summary
protected TagDownloadWithState(TagTypeBase tt, int tag_id, Map details, boolean do_rates, boolean do_up, boolean do_down, boolean do_bytes, int run_states)
           
  TagDownloadWithState(TagTypeBase tt, int tag_id, String name, boolean do_rates, boolean do_up, boolean do_down, boolean do_bytes, int run_states)
           
 
Method Summary
 void addTaggable(Taggable t)
           
protected  void checkMaximumTaggables()
           
 int getMaximumTaggables()
           
 boolean[] getPerformableOperations(int[] ops)
           
 int getRunStateCapabilities()
           
 int getSupportedActions()
           
 TagFeatureProperties.TagProperty[] getSupportedProperties()
           
 int getTagAggregateShareRatio()
           
 int getTagCurrentDownloadRate()
           
 int getTagCurrentUploadRate()
           
 int getTagDownloadLimit()
           
 int getTaggableTypes()
           
 Set<DownloadManager> getTaggedDownloads()
           
 int getTagMaxAggregateShareRatio()
           
 int getTagMaxAggregateShareRatioAction()
           
 boolean getTagMaxAggregateShareRatioHasPriority()
           
 int getTagMaxShareRatio()
           
 int getTagMaxShareRatioAction()
           
 int getTagMinShareRatio()
           
protected  long[] getTagSessionDownloadTotalCurrent()
           
protected  long[] getTagSessionUploadTotalCurrent()
           
 String[] getTagTranscodeTarget()
           
 int getTagUploadLimit()
           
 int getTagUploadPriority()
           
 boolean hasRunStateCapability(int capability)
           
 boolean[] isTagAuto()
           
 void performOperation(int op)
           
 void removeTag()
           
protected  void setSupportsFileLocation(boolean sup)
           
protected  void setSupportsTagTranscode(boolean sup)
           
 void setTagDownloadLimit(int bps)
           
 void setTagMaxAggregateShareRatio(int sr)
           
 void setTagMaxAggregateShareRatioAction(int action)
           
 void setTagMaxAggregateShareRatioHasPriority(boolean priority)
           
 void setTagMaxShareRatio(int sr)
           
 void setTagMaxShareRatioAction(int action)
           
 void setTagMinShareRatio(int sr)
           
 void setTagTranscodeTarget(String uid, String name)
           
 void setTagUploadLimit(int bps)
           
 void setTagUploadPriority(int priority)
           
 boolean supportsTagCopyOnComplete()
           
 boolean supportsTagDownloadLimit()
           
 boolean supportsTagInitialSaveFolder()
           
 boolean supportsTagMoveOnComplete()
           
 boolean supportsTagRates()
           
 boolean supportsTagTranscode()
           
 boolean supportsTagUploadLimit()
           
protected  void sync()
           
 
Methods inherited from class com.aelitis.azureus.core.tag.impl.TagWithState
checkNotifications, exportDetails, getTaggableAddedTime, getTagged, getTaggedCount, hasTaggable, isRemoved, removeTaggable, setTagName
 
Methods inherited from class com.aelitis.azureus.core.tag.impl.TagBase
addListener, addTag, addTagListener, canBePublic, closing, createTagProperty, destroy, generate, getActionScript, getCanBePublicDefault, getColor, getDescription, getGroup, getImageID, getManager, getOrdering, getPostingNotifications, getProperty, getPublicDefault, getRecentHistory, getRemovalStrategy, getTag, getTagCopyOnCompleteFolder, getTagCopyOnCompleteOptions, getTagDownloadTotal, getTaggables, getTagID, getTagInitialSaveFolder, getTagInitialSaveOptions, getTagMoveOnCompleteFolder, getTagMoveOnCompleteOptions, getTagName, getTagName, getTagNameRaw, getTagSessionDownloadTotal, getTagSessionUploadTotal, getTagType, getTagUID, getTagUploadTotal, getTransientProperty, getVisibleDefault, initialized, isActionEnabled, isColorDefault, isPublic, isTagRSSFeedEnabled, isVisible, readBooleanAttribute, readLongAttribute, readStringAttribute, readStringListAttribute, removeListener, removeTagListener, requestAttention, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setActionEnabled, setActionScript, setCanBePublic, setColor, setDescription, setGroup, setImageID, setMaximumTaggables, setOrdering, setPostingNotifications, setPublic, setRecentHistoryRetention, setRemovalStrategy, setTagCopyOnCompleteFolder, setTagCopyOnCompleteOptions, setTagInitialSaveFolder, setTagInitialSaveOptions, setTagMoveOnCompleteFolder, setTagMoveOnCompleteOptions, setTagRSSFeedEnabled, setTransientProperty, setVisible, supportsAction, tick, writeBooleanAttribute, writeLongAttribute, writeStringAttribute, writeStringListAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aelitis.azureus.core.tag.Tag
addTagListener, canBePublic, getColor, getDescription, getGroup, getImageID, getTaggableAddedTime, getTagged, getTaggedCount, getTagID, getTagName, getTagType, getTagUID, getTransientProperty, hasTaggable, isPublic, isVisible, removeTaggable, removeTagListener, requestAttention, setCanBePublic, setColor, setDescription, setGroup, setImageID, setPublic, setTagName, setTransientProperty, setVisible
 
Methods inherited from interface org.gudy.azureus2.plugins.tag.Tag
addListener, getTaggables, getTagName, removeListener
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureRSSFeed
isTagRSSFeedEnabled, setTagRSSFeedEnabled
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureRateLimit
getRecentHistory, getTagDownloadTotal, getTagSessionDownloadTotal, getTagSessionUploadTotal, getTagUploadTotal, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setRecentHistoryRetention
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeature
getTag
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureFileLocation
getTagCopyOnCompleteFolder, getTagCopyOnCompleteOptions, getTagInitialSaveFolder, getTagInitialSaveOptions, getTagMoveOnCompleteFolder, getTagMoveOnCompleteOptions, setTagCopyOnCompleteFolder, setTagCopyOnCompleteOptions, setTagInitialSaveFolder, setTagInitialSaveOptions, setTagMoveOnCompleteFolder, setTagMoveOnCompleteOptions
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureProperties
getProperty
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureExecOnAssign
getActionScript, isActionEnabled, setActionEnabled, setActionScript, supportsAction
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureLimits
getOrdering, getRemovalStrategy, setMaximumTaggables, setOrdering, setRemovalStrategy
 
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureNotifications
getPostingNotifications, setPostingNotifications
 

Constructor Detail

TagDownloadWithState

public TagDownloadWithState(TagTypeBase tt,
                            int tag_id,
                            String name,
                            boolean do_rates,
                            boolean do_up,
                            boolean do_down,
                            boolean do_bytes,
                            int run_states)

TagDownloadWithState

protected TagDownloadWithState(TagTypeBase tt,
                               int tag_id,
                               Map details,
                               boolean do_rates,
                               boolean do_up,
                               boolean do_down,
                               boolean do_bytes,
                               int run_states)
Method Detail

removeTag

public void removeTag()
Overrides:
removeTag in class TagWithState

addTaggable

public void addTaggable(Taggable t)
Overrides:
addTaggable in class TagWithState

getTaggableTypes

public int getTaggableTypes()

getTaggedDownloads

public Set<DownloadManager> getTaggedDownloads()
Specified by:
getTaggedDownloads in interface TagDownload

supportsTagRates

public boolean supportsTagRates()
Specified by:
supportsTagRates in interface TagFeatureRateLimit

supportsTagUploadLimit

public boolean supportsTagUploadLimit()
Specified by:
supportsTagUploadLimit in interface TagFeatureRateLimit

supportsTagDownloadLimit

public boolean supportsTagDownloadLimit()
Specified by:
supportsTagDownloadLimit in interface TagFeatureRateLimit

getTagUploadLimit

public int getTagUploadLimit()
Specified by:
getTagUploadLimit in interface TagFeatureRateLimit

setTagUploadLimit

public void setTagUploadLimit(int bps)
Specified by:
setTagUploadLimit in interface TagFeatureRateLimit

getTagCurrentUploadRate

public int getTagCurrentUploadRate()
Specified by:
getTagCurrentUploadRate in interface TagFeatureRateLimit

getTagDownloadLimit

public int getTagDownloadLimit()
Specified by:
getTagDownloadLimit in interface TagFeatureRateLimit

setTagDownloadLimit

public void setTagDownloadLimit(int bps)
Specified by:
setTagDownloadLimit in interface TagFeatureRateLimit

getTagCurrentDownloadRate

public int getTagCurrentDownloadRate()
Specified by:
getTagCurrentDownloadRate in interface TagFeatureRateLimit

getTagUploadPriority

public int getTagUploadPriority()
Specified by:
getTagUploadPriority in interface TagFeatureRateLimit

getTagSessionUploadTotalCurrent

protected long[] getTagSessionUploadTotalCurrent()
Overrides:
getTagSessionUploadTotalCurrent in class TagBase

getTagSessionDownloadTotalCurrent

protected long[] getTagSessionDownloadTotalCurrent()
Overrides:
getTagSessionDownloadTotalCurrent in class TagBase

setTagUploadPriority

public void setTagUploadPriority(int priority)
Specified by:
setTagUploadPriority in interface TagFeatureRateLimit

getTagMinShareRatio

public int getTagMinShareRatio()
Specified by:
getTagMinShareRatio in interface TagFeatureRateLimit
Overrides:
getTagMinShareRatio in class TagBase

setTagMinShareRatio

public void setTagMinShareRatio(int sr)
Specified by:
setTagMinShareRatio in interface TagFeatureRateLimit
Overrides:
setTagMinShareRatio in class TagBase

getTagMaxShareRatio

public int getTagMaxShareRatio()
Specified by:
getTagMaxShareRatio in interface TagFeatureRateLimit
Overrides:
getTagMaxShareRatio in class TagBase

setTagMaxShareRatio

public void setTagMaxShareRatio(int sr)
Specified by:
setTagMaxShareRatio in interface TagFeatureRateLimit
Overrides:
setTagMaxShareRatio in class TagBase

getTagMaxShareRatioAction

public int getTagMaxShareRatioAction()
Specified by:
getTagMaxShareRatioAction in interface TagFeatureRateLimit
Overrides:
getTagMaxShareRatioAction in class TagBase

setTagMaxShareRatioAction

public void setTagMaxShareRatioAction(int action)
Specified by:
setTagMaxShareRatioAction in interface TagFeatureRateLimit
Overrides:
setTagMaxShareRatioAction in class TagBase

getTagAggregateShareRatio

public int getTagAggregateShareRatio()
Specified by:
getTagAggregateShareRatio in interface TagFeatureRateLimit
Overrides:
getTagAggregateShareRatio in class TagBase

getTagMaxAggregateShareRatio

public int getTagMaxAggregateShareRatio()
Specified by:
getTagMaxAggregateShareRatio in interface TagFeatureRateLimit
Overrides:
getTagMaxAggregateShareRatio in class TagBase

setTagMaxAggregateShareRatio

public void setTagMaxAggregateShareRatio(int sr)
Specified by:
setTagMaxAggregateShareRatio in interface TagFeatureRateLimit
Overrides:
setTagMaxAggregateShareRatio in class TagBase

getTagMaxAggregateShareRatioAction

public int getTagMaxAggregateShareRatioAction()
Specified by:
getTagMaxAggregateShareRatioAction in interface TagFeatureRateLimit
Overrides:
getTagMaxAggregateShareRatioAction in class TagBase

setTagMaxAggregateShareRatioAction

public void setTagMaxAggregateShareRatioAction(int action)
Specified by:
setTagMaxAggregateShareRatioAction in interface TagFeatureRateLimit
Overrides:
setTagMaxAggregateShareRatioAction in class TagBase

getTagMaxAggregateShareRatioHasPriority

public boolean getTagMaxAggregateShareRatioHasPriority()
Specified by:
getTagMaxAggregateShareRatioHasPriority in interface TagFeatureRateLimit
Overrides:
getTagMaxAggregateShareRatioHasPriority in class TagBase

setTagMaxAggregateShareRatioHasPriority

public void setTagMaxAggregateShareRatioHasPriority(boolean priority)
Specified by:
setTagMaxAggregateShareRatioHasPriority in interface TagFeatureRateLimit
Overrides:
setTagMaxAggregateShareRatioHasPriority in class TagBase

sync

protected void sync()
Overrides:
sync in class TagBase

getRunStateCapabilities

public int getRunStateCapabilities()
Specified by:
getRunStateCapabilities in interface TagFeatureRunState

hasRunStateCapability

public boolean hasRunStateCapability(int capability)
Specified by:
hasRunStateCapability in interface TagFeatureRunState

getPerformableOperations

public boolean[] getPerformableOperations(int[] ops)
Specified by:
getPerformableOperations in interface TagFeatureRunState

performOperation

public void performOperation(int op)
Specified by:
performOperation in interface TagFeatureRunState

getSupportedActions

public int getSupportedActions()
Specified by:
getSupportedActions in interface TagFeatureExecOnAssign
Overrides:
getSupportedActions in class TagBase

setSupportsTagTranscode

protected void setSupportsTagTranscode(boolean sup)

supportsTagTranscode

public boolean supportsTagTranscode()
Specified by:
supportsTagTranscode in interface TagFeatureTranscode

getTagTranscodeTarget

public String[] getTagTranscodeTarget()
Specified by:
getTagTranscodeTarget in interface TagFeatureTranscode

setTagTranscodeTarget

public void setTagTranscodeTarget(String uid,
                                  String name)
Specified by:
setTagTranscodeTarget in interface TagFeatureTranscode

setSupportsFileLocation

protected void setSupportsFileLocation(boolean sup)

supportsTagInitialSaveFolder

public boolean supportsTagInitialSaveFolder()
Specified by:
supportsTagInitialSaveFolder in interface TagFeatureFileLocation
Overrides:
supportsTagInitialSaveFolder in class TagBase

supportsTagMoveOnComplete

public boolean supportsTagMoveOnComplete()
Specified by:
supportsTagMoveOnComplete in interface TagFeatureFileLocation
Overrides:
supportsTagMoveOnComplete in class TagBase

supportsTagCopyOnComplete

public boolean supportsTagCopyOnComplete()
Specified by:
supportsTagCopyOnComplete in interface TagFeatureFileLocation
Overrides:
supportsTagCopyOnComplete in class TagBase

getSupportedProperties

public TagFeatureProperties.TagProperty[] getSupportedProperties()
Specified by:
getSupportedProperties in interface TagFeatureProperties
Overrides:
getSupportedProperties in class TagBase

isTagAuto

public boolean[] isTagAuto()
Overrides:
isTagAuto in class TagBase
Returns:
[auto_add,auto_remove]

getMaximumTaggables

public int getMaximumTaggables()
Specified by:
getMaximumTaggables in interface TagFeatureLimits
Overrides:
getMaximumTaggables in class TagBase

checkMaximumTaggables

protected void checkMaximumTaggables()
Overrides:
checkMaximumTaggables in class TagBase