Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Interface TagManager

All Superinterfaces:
JiveManager

public interface TagManager
extends JiveManager

Provides a manager to create, retrieve and delete tags.


Method Summary
 void addCommunityTag(ContentTag tag, JiveObject jiveObject, User user)
          Adds a community tag to a JiveObject on behalf of the given user.
 void addTag(ContentTag tag, JiveObject jiveObject)
          Associates a tag with this object
 ContentTag createTag(String tagname)
          Creates a tag in the database.
 TagCloud getCommunityTagCloud(JiveObject jiveObject)
          Returns the tag map for the given object.
 int getCommunityTagCountByUser(JiveObject jiveObject, User user)
          Returns the number of community tags a particular user has on a given piece of content.
 Set<CommunityTaggableType> getCommunityTaggableTypes()
          Returns the set of all types which can be community tagged.
 JiveIterator<ContentTag> getCommunityTags(JiveObject jiveObject, User user)
          Return an Iterable for all the tags associated with this jive object on behalf of the given user.
 int getContentCount(TagSet tagSet, TaggableType type, JiveContainer container)
          Returns the number of contents of type type that has any of tags of the tag set and belongs to container.
 ContentTag getTag(long tagID)
          Returns a tag given a tag ID.
 ContentTag getTag(String tagname)
          Returns a tag by tag name.
 List<ContentTagCloudBean> getTagCloud(Map<String,Integer> popularTags)
          Returns a list of com.jivesoftware.community.ContentTagCloudBean objects corresponding to the provided parameters
 List<ContentTagCloudBean> getTagCloud(Map<String,Integer> popularTags, int numOfBuckets, int sort)
          Returns a list of com.jivesoftware.community.ContentTagCloudBean objects corresponding to the provided parameters
 int getTagCount(JiveObject jiveObject)
          Return a count of all the tags associated with this jive object.
 JiveIterator<JiveObject> getTaggableContent(JiveContainer container)
          Returns an iterator of taggable jive objects for the specific container.
 JiveIterator<JiveObject> getTaggableContent(JiveContainer container, ResultFilter resultFilter, Collection<GenericTaggableType> types)
          Returns an iterator of taggable jive objects for the specific container.
 int getTaggableContentCount(JiveContainer container)
          Returns a count of taggable jive objects for the specific container.
 int getTaggableContentCount(JiveContainer container, ResultFilter resultFilter, Collection<GenericTaggableType> types)
          Returns a cout of taggable jive objects for the specific container.
 GenericTaggableType getTaggableType(int objectType)
          Returns the taggable type singleton of the specified object type.
 List<GenericTaggableType> getTaggableTypes()
          Returns a list of taggables types that are available for current license.
 Map<String,Integer> getTagMap(JiveContainer container)
          Returns all tags for a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container.
 Map<String,Integer> getTagMap(JiveContainer container, TagResultFilter resultFilter)
          Returns all tags for a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container filtered by the TagResultFilter.
 Map<String,Integer> getTagMap(JiveContainer container, TagResultFilter resultFilter, List<GenericTaggableType> types)
          Returns all tags for a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container filtered by the TagResultFilter.
 JiveIterator<ContentTag> getTags(JiveObject jiveObject)
          Return an Iterable for all the tags associated with this jive object.
 String getTagsAsString(JiveObject jiveObject)
          Return a String for all the tags associated with this jive object.
 TagCloud getUserCommunityTagCloud(User user)
          Returns the tag cloud of community tags used by the given user.
 void removeAllTags(JiveObject jiveObject)
          Disassociates this object with all tags.
 void removeCommunityTags(EntityDescriptor user, EntityDescriptor object)
          Removes all community tags the given user has associated with the given JiveObject.
 void removeCommunityTags(User user, JiveObject object)
          Removes all community tags the given user has associated with the given JiveObject.
 void removeTag(ContentTag tag, JiveObject jiveObject)
          Disassociates this object with the given tag.
 void setCommunityTags(Set<String> tags, JiveObject jiveObject, User user)
          Tags the specified object on behalf of the given user.
 void setTags(Set<String> tags, JiveObject jiveObject)
          Sets tags for the specified jive object.
 void setTags(String tags, JiveObject jiveObject)
          Deprecated. use setTags(java.util.Set, JiveObject)
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Method Detail

createTag

ContentTag createTag(String tagname)
Creates a tag in the database.

Parameters:
tagname - the name of the tag to create.
Returns:
the newly created tag.
Throws:
com.jivesoftware.community.validation.InvalidPropertyException - if the provided tag name is not valid.

getTag

ContentTag getTag(String tagname)
                  throws TagObjectNotFoundException
Returns a tag by tag name.

Parameters:
tagname - the name of the tag to lookup.
Returns:
the tag corresponding to the supplied name
Throws:
TagObjectNotFoundException - if no tag exists with that name.

getTag

ContentTag getTag(long tagID)
                  throws TagObjectNotFoundException
Returns a tag given a tag ID.

Parameters:
tagID - the id of the tag to retrieve
Returns:
the tag corresponding to the supplied id
Throws:
TagObjectNotFoundException - if no tag exists with that ID.

addTag

void addTag(ContentTag tag,
            JiveObject jiveObject)
            throws UnauthorizedException
Associates a tag with this object

Parameters:
tag - the tag to associate with the object
jiveObject - the object to associate the tag with
Throws:
UnauthorizedException - if does not have permission to the tag

addCommunityTag

void addCommunityTag(ContentTag tag,
                     JiveObject jiveObject,
                     User user)
Adds a community tag to a JiveObject on behalf of the given user. A community tag is related to the given user and multiple users can add the same tag to a piece of content.

Parameters:
tag - the tag being added.
jiveObject - the object that is being tagged.
user - the user, on whose behalf, the tag is being added.
Since:
Jive SBS 3.0

setTags

void setTags(String tags,
             JiveObject jiveObject)
Deprecated. use setTags(java.util.Set, JiveObject)

Sets tags for the specified jive object. If tags do not already exist, they will be created, and if tags exist that are not specified in the string, they will be removed.

Parameters:
tags - the tag to associate with the object
jiveObject - the object to associate the tag with
Throws:
UnauthorizedException - if does not have permission to the tag

setTags

void setTags(Set<String> tags,
             JiveObject jiveObject)
Sets tags for the specified jive object. If tags do not already exist, they will be created, and if tags exist that are not specified in the given set, they will be removed.

Parameters:
tags - the tag to associate with the object
jiveObject - the object to associate the tag with
Throws:
UnauthorizedException - if does not have permission to the tag
com.jivesoftware.community.validation.InvalidPropertyException - if any of the provided tags are invalid.
Since:
Jive SBS 3.0

setCommunityTags

void setCommunityTags(Set<String> tags,
                      JiveObject jiveObject,
                      User user)
Tags the specified object on behalf of the given user. If tags do not already exist they will be added to the object and if the the object is tagged with anything not provided in the given set, the tags will be removed.

Parameters:
tags - the tags which will be associated with the given object.
jiveObject - the object which is being tagged.
user - the user, on whose behalf, the tag is being added.
Since:
Jive SBS 3.0

getTags

JiveIterator<ContentTag> getTags(JiveObject jiveObject)
Return an Iterable for all the tags associated with this jive object.

Parameters:
jiveObject - the object to return associated tags for
Returns:
an Iterable for all tags associated with this jive object.

getCommunityTags

JiveIterator<ContentTag> getCommunityTags(JiveObject jiveObject,
                                          User user)
Return an Iterable for all the tags associated with this jive object on behalf of the given user.

Parameters:
jiveObject - the object to return associated tags for
user - the user, on whose behalf, the tag is being retrieved.
Returns:
an Iterable for all tags associated with this jive object.

getTagsAsString

String getTagsAsString(JiveObject jiveObject)
Return a String for all the tags associated with this jive object.

Parameters:
jiveObject - the object to return associated tags for
Returns:
a String for all the tags associated with this jive object.

getTagCount

int getTagCount(JiveObject jiveObject)
Return a count of all the tags associated with this jive object.

Parameters:
jiveObject - the object to return associated tags for
Returns:
an count of all tags associated with this jive object.

getCommunityTagCountByUser

int getCommunityTagCountByUser(JiveObject jiveObject,
                               User user)
Returns the number of community tags a particular user has on a given piece of content.

Parameters:
jiveObject - the object for which the tags are being returned
user - the user whose community tags are being returned.
Returns:
the number of community tags the given user has on the given object.

getTagMap

Map<String,Integer> getTagMap(JiveContainer container)
Returns all tags for a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container.

Parameters:
container - the container to return associated tags for
Returns:
all tags in a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container

getTagMap

Map<String,Integer> getTagMap(JiveContainer container,
                              TagResultFilter resultFilter)
Returns all tags for a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container filtered by the TagResultFilter.

Parameters:
container - the container to return associated tags for
resultFilter - the filter to use to restrict tag results
Returns:
all tags in a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container filtered by the TagResultFilter

getTagMap

Map<String,Integer> getTagMap(JiveContainer container,
                              TagResultFilter resultFilter,
                              List<GenericTaggableType> types)
Returns all tags for a given container in a Map where the key is the name of tag and the value is the number of times the tag has been used in this container filtered by the TagResultFilter.

Parameters:
container - the container to return associated tags for
resultFilter - the filter to use to restrict tag results
types - the content types to use to restrict tag results
Returns:
all tags for a given jive object in a Map where the key is the name of tag and the value is the number of times the tag has been used in this jive object filtered by the TagResultFilter.

getCommunityTagCloud

TagCloud getCommunityTagCloud(JiveObject jiveObject)
Returns the tag map for the given object. The tag map is composed of the key, the tag, and the value the number of times the given object has been tagged.

Parameters:
jiveObject - the object which is having its tag map returned.
Returns:
the tag map for the given object
Since:
Jive SBS 3.0

getUserCommunityTagCloud

TagCloud getUserCommunityTagCloud(User user)
Returns the tag cloud of community tags used by the given user.

Parameters:
user - the user whose tag cloud is to be returned.
Returns:
the tag cloud of community tags used by the given user.
Since:
Jive SBS 3.0

getTaggableContentCount

int getTaggableContentCount(JiveContainer container)
Returns a count of taggable jive objects for the specific container.

Parameters:
container - the specified container to get taggable jive objects
Returns:
a count of taggable jive objects for the specified container

getTaggableContentCount

int getTaggableContentCount(JiveContainer container,
                            ResultFilter resultFilter,
                            Collection<GenericTaggableType> types)
Returns a cout of taggable jive objects for the specific container.

Parameters:
container - the specified container to get taggable jive objects
resultFilter - the result filter to set various options such as sorting, filtering
types - the types for which the count is being returned
Returns:
a count of taggable jive objects for the specified container

getTaggableContent

JiveIterator<JiveObject> getTaggableContent(JiveContainer container)
Returns an iterator of taggable jive objects for the specific container.

Parameters:
container - the specified container to get taggable jive objects
Returns:
an iterator of taggable jive objects for the specified container

getTaggableContent

JiveIterator<JiveObject> getTaggableContent(JiveContainer container,
                                            ResultFilter resultFilter,
                                            Collection<GenericTaggableType> types)
Returns an iterator of taggable jive objects for the specific container.

Parameters:
container - the specified container to get taggable jive objects
resultFilter - the result filter to set various options such as sorting, filtering
types - the types for which the objects are being returned.
Returns:
an iterator of taggable jive objects for the specified container

removeTag

void removeTag(ContentTag tag,
               JiveObject jiveObject)
               throws UnauthorizedException
Disassociates this object with the given tag.

Parameters:
tag - the tag to remove from this object
jiveObject - the object to remove the tag association for
Throws:
UnauthorizedException - if does not have permission to remove tag.

removeAllTags

void removeAllTags(JiveObject jiveObject)
                   throws UnauthorizedException
Disassociates this object with all tags.

Parameters:
jiveObject - the object to disassociate all tags from
Throws:
UnauthorizedException - if user does not have administrator permissions.

removeCommunityTags

void removeCommunityTags(User user,
                         JiveObject object)
                         throws UnauthorizedException
Removes all community tags the given user has associated with the given JiveObject.

Parameters:
user - the user whose tags are being removed.
object - the object which is having the community tags removed.
Throws:
UnauthorizedException - if the currently authenticated user does not have permission to remove community tags for the given user.

removeCommunityTags

void removeCommunityTags(EntityDescriptor user,
                         EntityDescriptor object)
Removes all community tags the given user has associated with the given JiveObject.

Parameters:
user - the user whose tags are being removed.
object - the object which is having the community tags removed.
Throws:
UnauthorizedException - if the currently authenticated user does not have permission to remove community tags for the given user.

getTagCloud

List<ContentTagCloudBean> getTagCloud(Map<String,Integer> popularTags)
Returns a list of com.jivesoftware.community.ContentTagCloudBean objects corresponding to the provided parameters

Parameters:
popularTags - a map of popular tags
Returns:
a list of com.jivesoftware.community.ContentTagCloudBean objects corresponding to the provided parameters

getTagCloud

List<ContentTagCloudBean> getTagCloud(Map<String,Integer> popularTags,
                                      int numOfBuckets,
                                      int sort)
Returns a list of com.jivesoftware.community.ContentTagCloudBean objects corresponding to the provided parameters

Parameters:
popularTags - a map of popular tags
numOfBuckets - the number of buckets to sort the tags into
sort - one of ContentTag.SORT_TAGNAME or ContentTag.SORT_TAGCOUNT
Returns:
a list of com.jivesoftware.community.ContentTagCloudBean objects corresponding to the provided parameters

getTaggableTypes

List<GenericTaggableType> getTaggableTypes()
Returns a list of taggables types that are available for current license.

Returns:
a list of taggables types that are available for current license.

getTaggableType

GenericTaggableType getTaggableType(int objectType)
Returns the taggable type singleton of the specified object type. If the object type is no taggable then it throws an IllegalArgumentException.

Parameters:
objectType - the object type to return the taggable type from.
Returns:
the taggable type singleton of the objectType.
Throws:
IllegalArgumentException - it objectType is not taggable.

getCommunityTaggableTypes

Set<CommunityTaggableType> getCommunityTaggableTypes()
Returns the set of all types which can be community tagged.

Returns:
the set of all types which can be community tagged.

getContentCount

int getContentCount(TagSet tagSet,
                    TaggableType type,
                    JiveContainer container)
Returns the number of contents of type type that has any of tags of the tag set and belongs to container.

Parameters:
tagSet -
type -
container -
Returns:

Jive Product Page

Copyright © 1999-2007 Jive Software.