Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.tag
Interface TagService

All Known Subinterfaces:
TagServiceLocal, TagServiceRemote
All Known Implementing Classes:
TagServiceBean, TagServiceImpl

public interface TagService

The Tag Service interface. It gathers the entire service API. The available capabilities are:


Field Summary
static java.lang.String ID
           
 
Method Summary
 java.util.List<Tag> getDocumentTags(CoreSession session, java.lang.String docId, java.lang.String username)
          Gets the tags applied to a document by a given user, or by all users.
 java.util.List<Tag> getSuggestions(CoreSession session, java.lang.String label, java.lang.String username)
          Gets suggestions for a given tag label prefix.
 java.util.List<Tag> getTagCloud(CoreSession session, java.lang.String docId, java.lang.String username, java.lang.Boolean normalize)
          Gets the tag cloud for a set of documents (tags with weight corresponding to their popularity).
 java.util.List<java.lang.String> getTagDocumentIds(CoreSession session, java.lang.String label, java.lang.String username)
          Gets the documents to which a tag is applied.
 boolean isEnabled()
          Defines if tag service is enable.
 void tag(CoreSession session, java.lang.String docId, java.lang.String label, java.lang.String username)
          Tags a document with a given tag.
 void untag(CoreSession session, java.lang.String docId, java.lang.String label, java.lang.String username)
          Untags a document of the given tag
 

Field Detail

ID

static final java.lang.String ID
See Also:
Constant Field Values
Method Detail

isEnabled

boolean isEnabled()
                  throws ClientException
Defines if tag service is enable.

Returns:
true if the underlying repository supports the tag feature
Throws:
ClientException

tag

void tag(CoreSession session,
         java.lang.String docId,
         java.lang.String label,
         java.lang.String username)
         throws ClientException
Tags a document with a given tag.

Parameters:
session - the session
docId - the document id
label - the tag
username - the user associated to the tagging
Throws:
ClientException

untag

void untag(CoreSession session,
           java.lang.String docId,
           java.lang.String label,
           java.lang.String username)
           throws ClientException
Untags a document of the given tag

Parameters:
session - the session
docId - the document id
label - the tag, or null for all tags
username - the user associated to the tagging
Throws:
ClientException

getDocumentTags

java.util.List<Tag> getDocumentTags(CoreSession session,
                                    java.lang.String docId,
                                    java.lang.String username)
                                    throws ClientException
Gets the tags applied to a document by a given user, or by all users.

Parameters:
session - the session
docId - the document id
username - the user name, or null for all users
Returns:
the list of tags
Throws:
ClientException

getTagDocumentIds

java.util.List<java.lang.String> getTagDocumentIds(CoreSession session,
                                                   java.lang.String label,
                                                   java.lang.String username)
                                                   throws ClientException
Gets the documents to which a tag is applied.

Parameters:
session - the session
label - the tag
username - the user name, or null for all users
Returns:
the set of document ids
Throws:
ClientException

getTagCloud

java.util.List<Tag> getTagCloud(CoreSession session,
                                java.lang.String docId,
                                java.lang.String username,
                                java.lang.Boolean normalize)
                                throws ClientException
Gets the tag cloud for a set of documents (tags with weight corresponding to their popularity).

If a docId is passed, only documents under it are considered, otherwise all documents in the database are used.

The cloud is returned unsorted.

Parameters:
session - the session
docId - the document id under which to look, or null for all documents
username - the user name, or null for all users
normalize - null for no weight normalization (a count is returned), FALSE for 0-100 normalization, TRUE for logarithmic 0-100 normalization
Returns:
the cloud (a list of weighted tags)
Throws:
ClientException

getSuggestions

java.util.List<Tag> getSuggestions(CoreSession session,
                                   java.lang.String label,
                                   java.lang.String username)
                                   throws ClientException
Gets suggestions for a given tag label prefix.

Parameters:
session - the session
label - the tag label prefix
username - the user name, or null for all users
Returns:
a list of tags
Throws:
ClientException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.