Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.forum.web
Class PostActionBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.forum.web.PostActionBean
All Implemented Interfaces:
java.io.Serializable, PostAction

@Name(value="postAction")
@Scope(value=CONVERSATION)
public class PostActionBean
extends java.lang.Object
implements PostAction

This action listener is used to create a Post inside a Thread and also to handle the moderation cycle on Post.

Author:
Brice Chaffangeon
See Also:
Serialized Form

Constructor Summary
PostActionBean()
           
 
Method Summary
 java.lang.String addPost()
          Adds the post to the thread and starts the moderation WF on the post created.
 java.lang.String approvePost(DocumentModel post)
          Ends the task on a post.
 java.lang.String cancelPost()
          Cancels the action of adding a Post.
 boolean checkWritePermissionOnThread()
           
 java.lang.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.
 java.lang.String getFilename()
          Gets the name of the attached file of the post at creation time.
 DocumentModel getParentThread()
          Gets the Thread in which the Post is.
 java.lang.String getText()
          Gets the text of the post at creation time.
 java.lang.String getTitle()
          Gets the title of the post for creation purpose.
 boolean isPostPublished(DocumentModel post)
          Returns true if the post is published, false otherwise.
 java.lang.String rejectPost(DocumentModel post)
           
 void setFileContent(Blob fileContent)
          Sets the content of the attached file of the post at creation time.
 void setFilename(java.lang.String filename)
          Sets the name of the attached file of the post at creation time.
 void setText(java.lang.String text)
          Sets the text of the post at creation time.
 void setTitle(java.lang.String title)
          Sets the title of the post at creation time.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostActionBean

public PostActionBean()
Method Detail

checkWritePermissionOnThread

public boolean checkWritePermissionOnThread()
Specified by:
checkWritePermissionOnThread in interface PostAction

addPost

public java.lang.String addPost()
                         throws ClientException
Adds the post to the thread and starts the moderation WF on the post created.

Specified by:
addPost in interface PostAction
Returns:
the view id
Throws:
ClientException

cancelPost

public java.lang.String cancelPost()
                            throws ClientException
Description copied from interface: PostAction
Cancels the action of adding a Post.

Specified by:
cancelPost in interface PostAction
Returns:
the view id to stay on thread view
Throws:
ClientException

deletePost

public java.lang.String deletePost()
                            throws ClientException
Description copied from interface: PostAction
Deletes the Post and in a the Thread.

Specified by:
deletePost in interface PostAction
Returns:
the view id after delete operation
Throws:
ClientException

rejectPost

public java.lang.String rejectPost(DocumentModel post)
                            throws ClientException
Specified by:
rejectPost in interface PostAction
Throws:
ClientException

approvePost

public java.lang.String approvePost(DocumentModel post)
                             throws ClientException
Ends the task on a post.

Specified by:
approvePost in interface PostAction
Throws:
ClientException

getParentThread

public DocumentModel getParentThread()
Description copied from interface: PostAction
Gets the Thread in which the Post is.

Specified by:
getParentThread in interface PostAction

isPostPublished

public boolean isPostPublished(DocumentModel post)
                        throws ClientException
Description copied from interface: PostAction
Returns true if the post is published, false otherwise.

Specified by:
isPostPublished in interface PostAction
Throws:
ClientException

getText

public java.lang.String getText()
Description copied from interface: PostAction
Gets the text of the post at creation time.

Specified by:
getText in interface PostAction

setText

public void setText(java.lang.String text)
Description copied from interface: PostAction
Sets the text of the post at creation time.

Specified by:
setText in interface PostAction

getFilename

public java.lang.String getFilename()
Description copied from interface: PostAction
Gets the name of the attached file of the post at creation time.

Specified by:
getFilename in interface PostAction

setFilename

public void setFilename(java.lang.String filename)
Description copied from interface: PostAction
Sets the name of the attached file of the post at creation time.

Specified by:
setFilename in interface PostAction

getFileContent

public Blob getFileContent()
Description copied from interface: PostAction
Gets the content of the attached file of the post at creation time.

Specified by:
getFileContent in interface PostAction

setFileContent

public void setFileContent(Blob fileContent)
Description copied from interface: PostAction
Sets the content of the attached file of the post at creation time.

Specified by:
setFileContent in interface PostAction

getTitle

public java.lang.String getTitle()
                          throws ClientException
Gets the title of the post for creation purpose. If the post to be created reply to a previous post, the title of the new post comes with the previous title, and a prefix (i.e : Re : Previous Title).

Specified by:
getTitle in interface PostAction
Throws:
ClientException

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: PostAction
Sets the title of the post at creation time.

Specified by:
setTitle in interface PostAction

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.