com.atlassian.confluence.pages
Class DefaultCommentManager

java.lang.Object
  extended bycom.atlassian.confluence.core.DefaultContentEntityManager
      extended bycom.atlassian.confluence.pages.DefaultCommentManager
All Implemented Interfaces:
CommentManager, ContentEntityManager

public class DefaultCommentManager
extends DefaultContentEntityManager
implements CommentManager

Manager for page comments.

Author:
Armond Avanes (armond555@yahoo.com)

Field Summary
 
Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager
contentEntityObjectDao, eventManager, indexer, linkManager
 
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager
ITERATE_ALL
 
Constructor Summary
DefaultCommentManager()
           
 
Method Summary
 Comment addCommentToPage(AbstractPage page, Comment parent, String content)
           
 Comment getComment(long id)
           
 Iterator getRecentlyUpdatedComments(Space space, int maxResults)
           
protected  void publishCreateEvent(ContentEntityObject obj)
          This method publishes *CreateEventss.
protected  void publishRemoveEvent(ContentEntityObject obj)
          This method publishes *RemoveEvents.
protected  void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
          This method publishes *UpdateEvents.
 void removeCommentFromPage(long id)
           
 void setCommentDao(CommentDao commentDao)
           
 void updateCommentContent(Comment comment, String content)
           
 
Methods inherited from class com.atlassian.confluence.core.DefaultContentEntityManager
getAllCurrentEntities, getById, getEntitiesModifiedSince, getEventManager, getLockedBySpace, getNextVersion, getOtherVersion, getPageDao, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesByType, getRecentlyModifiedEntitiesForUser, getVersionHistorySummaries, refreshContentEntity, removeContentEntity, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, setContentEntityObjectDao, setEventManager, setIndexer, setLabelManager, setLinkManager, updateContentLinkingTo, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.core.ContentEntityManager
getAllCurrentEntities, getById, getEntitiesModifiedSince, getLockedBySpace, getNextVersion, getOtherVersion, getPreviousVersion, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesByType, getRecentlyModifiedEntitiesForUser, getVersionHistorySummaries, refreshContentEntity, removeContentEntity, revertContentEntityBackToVersion, saveContentEntity, saveContentEntity, setEventManager, updateContentLinkingTo, updateOutgoingLinksInContent, updateSingleContentLinkinTo, updateSingleContentLinkinTo
 

Constructor Detail

DefaultCommentManager

public DefaultCommentManager()
Method Detail

setCommentDao

public void setCommentDao(CommentDao commentDao)

getComment

public Comment getComment(long id)
Specified by:
getComment in interface CommentManager

addCommentToPage

public Comment addCommentToPage(AbstractPage page,
                                Comment parent,
                                String content)
Specified by:
addCommentToPage in interface CommentManager

updateCommentContent

public void updateCommentContent(Comment comment,
                                 String content)
Specified by:
updateCommentContent in interface CommentManager

removeCommentFromPage

public void removeCommentFromPage(long id)
Specified by:
removeCommentFromPage in interface CommentManager

getRecentlyUpdatedComments

public Iterator getRecentlyUpdatedComments(Space space,
                                           int maxResults)
Specified by:
getRecentlyUpdatedComments in interface CommentManager

publishCreateEvent

protected void publishCreateEvent(ContentEntityObject obj)
Description copied from class: DefaultContentEntityManager
This method publishes *CreateEventss. Specific content entity object manager that need to publish those events should override this method. Default implmentation doesn't do anything

Overrides:
publishCreateEvent in class DefaultContentEntityManager
Parameters:
obj - the created content entity object

publishRemoveEvent

protected void publishRemoveEvent(ContentEntityObject obj)
Description copied from class: DefaultContentEntityManager
This method publishes *RemoveEvents. Specific content entity object manager that need to publish those events should override this method. Default implmentation doesn't do anything

Overrides:
publishRemoveEvent in class DefaultContentEntityManager
Parameters:
obj - the removed content entity object

publishUpdateEvent

protected void publishUpdateEvent(ContentEntityObject obj,
                                  ContentEntityObject origObj,
                                  SaveContext saveContext)
Description copied from class: DefaultContentEntityManager
This method publishes *UpdateEvents. Specific content entity object manager that need to publish those events should override this method. Default implmentation doesn't do anything

Overrides:
publishUpdateEvent in class DefaultContentEntityManager
Parameters:
obj - the updated content entity object
origObj - the old version of the content entity object, for history purpose
saveContext - the associated SaveContext


Confluence is developed by Atlassian.