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

java.lang.Object
  extended by com.aelitis.azureus.core.tag.impl.TagManagerImpl
All Implemented Interfaces:
TagManager, AEDiagnosticsEvidenceGenerator, DownloadCompletionListener

public class TagManagerImpl
extends Object
implements TagManager, DownloadCompletionListener, AEDiagnosticsEvidenceGenerator


Method Summary
 void addTagFeatureListener(int features, TagFeatureListener listener)
           
 void addTaggableLifecycleListener(long taggable_type, TaggableLifecycleListener listener)
           
 void addTagManagerListener(TagManagerListener listener, boolean fire_for_existing)
           
 void addTagType(TagTypeBase tag_type)
           
protected  void checkRSSFeeds(TagBase tag, boolean enable)
           
protected  Object evalScript(Tag tag, String script, DownloadManager dm, String intent_key)
           
protected  void featureChanged(Tag tag, int feature)
           
 void generate(IndentWriter writer)
           
 void generate(IndentWriter writer, TagTypeBase tag_type)
           
 void generate(IndentWriter writer, TagTypeBase tag_type, TagBase tag)
           
static TagManagerImpl getSingleton()
           
 boolean getTagPublicDefault()
           
 List<Tag> getTagsForTaggable(int tts, Taggable taggable)
           
 List<Tag> getTagsForTaggable(Taggable taggable)
           
 TagType getTagType(int tag_type)
           
 List<TagType> getTagTypes()
           
 boolean isEnabled()
           
 Tag lookupTagByUID(long tag_uid)
           
 void onCompletion(Download d)
          Called when a download enters a complete state (previously being incomplete).
protected  Boolean readBooleanAttribute(TagTypeBase tag_type, TagBase tag, String attr, Boolean def)
           
protected  Long readLongAttribute(TagTypeBase tag_type, TagBase tag, String attr, Long def)
           
protected  String readStringAttribute(TagTypeBase tag_type, TagBase tag, String attr, String def)
           
protected  String[] readStringListAttribute(TagTypeBase tag_type, TagBase tag, String attr, String[] def)
           
 TaggableLifecycleHandler registerTaggableResolver(TaggableResolver resolver)
           
protected  void removeConfig(Tag tag)
           
protected  void removeConfig(TagType tag_type)
           
 void removeTagFeatureListener(TagFeatureListener listener)
           
 void removeTaggableLifecycleListener(long taggable_type, TaggableLifecycleListener listener)
           
 void removeTagManagerListener(TagManagerListener listener)
           
protected  void removeTagType(TagTypeBase tag_type)
           
 void setTagPublicDefault(boolean pub)
           
protected  void tagChanged(TagWithState tag)
           
protected  void tagContentsChanged(TagWithState tag)
           
protected  void tagCreated(TagWithState tag)
           
 void taggableAdded(TagType tag_type, Tag tag, Taggable tagged)
           
 void taggableRemoved(TagType tag_type, Tag tag, Taggable tagged)
           
protected  void tagRemoved(TagWithState tag)
           
protected  boolean writeBooleanAttribute(TagTypeBase tag_type, TagBase tag, String attr, Boolean value)
           
protected  boolean writeLongAttribute(TagTypeBase tag_type, TagBase tag, String attr, Long value)
           
protected  void writeStringAttribute(TagTypeBase tag_type, TagBase tag, String attr, String value)
           
protected  boolean writeStringListAttribute(TagTypeBase tag_type, TagBase tag, String attr, String[] value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static TagManagerImpl getSingleton()

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface TagManager

onCompletion

public void onCompletion(Download d)
Description copied from interface: DownloadCompletionListener
Called when a download enters a complete state (previously being incomplete).

Specified by:
onCompletion in interface DownloadCompletionListener
Parameters:
d - Download which has been completed.

evalScript

protected Object evalScript(Tag tag,
                            String script,
                            DownloadManager dm,
                            String intent_key)

addTagType

public void addTagType(TagTypeBase tag_type)

getTagType

public TagType getTagType(int tag_type)
Specified by:
getTagType in interface TagManager

removeTagType

protected void removeTagType(TagTypeBase tag_type)

getTagTypes

public List<TagType> getTagTypes()
Specified by:
getTagTypes in interface TagManager

taggableAdded

public void taggableAdded(TagType tag_type,
                          Tag tag,
                          Taggable tagged)

taggableRemoved

public void taggableRemoved(TagType tag_type,
                            Tag tag,
                            Taggable tagged)

getTagsForTaggable

public List<Tag> getTagsForTaggable(Taggable taggable)
Specified by:
getTagsForTaggable in interface TagManager

getTagsForTaggable

public List<Tag> getTagsForTaggable(int tts,
                                    Taggable taggable)
Specified by:
getTagsForTaggable in interface TagManager

lookupTagByUID

public Tag lookupTagByUID(long tag_uid)
Specified by:
lookupTagByUID in interface TagManager

registerTaggableResolver

public TaggableLifecycleHandler registerTaggableResolver(TaggableResolver resolver)
Specified by:
registerTaggableResolver in interface TagManager

setTagPublicDefault

public void setTagPublicDefault(boolean pub)
Specified by:
setTagPublicDefault in interface TagManager

getTagPublicDefault

public boolean getTagPublicDefault()
Specified by:
getTagPublicDefault in interface TagManager

checkRSSFeeds

protected void checkRSSFeeds(TagBase tag,
                             boolean enable)

addTagManagerListener

public void addTagManagerListener(TagManagerListener listener,
                                  boolean fire_for_existing)
Specified by:
addTagManagerListener in interface TagManager

removeTagManagerListener

public void removeTagManagerListener(TagManagerListener listener)
Specified by:
removeTagManagerListener in interface TagManager

addTagFeatureListener

public void addTagFeatureListener(int features,
                                  TagFeatureListener listener)
Specified by:
addTagFeatureListener in interface TagManager

removeTagFeatureListener

public void removeTagFeatureListener(TagFeatureListener listener)
Specified by:
removeTagFeatureListener in interface TagManager

featureChanged

protected void featureChanged(Tag tag,
                              int feature)

addTaggableLifecycleListener

public void addTaggableLifecycleListener(long taggable_type,
                                         TaggableLifecycleListener listener)
Specified by:
addTaggableLifecycleListener in interface TagManager

removeTaggableLifecycleListener

public void removeTaggableLifecycleListener(long taggable_type,
                                            TaggableLifecycleListener listener)
Specified by:
removeTaggableLifecycleListener in interface TagManager

tagCreated

protected void tagCreated(TagWithState tag)

tagChanged

protected void tagChanged(TagWithState tag)

tagRemoved

protected void tagRemoved(TagWithState tag)

tagContentsChanged

protected void tagContentsChanged(TagWithState tag)

readBooleanAttribute

protected Boolean readBooleanAttribute(TagTypeBase tag_type,
                                       TagBase tag,
                                       String attr,
                                       Boolean def)

writeBooleanAttribute

protected boolean writeBooleanAttribute(TagTypeBase tag_type,
                                        TagBase tag,
                                        String attr,
                                        Boolean value)

readLongAttribute

protected Long readLongAttribute(TagTypeBase tag_type,
                                 TagBase tag,
                                 String attr,
                                 Long def)

writeLongAttribute

protected boolean writeLongAttribute(TagTypeBase tag_type,
                                     TagBase tag,
                                     String attr,
                                     Long value)

readStringAttribute

protected String readStringAttribute(TagTypeBase tag_type,
                                     TagBase tag,
                                     String attr,
                                     String def)

writeStringAttribute

protected void writeStringAttribute(TagTypeBase tag_type,
                                    TagBase tag,
                                    String attr,
                                    String value)

readStringListAttribute

protected String[] readStringListAttribute(TagTypeBase tag_type,
                                           TagBase tag,
                                           String attr,
                                           String[] def)

writeStringListAttribute

protected boolean writeStringListAttribute(TagTypeBase tag_type,
                                           TagBase tag,
                                           String attr,
                                           String[] value)

removeConfig

protected void removeConfig(TagType tag_type)

removeConfig

protected void removeConfig(Tag tag)

generate

public void generate(IndentWriter writer)
Specified by:
generate in interface AEDiagnosticsEvidenceGenerator

generate

public void generate(IndentWriter writer,
                     TagTypeBase tag_type)

generate

public void generate(IndentWriter writer,
                     TagTypeBase tag_type,
                     TagBase tag)