com.aelitis.azureus.core.tag.impl
Class TagTypeBase
java.lang.Object
com.aelitis.azureus.core.tag.impl.TagTypeBase
- All Implemented Interfaces:
- TagListener, TagType
- Direct Known Subclasses:
- CategoryManagerImpl, TagTypeWithState
public abstract class TagTypeBase
- extends Object
- implements TagType, TagListener
Constructor Summary |
protected |
TagTypeBase(int _tag_type,
int _tag_features,
String _tag_name)
|
Method Summary |
void |
addTag(Tag t)
|
void |
addTagListener(Taggable taggable,
TagListener listener)
taggable-specific listneer for this tag-type |
protected void |
addTagType()
|
void |
addTagTypeListener(TagTypeListener listener,
boolean fire_for_existing)
|
protected void |
closing()
|
Tag |
createTag(String name,
boolean auto_add)
|
protected void |
fireChanged()
|
protected void |
fireChanged(Tag t)
|
void |
generate(IndentWriter writer)
|
protected void |
generateConfig(IndentWriter writer,
TagBase tag)
|
int[] |
getColorDefault()
|
Tag |
getTag(int tag_id)
|
Tag |
getTag(String tag_name,
boolean is_localized)
|
TagManagerImpl |
getTagManager()
|
List<Tag> |
getTagsForTaggable(Taggable taggable)
|
int |
getTagType()
Unique type denoting this species of tag |
long |
getTagTypeFeatures()
|
String |
getTagTypeName(boolean localize)
|
boolean |
hasTagTypeFeature(long feature)
|
boolean |
isTagTypeAuto()
|
boolean |
isTagTypePersistent()
|
protected Boolean |
readBooleanAttribute(TagBase tag,
String attr,
Boolean def)
|
protected Long |
readLongAttribute(TagBase tag,
String attr,
Long def)
|
protected String |
readStringAttribute(TagBase tag,
String attr,
String def)
|
protected String[] |
readStringListAttribute(TagBase tag,
String attr,
String[] def)
|
void |
removeTag(Tag t)
|
protected void |
removeTaggable(TaggableResolver resolver,
Taggable taggable)
|
void |
removeTagListener(Taggable taggable,
TagListener listener)
|
void |
removeTagType()
|
void |
removeTagTypeListener(TagTypeListener listener)
|
void |
requestAttention(Tag t)
|
protected Taggable |
resolveTaggable(String id)
|
protected void |
sync()
|
void |
taggableAdded(Tag tag,
Taggable tagged)
|
void |
taggableRemoved(Tag tag,
Taggable tagged)
|
void |
taggableSync(Tag tag)
|
protected boolean |
writeBooleanAttribute(TagBase tag,
String attr,
Boolean value)
|
protected boolean |
writeLongAttribute(TagBase tag,
String attr,
Long value)
|
protected void |
writeStringAttribute(TagBase tag,
String attr,
String value)
|
protected boolean |
writeStringListAttribute(TagBase tag,
String attr,
String[] value)
|
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.TagType |
getTags |
AT_COLOR_ID
protected static final String AT_COLOR_ID
- See Also:
- Constant Field Values
TagTypeBase
protected TagTypeBase(int _tag_type,
int _tag_features,
String _tag_name)
addTagType
protected void addTagType()
getTagManager
public TagManagerImpl getTagManager()
- Specified by:
getTagManager
in interface TagType
resolveTaggable
protected Taggable resolveTaggable(String id)
removeTaggable
protected void removeTaggable(TaggableResolver resolver,
Taggable taggable)
getTagType
public int getTagType()
- Description copied from interface:
TagType
- Unique type denoting this species of tag
- Specified by:
getTagType
in interface TagType
- Returns:
getTagTypeName
public String getTagTypeName(boolean localize)
- Specified by:
getTagTypeName
in interface TagType
isTagTypeAuto
public boolean isTagTypeAuto()
- Specified by:
isTagTypeAuto
in interface TagType
isTagTypePersistent
public boolean isTagTypePersistent()
- Specified by:
isTagTypePersistent
in interface TagType
getTagTypeFeatures
public long getTagTypeFeatures()
- Specified by:
getTagTypeFeatures
in interface TagType
hasTagTypeFeature
public boolean hasTagTypeFeature(long feature)
- Specified by:
hasTagTypeFeature
in interface TagType
fireChanged
protected void fireChanged()
createTag
public Tag createTag(String name,
boolean auto_add)
throws TagException
- Specified by:
createTag
in interface TagType
- Throws:
TagException
addTag
public void addTag(Tag t)
- Specified by:
addTag
in interface TagType
removeTag
public void removeTag(Tag t)
- Specified by:
removeTag
in interface TagType
requestAttention
public void requestAttention(Tag t)
getColorDefault
public int[] getColorDefault()
- Specified by:
getColorDefault
in interface TagType
sync
protected void sync()
closing
protected void closing()
getTag
public Tag getTag(int tag_id)
- Specified by:
getTag
in interface TagType
getTag
public Tag getTag(String tag_name,
boolean is_localized)
- Specified by:
getTag
in interface TagType
getTagsForTaggable
public List<Tag> getTagsForTaggable(Taggable taggable)
- Specified by:
getTagsForTaggable
in interface TagType
fireChanged
protected void fireChanged(Tag t)
removeTagType
public void removeTagType()
- Specified by:
removeTagType
in interface TagType
addTagTypeListener
public void addTagTypeListener(TagTypeListener listener,
boolean fire_for_existing)
- Specified by:
addTagTypeListener
in interface TagType
removeTagTypeListener
public void removeTagTypeListener(TagTypeListener listener)
- Specified by:
removeTagTypeListener
in interface TagType
taggableAdded
public void taggableAdded(Tag tag,
Taggable tagged)
- Specified by:
taggableAdded
in interface TagListener
taggableSync
public void taggableSync(Tag tag)
- Specified by:
taggableSync
in interface TagListener
taggableRemoved
public void taggableRemoved(Tag tag,
Taggable tagged)
- Specified by:
taggableRemoved
in interface TagListener
addTagListener
public void addTagListener(Taggable taggable,
TagListener listener)
- Description copied from interface:
TagType
- taggable-specific listneer for this tag-type
- Specified by:
addTagListener
in interface TagType
removeTagListener
public void removeTagListener(Taggable taggable,
TagListener listener)
- Specified by:
removeTagListener
in interface TagType
readBooleanAttribute
protected Boolean readBooleanAttribute(TagBase tag,
String attr,
Boolean def)
writeBooleanAttribute
protected boolean writeBooleanAttribute(TagBase tag,
String attr,
Boolean value)
readLongAttribute
protected Long readLongAttribute(TagBase tag,
String attr,
Long def)
writeLongAttribute
protected boolean writeLongAttribute(TagBase tag,
String attr,
Long value)
readStringAttribute
protected String readStringAttribute(TagBase tag,
String attr,
String def)
writeStringAttribute
protected void writeStringAttribute(TagBase tag,
String attr,
String value)
readStringListAttribute
protected String[] readStringListAttribute(TagBase tag,
String attr,
String[] def)
writeStringListAttribute
protected boolean writeStringListAttribute(TagBase tag,
String attr,
String[] value)
generate
public void generate(IndentWriter writer)
generateConfig
protected void generateConfig(IndentWriter writer,
TagBase tag)