public void deleteTag(Tag tag) {
   log.info("Deleting tag " + tag.getName());
   handTaggingService.clearTaggingsForTag(tag);
   if (tag.getParent() != null) {
     tag.getParent().getChildren().remove(tag);
   }
   tagDAO.deleteTag(tag);
 }
Esempio n. 2
0
  @Test
  public void rssDescriptionForTagShouldBeSetFromTagDescriptionTextIfAvailable() throws Exception {
    RssUrlBuilder rssUrlBuilder = new RssUrlBuilder(siteInformation);

    Mockito.when(tag.getDescription()).thenReturn("This is a tag about something...");

    assertEquals(tag.getDescription(), rssUrlBuilder.getRssDescriptionForTag(tag));
  }
 public void updateTagParent(Tag editTag, Tag parentTag) {
   log.debug("Setting parent tag to: " + parentTag.getName());
   editTag.setParent(parentTag);
   // TODO should now reindex all resources effected by this.
 }