org.gudy.azureus2.core3.category.impl
Class CategoryImpl
java.lang.Object
com.aelitis.azureus.core.tag.impl.TagBase
org.gudy.azureus2.core3.category.impl.CategoryImpl
- All Implemented Interfaces:
- TagDownload, TagFeature, TagFeatureExecOnAssign, TagFeatureFileLocation, TagFeatureLimits, TagFeatureNotifications, TagFeatureProperties, TagFeatureRateLimit, TagFeatureRSSFeed, TagFeatureRunState, TagFeatureTranscode, Comparable, Category, SimpleTimer.TimerTickReceiver, Tag
public class CategoryImpl
- extends TagBase
- implements Category, Comparable, TagDownload
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 |
Methods inherited from class com.aelitis.azureus.core.tag.impl.TagBase |
addListener, addTag, addTaggable, addTagListener, canBePublic, checkMaximumTaggables, closing, createTagProperty, generate, getActionScript, getColor, getDescription, getGroup, getImageID, getManager, getMaximumTaggables, getOrdering, getPostingNotifications, getProperty, getPublicDefault, getRecentHistory, getRemovalStrategy, getSupportedActions, getSupportedProperties, getTag, getTagAggregateShareRatio, getTagCopyOnCompleteFolder, getTagCopyOnCompleteOptions, getTagDownloadTotal, getTaggableAddedTime, getTaggables, getTagID, getTagInitialSaveFolder, getTagInitialSaveOptions, getTagMaxAggregateShareRatio, getTagMaxAggregateShareRatioAction, getTagMaxAggregateShareRatioHasPriority, getTagMaxShareRatio, getTagMaxShareRatioAction, getTagMinShareRatio, getTagMoveOnCompleteFolder, getTagMoveOnCompleteOptions, getTagName, getTagNameRaw, getTagSessionDownloadTotal, getTagSessionDownloadTotalCurrent, getTagSessionUploadTotal, getTagSessionUploadTotalCurrent, getTagType, getTagUID, getTagUploadTotal, getTransientProperty, getVisibleDefault, initialized, isActionEnabled, isColorDefault, isPublic, isTagAuto, isTagRSSFeedEnabled, isVisible, readBooleanAttribute, readLongAttribute, readStringAttribute, readStringListAttribute, removeListener, removeTag, removeTaggable, removeTagListener, requestAttention, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setActionEnabled, setActionScript, setCanBePublic, setColor, setDescription, setGroup, setImageID, setMaximumTaggables, setOrdering, setPostingNotifications, setPublic, setRecentHistoryRetention, setRemovalStrategy, setTagCopyOnCompleteFolder, setTagCopyOnCompleteOptions, setTagInitialSaveFolder, setTagInitialSaveOptions, setTagMaxAggregateShareRatio, setTagMaxAggregateShareRatioAction, setTagMaxAggregateShareRatioHasPriority, setTagMaxShareRatio, setTagMaxShareRatioAction, setTagMinShareRatio, setTagMoveOnCompleteFolder, setTagMoveOnCompleteOptions, setTagName, setTagRSSFeedEnabled, setTransientProperty, setVisible, supportsAction, supportsTagCopyOnComplete, supportsTagInitialSaveFolder, supportsTagMoveOnComplete, sync, 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 |
addTaggable, addTagListener, canBePublic, getColor, getDescription, getGroup, getImageID, getTaggableAddedTime, getTagID, getTagType, getTagUID, getTransientProperty, isPublic, isTagAuto, isVisible, removeTag, removeTaggable, removeTagListener, requestAttention, setCanBePublic, setColor, setDescription, setGroup, setImageID, setPublic, setTagName, setTransientProperty, setVisible |
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureRateLimit |
getRecentHistory, getTagAggregateShareRatio, getTagDownloadTotal, getTagMaxAggregateShareRatio, getTagMaxAggregateShareRatioAction, getTagMaxAggregateShareRatioHasPriority, getTagMaxShareRatio, getTagMaxShareRatioAction, getTagMinShareRatio, getTagSessionDownloadTotal, getTagSessionUploadTotal, getTagUploadTotal, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setRecentHistoryRetention, setTagMaxAggregateShareRatio, setTagMaxAggregateShareRatioAction, setTagMaxAggregateShareRatioHasPriority, setTagMaxShareRatio, setTagMaxShareRatioAction, setTagMinShareRatio |
Methods inherited from interface com.aelitis.azureus.core.tag.TagFeatureFileLocation |
getTagCopyOnCompleteFolder, getTagCopyOnCompleteOptions, getTagInitialSaveFolder, getTagInitialSaveOptions, getTagMoveOnCompleteFolder, getTagMoveOnCompleteOptions, setTagCopyOnCompleteFolder, setTagCopyOnCompleteOptions, setTagInitialSaveFolder, setTagInitialSaveOptions, setTagMoveOnCompleteFolder, setTagMoveOnCompleteOptions, supportsTagCopyOnComplete, supportsTagInitialSaveFolder, supportsTagMoveOnComplete |
CategoryImpl
public CategoryImpl(CategoryManagerImpl manager,
String sName,
int maxup,
int maxdown,
Map<String,String> _attributes)
CategoryImpl
public CategoryImpl(CategoryManagerImpl manager,
String sName,
int type,
Map<String,String> _attributes)
addCategoryListener
public void addCategoryListener(CategoryListener l)
- Description copied from interface:
Category
- Add a Category Listener
- Specified by:
addCategoryListener
in interface Category
- Parameters:
l
- Listener to add
removeCategoryListener
public void removeCategoryListener(CategoryListener l)
- Description copied from interface:
Category
- Remove a Category Listener
- Specified by:
removeCategoryListener
in interface Category
- Parameters:
l
- Listener to remove
hasCategoryListener
public boolean hasCategoryListener(CategoryListener l)
- Specified by:
hasCategoryListener
in interface Category
getName
public String getName()
- Description copied from interface:
Category
- Retrieve the name of the category. All category names are unique.
- Specified by:
getName
in interface Category
- Returns:
- If type is TYPE_USER, returns name of the category
Otherwise, returns ID in MessageBundle.
getType
public int getType()
- Description copied from interface:
Category
- Retrieves what type of Category this is
- Specified by:
getType
in interface Category
- Returns:
- TYPE_* constant
getDownloadManagers
public List<DownloadManager> getDownloadManagers(List<DownloadManager> all_dms)
- Description copied from interface:
Category
- Retrieve a list of DownloadManagers for this category
- Specified by:
getDownloadManagers
in interface Category
- Returns:
- DownloadManager List
addManager
public void addManager(DownloadManagerState manager_state)
- Description copied from interface:
Category
- Add a DownloadManager to this category.
Used by DownloadManager. You should not have to add a DownloadManager object
manually. If you wish to change a DownloadManager's category, use
DownloadManager.setCategory(..) instead.
- Specified by:
addManager
in interface Category
- Parameters:
manager_state
- DownloadManager object to add to Category
removeManager
public void removeManager(DownloadManagerState manager_state)
- Description copied from interface:
Category
- Remove a DownloadManager object from this Category.
Used by DownloadManager. You should not have to add a DownloadManager object
manually. If you wish to change a DownloadManager's category, use
DownloadManager.setCategory(..) instead.
- Specified by:
removeManager
in interface Category
- Parameters:
manager_state
- DownloadManager object to remove from Category
setDownloadSpeed
public void setDownloadSpeed(int speed)
- Specified by:
setDownloadSpeed
in interface Category
getDownloadSpeed
public int getDownloadSpeed()
- Specified by:
getDownloadSpeed
in interface Category
setUploadSpeed
public void setUploadSpeed(int speed)
- Specified by:
setUploadSpeed
in interface Category
getUploadSpeed
public int getUploadSpeed()
- Specified by:
getUploadSpeed
in interface Category
setAttributes
protected void setAttributes(Map<String,String> a)
getAttributes
protected Map<String,String> getAttributes()
getStringAttribute
public String getStringAttribute(String name)
- Specified by:
getStringAttribute
in interface Category
setStringAttribute
public void setStringAttribute(String name,
String value)
- Specified by:
setStringAttribute
in interface Category
getIntAttribute
public int getIntAttribute(String name)
- Specified by:
getIntAttribute
in interface Category
setIntAttribute
public void setIntAttribute(String name,
int value)
- Specified by:
setIntAttribute
in interface Category
getBooleanAttribute
public boolean getBooleanAttribute(String name)
- Specified by:
getBooleanAttribute
in interface Category
setBooleanAttribute
public void setBooleanAttribute(String name,
boolean value)
- Specified by:
setBooleanAttribute
in interface Category
getTaggableTypes
public int getTaggableTypes()
getTagName
public String getTagName(boolean localize)
- Overrides:
getTagName
in class TagBase
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
setTagUploadPriority
public void setTagUploadPriority(int priority)
- Specified by:
setTagUploadPriority
in interface TagFeatureRateLimit
getCanBePublicDefault
public boolean getCanBePublicDefault()
- Overrides:
getCanBePublicDefault
in class TagBase
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 display_name)
- Specified by:
setTagTranscodeTarget
in interface TagFeatureTranscode
getTaggedDownloads
public Set<DownloadManager> getTaggedDownloads()
- Specified by:
getTaggedDownloads
in interface TagDownload
getTagged
public Set<Taggable> getTagged()
getTaggedCount
public int getTaggedCount()
hasTaggable
public boolean hasTaggable(Taggable t)
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
destroy
protected void destroy()
- Overrides:
destroy
in class TagBase
compareTo
public int compareTo(Object b)
- Specified by:
compareTo
in interface Comparable
dump
public void dump(IndentWriter writer)
- Specified by:
dump
in interface Category