@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.
|
protected void |
fetchInvalidationsIfNeeded() |
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 PostAction
protected void fetchInvalidationsIfNeeded()
public String addPost()
addPost
in interface PostAction
public String cancelPost()
PostAction
cancelPost
in interface PostAction
public String deletePost()
PostAction
deletePost
in interface PostAction
public String rejectPost(DocumentModel post)
rejectPost
in interface PostAction
public String approvePost(DocumentModel post)
approvePost
in interface PostAction
public DocumentModel getParentThread()
PostAction
getParentThread
in interface PostAction
public boolean isPostPublished(DocumentModel post)
PostAction
isPostPublished
in interface PostAction
protected void startModeration(DocumentModel post)
protected Task getModerationTask(DocumentModel thread, String postId)
protected void cleanContextVariables()
public String getText()
PostAction
getText
in interface PostAction
public void setText(String text)
PostAction
setText
in interface PostAction
public String getFilename()
PostAction
getFilename
in interface PostAction
public void setFilename(String filename)
PostAction
setFilename
in interface PostAction
public Blob getFileContent()
PostAction
getFileContent
in interface PostAction
public void setFileContent(Blob fileContent)
PostAction
setFileContent
in interface PostAction
public String getTitle()
getTitle
in interface PostAction
public void setTitle(String title)
PostAction
setTitle
in interface PostAction
Copyright © 2015 Nuxeo SA. All rights reserved.