public abstract class AbstractCommentManagerActionsBean extends Object implements CommentManagerActions
CHILDREN_COMMENT_LIST
Constructor and Description |
---|
AbstractCommentManagerActionsBean() |
Modifier and Type | Method and Description |
---|---|
String |
addComment()
creates a new comment from
|
DocumentModel |
addComment(DocumentModel comment)
Add the given comment DocumentModel to commentableDoc.
|
DocumentModel |
addComment(DocumentModel comment,
DocumentModel docToComment) |
String |
beginComment() |
String |
cancelComment() |
void |
cleanContextVariable() |
String |
createComment(DocumentModel docToComment)
Same as addComment() method but using the given document instead of currentDocument.
|
String |
deleteComment() |
String |
deleteComment(String commentId) |
void |
destroy() |
void |
documentChanged()
Clean all the bean's context variables.
|
void |
flattenTree(List<ThreadEntry> commentThread,
UIComment uiComment,
int depth)
Visits a list of comment trees and puts them into a list of "ThreadEntry"s.
|
List<Action> |
getActionsForComment() |
List<Action> |
getActionsForComment(String category) |
void |
getChildren(UIComment comment)
Retrieves children for a given comment.
|
List<UIComment> |
getComments(DocumentModel doc) |
List<ThreadEntry> |
getCommentsAsThread(DocumentModel commentedDoc)
Initialize uiComments with given Document if uiComments is null.
|
List<ThreadEntry> |
getCommentsAsThreadOnDoc(DocumentModel doc)
Recursively retrieves all comments of a doc.
|
boolean |
getCommentStarted() |
List<UIComment> |
getLastCommentsByDate(String commentNumber)
Retrieves a given number of comments from currentDocument.
|
List<UIComment> |
getLastCommentsByDate(String commentNumber,
DocumentModel commentedDoc)
Retrieves a given number of comments from the given Document.
|
String |
getNewContent() |
boolean |
getPrincipalIsAdmin() |
String |
getPrincipalName() |
String |
getSavedReplyCommentId() |
boolean |
getShowCreateForm() |
void |
initComments()
Initializes uiComments with Comments of current document.
|
void |
initComments(DocumentModel commentedDoc)
Initializes uiComments with Comments of current document.
|
void |
initialize()
Bean initialization method.
|
void |
setNewContent(String newContent) |
void |
setSavedReplyCommentId(String savedReplyCommentId) |
void |
setShowCreateForm(boolean flag) |
void |
toggleCreateForm(javax.faces.event.ActionEvent event) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCommentsAsThread
@Create public void initialize()
CommentManagerActions
initialize
in interface CommentManagerActions
@Destroy public void destroy()
destroy
in interface CommentManagerActions
public String getPrincipalName()
getPrincipalName
in interface CommentManagerActions
public boolean getPrincipalIsAdmin()
getPrincipalIsAdmin
in interface CommentManagerActions
public DocumentModel addComment(DocumentModel comment, DocumentModel docToComment) throws ClientException
ClientException
public DocumentModel addComment(DocumentModel comment) throws ClientException
CommentManagerActions
addComment
in interface CommentManagerActions
ClientException
public String addComment() throws ClientException
CommentManagerActions
addComment
in interface CommentManagerActions
ClientException
public String createComment(DocumentModel docToComment) throws ClientException
CommentManagerActions
createComment
in interface CommentManagerActions
ClientException
@Observer(value={"documentSelectionChanged","contentRootSelectionChanged","documentChanged"}, create=false) @BypassInterceptors public void documentChanged()
CommentManagerActions
documentChanged
in interface CommentManagerActions
public void initComments() throws ClientException
initComments
in interface CommentManagerActions
ClientException
public void initComments(DocumentModel commentedDoc) throws ClientException
initComments
in interface CommentManagerActions
ClientException
public List<UIComment> getComments(DocumentModel doc) throws ClientException
ClientException
public List<ThreadEntry> getCommentsAsThreadOnDoc(DocumentModel doc) throws ClientException
getCommentsAsThreadOnDoc
in interface CommentManagerActions
ClientException
public List<ThreadEntry> getCommentsAsThread(DocumentModel commentedDoc) throws ClientException
CommentManagerActions
getCommentsAsThread
in interface CommentManagerActions
ClientException
public void flattenTree(List<ThreadEntry> commentThread, UIComment uiComment, int depth)
public String deleteComment(String commentId) throws ClientException
deleteComment
in interface CommentManagerActions
ClientException
public String deleteComment() throws ClientException
deleteComment
in interface CommentManagerActions
ClientException
public String getNewContent()
getNewContent
in interface CommentManagerActions
public void setNewContent(String newContent)
setNewContent
in interface CommentManagerActions
public String beginComment()
beginComment
in interface CommentManagerActions
public String cancelComment()
cancelComment
in interface CommentManagerActions
public boolean getCommentStarted()
getCommentStarted
in interface CommentManagerActions
public void getChildren(UIComment comment)
public List<UIComment> getLastCommentsByDate(String commentNumber, DocumentModel commentedDoc) throws ClientException
CommentManagerActions
getLastCommentsByDate
in interface CommentManagerActions
commentNumber
- the number of comment to fetchClientException
public List<UIComment> getLastCommentsByDate(String commentNumber) throws ClientException
CommentManagerActions
getLastCommentsByDate
in interface CommentManagerActions
commentNumber
- the number of comment to fetchClientException
public String getSavedReplyCommentId()
getSavedReplyCommentId
in interface CommentManagerActions
public void setSavedReplyCommentId(String savedReplyCommentId)
setSavedReplyCommentId
in interface CommentManagerActions
public List<Action> getActionsForComment()
getActionsForComment
in interface CommentManagerActions
public List<Action> getActionsForComment(String category)
getActionsForComment
in interface CommentManagerActions
public boolean getShowCreateForm()
getShowCreateForm
in interface CommentManagerActions
public void setShowCreateForm(boolean flag)
setShowCreateForm
in interface CommentManagerActions
public void toggleCreateForm(javax.faces.event.ActionEvent event)
toggleCreateForm
in interface CommentManagerActions
public void cleanContextVariable()
Copyright © 2015 Nuxeo SA. All rights reserved.