public interface TagService
| Modifier and Type | Method and Description |
|---|---|
List<Tag> |
getDocumentTags(CoreSession session,
String docId,
String username)
Gets the tags applied to a document by a given user, or by all users.
|
List<Tag> |
getSuggestions(CoreSession session,
String label,
String username)
Gets suggestions for a given tag label prefix.
|
List<Tag> |
getTagCloud(CoreSession session,
String docId,
String username,
Boolean normalize)
Gets the tag cloud for a set of documents (tags with weight corresponding
to their popularity).
|
List<String> |
getTagDocumentIds(CoreSession session,
String label,
String username)
Gets the documents to which a tag is applied.
|
boolean |
isEnabled()
Defines if tag service is enable.
|
void |
tag(CoreSession session,
String docId,
String label,
String username)
Tags a document with a given tag.
|
void |
untag(CoreSession session,
String docId,
String label,
String username)
Untags a document of the given tag
|
static final String ID
boolean isEnabled()
throws ClientException
ClientExceptionvoid tag(CoreSession session, String docId, String label, String username) throws ClientException
session - the sessiondocId - the document idlabel - the tagusername - the user associated to the taggingClientExceptionvoid untag(CoreSession session, String docId, String label, String username) throws ClientException
session - the sessiondocId - the document idlabel - the tag, or null for all tagsusername - the user associated to the taggingClientExceptionList<Tag> getDocumentTags(CoreSession session, String docId, String username) throws ClientException
session - the sessiondocId - the document idusername - the user name, or null for all usersClientExceptionList<String> getTagDocumentIds(CoreSession session, String label, String username) throws ClientException
session - the sessionlabel - the tagusername - the user name, or null for all usersClientExceptionList<Tag> getTagCloud(CoreSession session, String docId, String username, Boolean normalize) throws ClientException
If a docId is passed, only documents under it are considered, otherwise all documents in the database are used.
The cloud is returned unsorted.
session - the sessiondocId - the document id under which to look, or null for all
documentsusername - the user name, or null for all usersnormalize - null for no weight normalization (a count is returned),
FALSE for 0-100 normalization, TRUE for
logarithmic 0-100 normalizationClientExceptionList<Tag> getSuggestions(CoreSession session, String label, String username) throws ClientException
session - the sessionlabel - the tag label prefixusername - the user name, or null for all usersClientExceptionCopyright © 2012 Nuxeo SA. All Rights Reserved.