Package org.nuxeo.ecm.platform.tag
Interface TagService
- All Known Implementing Classes:
AbstractTagService
,FacetedTagService
public interface TagService
The Tag Service interface. It gathers the entire service API. The available capabilities are:
- list the tags, either related or not to a document
- create tags and taggings
- obtain tag cloud
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canUntag
(CoreSession session, String docId, String label) Returns whether or not the current session can untag tag on provided document.void
copyTags
(CoreSession session, String srcDocId, String dstDocId) Copy all the tags applied to the source document to the destination document.getSuggestions
(CoreSession session, String label) Gets suggestions for a given tag label prefix.getTagDocumentIds
(CoreSession session, String label) Gets the documents to which a tag is applied.getTags
(CoreSession session, String docId) Gets the tags applied to a document.boolean
Defines if tag service is enable.void
removeTags
(CoreSession session, String docId) Removes all the tags applied to a document.void
replaceTags
(CoreSession session, String srcDocId, String dstDocId) Replace all the existing tags applied on the destination document by the ones applied on the source document.boolean
supportsTag
(CoreSession session, String docId) Checks if document support tag.void
tag
(CoreSession session, String docId, String label) Tags a document with a given tag.void
untag
(CoreSession session, String docId, String label) Untags a document of the given tag
-
Field Details
-
ID
- See Also:
-
-
Method Details
-
isEnabled
boolean isEnabled()Defines if tag service is enable.- Returns:
- true if the underlying repository supports the tag feature
-
tag
Tags a document with a given tag.- Parameters:
session
- the sessiondocId
- the document idlabel
- the tag- Since:
- 9.3
-
untag
Untags a document of the given tag- Parameters:
session
- the sessiondocId
- the document idlabel
- the tag, ornull
for all tags
-
canUntag
Returns whether or not the current session can untag tag on provided document.- Parameters:
session
- the sessiondocId
- the document idlabel
- the tag, ornull
for all tags- Returns:
- whether or not the current session can untag provided document
- Since:
- 8.4
-
getTags
Gets the tags applied to a document.- Parameters:
session
- the sessiondocId
- the document id- Returns:
- the list of tags
- Since:
- 9.3
-
removeTags
Removes all the tags applied to a document.- Since:
- 5.7.3
-
copyTags
Copy all the tags applied to the source document to the destination document.The tags are merged.
- Parameters:
srcDocId
- the source document iddstDocId
- the destination document id- Since:
- 5.7.3
-
replaceTags
Replace all the existing tags applied on the destination document by the ones applied on the source document.- Parameters:
srcDocId
- the source document iddstDocId
- the destination document id- Since:
- 5.7.3
-
getTagDocumentIds
Gets the documents to which a tag is applied.- Parameters:
session
- the sessionlabel
- the tag- Returns:
- the set of document ids
- Since:
- 9.3
-
getSuggestions
Gets suggestions for a given tag label prefix.- Parameters:
session
- the sessionlabel
- the tag label prefix- Returns:
- a list of tags
- Since:
- 9.3
-
supportsTag
Checks if document support tag.- Since:
- 9.3
-