Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.community
Interface TagSet

All Superinterfaces:
ContentRetrieval, JiveObject

public interface TagSet
extends JiveObject, ContentRetrieval

A TagSet is a named collection of ContentTags used to build filtered content views. TagSets are the secondary organizational construct in the product after Community. Unlike Communities they are not heirarchical in nature, but rather just organize content within a Community into buckets based on ContentTag association. Also unlike communities, they do not directly contain content objects, and do not have permissions associated with content generation or editing.

See Also:
ContentTag, TagSet, Community

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jivesoftware.community.ContentRetrieval
ContentRetrieval.ContentType
 
Field Summary
 
Fields inherited from interface com.jivesoftware.community.ContentRetrieval
ALL_TYPES
 
Method Summary
 void addTag(ContentTag tag)
          Adds the supplied ContentTag to this TagSet.
 boolean contains(ContentTag tag)
          Returns true if this TagSet contains the specified ContentTag.
 Community getCommunity()
          Returns the Community to which this TagSet is bound.
 java.util.Date getCreationDate()
          A convenience method which returns the date the tag set was originally created.
 java.lang.String getDescription()
          Returns the description of this TagSet.
 java.util.Date getModificationDate()
          A convenience method which returns the date the tag set was last modified

When a tag set is first created, the date returned by this method is identical to the creation date.

 java.lang.String getName()
          Returns the name of this TagSet.
 ContentTag getTag(long tagID)
          Gets the tag specified by the tagID in this TagSet
 JiveIterator<ContentTag> getTags()
          Returns an Iterable of ContentTags which define the view this TagSet represents.
 void removeTag(ContentTag tag)
          Removes the supplied ContentTag from this TagSet if it is a member.
 void save()
          Saves any changes made to this TagSet to the underlying data store
 void setDescription(java.lang.String description)
          Sets the description of this TagSet.
 void setName(java.lang.String name)
          Sets the name of this TagSet.
 void setTags(java.util.Collection<ContentTag> tags)
          Sets all the tags associated with this TagSet.
 void setTagsFromTagNames(java.util.Collection<java.lang.String> tagNames)
          Sets all the tags associated with this TagSet using the supplied tag names.
 
Methods inherited from interface com.jivesoftware.community.JiveObject
getID, getObjectType
 
Methods inherited from interface com.jivesoftware.community.ContentRetrieval
getBlogPostCount, getBlogPostCount, getBlogPosts, getBlogPosts, getCombinedContent, getCombinedContent, getCombinedContentCount, getCombinedContentCount, getDocumentCount, getDocumentCount, getDocuments, getDocuments, getMessageCount, getMessageCount, getMessages, getMessages, getThreadCount, getThreadCount, getThreads, getThreads
 

Method Detail

getName

java.lang.String getName()
Returns the name of this TagSet.

Returns:
the name of this TagSet.

setName

void setName(java.lang.String name)
Sets the name of this TagSet.

Parameters:
name - the name of this TagSet.

getDescription

java.lang.String getDescription()
Returns the description of this TagSet.

Returns:
the description of this TagSet.

setDescription

void setDescription(java.lang.String description)
Sets the description of this TagSet.

Parameters:
description - the description of this TagSet.

getCreationDate

java.util.Date getCreationDate()
A convenience method which returns the date the tag set was originally created.

Returns:
the date the tag set was originally created.

getModificationDate

java.util.Date getModificationDate()
A convenience method which returns the date the tag set was last modified

When a tag set is first created, the date returned by this method is identical to the creation date.

Returns:
the date the tag set was last modified.

getCommunity

Community getCommunity()
Returns the Community to which this TagSet is bound.

Returns:
the Community to which this TagSet is bound.

getTags

JiveIterator<ContentTag> getTags()
Returns an Iterable of ContentTags which define the view this TagSet represents.

Returns:
an Iterable of ContentTags which define the view this TagSet represents.

addTag

void addTag(ContentTag tag)
Adds the supplied ContentTag to this TagSet.

Parameters:
tag - the ContentTag to add.

getTag

ContentTag getTag(long tagID)
                  throws com.jivesoftware.community.TagObjectNotFoundException
Gets the tag specified by the tagID in this TagSet

Parameters:
tagID - the ID of the tag to load
Returns:
the tag specified by the tagID in this TagSet
Throws:
TagObjectNotFoundException - if the tag could not be found in this tag set

removeTag

void removeTag(ContentTag tag)
Removes the supplied ContentTag from this TagSet if it is a member.

Parameters:
tag - the ContentTag to remove.

setTagsFromTagNames

void setTagsFromTagNames(java.util.Collection<java.lang.String> tagNames)
Sets all the tags associated with this TagSet using the supplied tag names. Any tag names which are do not corresponding to existing ContentTags will cause new tags to be created. The existing tag associations will be cleared and replaced by the resultant tags.

Parameters:
tagNames - the names of the ContentTags to associate with this TagSet.

setTags

void setTags(java.util.Collection<ContentTag> tags)
Sets all the tags associated with this TagSet. The existing tag associations will be cleared and replaced by the supplied ContentTags.

Parameters:
tags - the ContentTags to associated with this TagSet.

contains

boolean contains(ContentTag tag)
Returns true if this TagSet contains the specified ContentTag.

Parameters:
tag - the ContentTag to test for set membership.
Returns:
true if this TagSet contains the specified ContentTag.

save

void save()
Saves any changes made to this TagSet to the underlying data store


Clearspace Project Page

Copyright © 1999-2007 Jive Software.