@Name(value="postAction") @Scope(value=CONVERSATION) public class PostActionBean extends Object implements PostAction
| Modifier and Type | Field and Description |
|---|---|
protected CommentManagerActions |
commentManagerActions |
protected RepositoryLocation |
currentServerLocation |
protected Principal |
currentUser |
protected String |
deletePostId |
protected CoreSession |
documentManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected Blob |
fileContent |
protected String |
filename |
protected NavigationContext |
navigationContext |
protected ResourcesAccessor |
resourcesAccessor |
protected TaskService |
taskService |
protected String |
text |
protected ThreadAction |
threadAction |
protected String |
title |
| Constructor and Description |
|---|
PostActionBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
addPost()
Adds the post to the thread and starts the moderation WF on the post created.
|
String |
approvePost(DocumentModel post)
Ends the task on a post.
|
String |
cancelPost()
Cancels the action of adding a Post.
|
boolean |
checkWritePermissionOnThread() |
protected void |
cleanContextVariables() |
String |
deletePost()
Deletes the Post and in a the Thread.
|
Blob |
getFileContent()
Gets the content of the attached file of the post at creation time.
|
String |
getFilename()
Gets the name of the attached file of the post at creation time.
|
protected Task |
getModerationTask(DocumentModel thread,
String postId) |
DocumentModel |
getParentThread()
Gets the Thread in which the Post is.
|
String |
getText()
Gets the text of the post at creation time.
|
String |
getTitle()
Gets the title of the post for creation purpose.
|
boolean |
isPostPublished(DocumentModel post)
Returns true if the post is published, false otherwise.
|
String |
rejectPost(DocumentModel post) |
void |
setFileContent(Blob fileContent)
Sets the content of the attached file of the post at creation time.
|
void |
setFilename(String filename)
Sets the name of the attached file of the post at creation time.
|
void |
setText(String text)
Sets the text of the post at creation time.
|
void |
setTitle(String title)
Sets the title of the post at creation time.
|
protected void |
startModeration(DocumentModel post)
Starts the moderation on given Post.
|
@In(create=true) protected ThreadAction threadAction
@In(create=true) protected transient CommentManagerActions commentManagerActions
@In(create=true,
required=false)
protected transient CoreSession documentManager
@In(create=true) protected transient NavigationContext navigationContext
@In(create=true) protected transient TaskService taskService
@In(required=false) protected RepositoryLocation currentServerLocation
@In(create=true) protected transient Principal currentUser
@In(create=true,
required=false)
protected org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true) protected ResourcesAccessor resourcesAccessor
@RequestParameter protected String deletePostId
protected Blob fileContent
public PostActionBean()
public boolean checkWritePermissionOnThread()
checkWritePermissionOnThread in interface PostActionpublic String addPost()
addPost in interface PostActionpublic String cancelPost()
PostActioncancelPost in interface PostActionpublic String deletePost()
PostActiondeletePost in interface PostActionpublic String rejectPost(DocumentModel post)
rejectPost in interface PostActionpublic String approvePost(DocumentModel post)
approvePost in interface PostActionpublic DocumentModel getParentThread()
PostActiongetParentThread in interface PostActionpublic boolean isPostPublished(DocumentModel post)
PostActionisPostPublished in interface PostActionprotected void startModeration(DocumentModel post)
protected Task getModerationTask(DocumentModel thread, String postId)
protected void cleanContextVariables()
public String getText()
PostActiongetText in interface PostActionpublic void setText(String text)
PostActionsetText in interface PostActionpublic String getFilename()
PostActiongetFilename in interface PostActionpublic void setFilename(String filename)
PostActionsetFilename in interface PostActionpublic Blob getFileContent()
PostActiongetFileContent in interface PostActionpublic void setFileContent(Blob fileContent)
PostActionsetFileContent in interface PostActionpublic String getTitle()
getTitle in interface PostActionpublic void setTitle(String title)
PostActionsetTitle in interface PostActionCopyright © 2016 Nuxeo SA. All rights reserved.