@Test public void testRemoveTags() { DocumentModel file = session.createDocumentModel("/", "foo", "File"); file.setPropertyValue("dc:title", "File1"); file = session.createDocument(file); session.save(); String fileId = file.getId(); tagService.tag(session, fileId, "foo"); tagService.tag(session, fileId, "bar"); assertEquals(2, tagService.getTags(session, fileId).size()); tagService.removeTags(session, fileId); assertEquals(0, tagService.getTags(session, fileId).size()); }
@Override public void removeTags(CoreSession session, String docId) { untag(session, docId, null); }
AbstractTagService implements TagService { @Override public void removeTags(CoreSession session, String docId) { untag(session, docId, null); } }
AbstractTagService implements TagService { @Override public void removeTags(CoreSession session, String docId) { untag(session, docId, null); }  }
AbstractTagService implements TagService { @Override public void removeTags(CoreSession session, String docId) { untag(session, docId, null); }  @Override boolean isEnabled(); @Override void tag(CoreSession session, String docId, String label); @Override void tag(CoreSession session, String docId, String label, String username); @Override void untag(CoreSession session, String docId, String label); @Override void untag(CoreSession session, String docId, String label, String username); @Override boolean canUntag(CoreSession session, String docId, String label); @Override Set<String> getTags(CoreSession session, String docId); @Override List<Tag> getDocumentTags(CoreSession session, String docId, String username); @Override List<Tag> getDocumentTags(CoreSession session, String docId, String username, boolean useCore); @Override void removeTags(CoreSession session, String docId); @Override void copyTags(CoreSession session, String srcDocId, String dstDocId); @Override void replaceTags(CoreSession session, String srcDocId, String dstDocId); @Override List<String> getTagDocumentIds(CoreSession session, String label); @Override List<String> getTagDocumentIds(CoreSession session, String label, String username); @Override Set<String> getSuggestions(CoreSession session, String label); @Override List<Tag> getSuggestions(CoreSession session, String label, String username); abstract void doTag(CoreSession session, String docId, String label, String username); abstract void doUntag(CoreSession session, String docId, String label); abstract Set<String> doGetTags(CoreSession session, String docId); abstract void doCopyTags(CoreSession session, String srcDocId, String dstDocId, boolean removeExistingTags); abstract List<String> doGetTagDocumentIds(CoreSession session, String label); abstract Set<String> doGetTagSuggestions(CoreSession session, String label); }
AbstractTagService implements TagService { @Override public void removeTags(CoreSession session, String docId) { untag(session, docId, null); }  @Override boolean isEnabled(); @Override void tag(CoreSession session, String docId, String label); @Override void tag(CoreSession session, String docId, String label, String username); @Override void untag(CoreSession session, String docId, String label); @Override void untag(CoreSession session, String docId, String label, String username); @Override boolean canUntag(CoreSession session, String docId, String label); @Override Set<String> getTags(CoreSession session, String docId); @Override List<Tag> getDocumentTags(CoreSession session, String docId, String username); @Override List<Tag> getDocumentTags(CoreSession session, String docId, String username, boolean useCore); @Override void removeTags(CoreSession session, String docId); @Override void copyTags(CoreSession session, String srcDocId, String dstDocId); @Override void replaceTags(CoreSession session, String srcDocId, String dstDocId); @Override List<String> getTagDocumentIds(CoreSession session, String label); @Override List<String> getTagDocumentIds(CoreSession session, String label, String username); @Override Set<String> getSuggestions(CoreSession session, String label); @Override List<Tag> getSuggestions(CoreSession session, String label, String username); abstract void doTag(CoreSession session, String docId, String label, String username); abstract void doUntag(CoreSession session, String docId, String label); abstract Set<String> doGetTags(CoreSession session, String docId); abstract void doCopyTags(CoreSession session, String srcDocId, String dstDocId, boolean removeExistingTags); abstract List<String> doGetTagDocumentIds(CoreSession session, String label); abstract Set<String> doGetTagSuggestions(CoreSession session, String label); static final String TAG_SANITIZATION_PROP; }