Package org.nuxeo.ecm.platform.tag
Class BridgeTagService
- java.lang.Object
-
- org.nuxeo.ecm.platform.tag.AbstractTagService
-
- org.nuxeo.ecm.platform.tag.BridgeTagService
-
- All Implemented Interfaces:
TagService
public class BridgeTagService extends AbstractTagService
Tag Service delegating to two different backends, for use during migration.- Since:
- 9.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.platform.tag.AbstractTagService
AbstractTagService.PAGE_PROVIDERS
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.platform.tag.TagService
TagService.Feature
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractTagService
first
protected AbstractTagService
second
-
Fields inherited from class org.nuxeo.ecm.platform.tag.AbstractTagService
TAG_SANITIZATION_PROP
-
Fields inherited from interface org.nuxeo.ecm.platform.tag.TagService
ID
-
-
Constructor Summary
Constructors Constructor Description BridgeTagService(TagService first, TagService second)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canUntag(CoreSession session, String docId, String label)
Returns whether or not the current session can untag tag on provided document.void
doCopyTags(CoreSession session, String srcDocId, String dstDocId, boolean removeExistingTags)
List<String>
doGetTagDocumentIds(CoreSession session, String label)
Set<String>
doGetTags(CoreSession session, String docId)
Set<String>
doGetTagSuggestions(CoreSession session, String label)
void
doTag(CoreSession session, String docId, String label, String username)
void
doUntag(CoreSession session, String docId, String label)
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).boolean
hasFeature(TagService.Feature feature)
Checks if a feature is available.boolean
supportsTag(CoreSession session, String docId)
Checks if document support tag.-
Methods inherited from class org.nuxeo.ecm.platform.tag.AbstractTagService
cleanLabel, cleanUsername, copyTags, copyTags, fireUpdateEvent, getDocumentTags, getDocumentTags, getItems, getSuggestions, getSuggestions, getTagDocumentIds, getTagDocumentIds, getTags, isEnabled, isTagSanitizationEnabled, removeTags, replaceTags, tag, tag, untag, untag
-
-
-
-
Field Detail
-
first
protected final AbstractTagService first
-
second
protected final AbstractTagService second
-
-
Constructor Detail
-
BridgeTagService
public BridgeTagService(TagService first, TagService second)
-
-
Method Detail
-
hasFeature
public boolean hasFeature(TagService.Feature feature)
Description copied from interface:TagService
Checks if a feature is available.
-
supportsTag
public boolean supportsTag(CoreSession session, String docId)
Description copied from interface:TagService
Checks if document support tag.
-
getTagCloud
public List<Tag> getTagCloud(CoreSession session, String docId, String username, Boolean normalize)
Description copied from interface:TagService
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 sessiondocId
- the document id under which to look, ornull
for all documentsusername
- the user name, ornull
for all usersnormalize
- 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)
-
doTag
public void doTag(CoreSession session, String docId, String label, String username)
- Specified by:
doTag
in classAbstractTagService
-
canUntag
public boolean canUntag(CoreSession session, String docId, String label)
Description copied from interface:TagService
Returns whether or not the current session can untag tag on provided document.- Specified by:
canUntag
in interfaceTagService
- Overrides:
canUntag
in classAbstractTagService
- Parameters:
session
- the sessiondocId
- the document idlabel
- the tag, ornull
for all tags- Returns:
- whether or not the current session can untag provided document
-
doUntag
public void doUntag(CoreSession session, String docId, String label)
- Specified by:
doUntag
in classAbstractTagService
-
doGetTags
public Set<String> doGetTags(CoreSession session, String docId)
- Specified by:
doGetTags
in classAbstractTagService
-
doCopyTags
public void doCopyTags(CoreSession session, String srcDocId, String dstDocId, boolean removeExistingTags)
- Specified by:
doCopyTags
in classAbstractTagService
-
doGetTagDocumentIds
public List<String> doGetTagDocumentIds(CoreSession session, String label)
- Specified by:
doGetTagDocumentIds
in classAbstractTagService
-
doGetTagSuggestions
public Set<String> doGetTagSuggestions(CoreSession session, String label)
- Specified by:
doGetTagSuggestions
in classAbstractTagService
-
-