@Name(value="threadAction") @Scope(value=CONVERSATION) public class ThreadActionBean extends Object implements ThreadAction
| Constructor and Description | 
|---|
ThreadActionBean()  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
addThread()
Adds the thread inside the forum. 
 | 
ThreadAdapter | 
getAdapter(DocumentModel thread)  | 
List<DocumentModel> | 
getAllPosts(DocumentModel thread,
           String state)
Gets all Posts in the Thread with the specified state. 
 | 
String | 
getDescription()
Gets the description of the Thread. 
 | 
DocumentModel | 
getLastPostPublished(DocumentModel thread)
Gets the latest post published in given thread. 
 | 
String | 
getModerationAsString(DocumentModel thread)
Return the label of the moderation state of the thread 
 | 
List<String> | 
getModerators()
Get all moderators on the thread. 
 | 
DocumentModel | 
getParentPost(int post)
Return the parent post of the specified index of the post in the getPostsAsThread() list. 
 | 
List<ThreadEntry> | 
getPostsAsThread()
Gets all available posts in the thread according the Post state and principal rights. 
 | 
List<DocumentModel> | 
getPostsPending(DocumentModel thread)
Gets pending posts in a thread. 
 | 
List<DocumentModel> | 
getPostsPublished(DocumentModel thread)
Gets published posts in a thread. 
 | 
String | 
getSchema()  | 
List<String> | 
getSelectedModerators()  | 
String | 
getTitle()
Gets the title of the Thread to be created. 
 | 
String | 
getType()  | 
boolean | 
isCurrentThreadModerated()
Returns true if the thread is moderated, false otherwise. 
 | 
boolean | 
isModerated()
Returns true if the thread is moderated, false otherwise. 
 | 
boolean | 
isParentPostPublished(int post)
Return true if the parent post identified by it's number in the getPostsAsThread list is published. 
 | 
boolean | 
isPrincipalGroupModerator()
Returns true if the principal(s group is a moderator group 
 | 
boolean | 
isPrincipalModerator()
Returns true if the principal (logged user) is a moderator, else otherwise. 
 | 
boolean | 
isThreadModerated(DocumentModel thread)
Returns true if the given thread is moderated, false otherwise. 
 | 
void | 
readState()  | 
void | 
saveState()  | 
void | 
setDescription(String description)
Sets the description of the Thread. 
 | 
void | 
setModerated(boolean moderated)
Sets the moderation on a thread. 
 | 
void | 
setSelectedModerators(List<String> selectedModerators)  | 
void | 
setTitle(String title)
Sets the title of the Thread. 
 | 
public String addThread() throws ClientException
ThreadActionaddThread in interface ThreadActionClientException - if the Thread can't be createdpublic List<String> getModerators()
ThreadActiongetModerators in interface ThreadActionpublic boolean isPrincipalModerator()
ThreadActionisPrincipalModerator in interface ThreadActionpublic boolean isPrincipalGroupModerator()
ThreadActionisPrincipalGroupModerator in interface ThreadActionpublic boolean isCurrentThreadModerated()
                                 throws ClientException
ThreadActionisCurrentThreadModerated in interface ThreadActionClientException@Factory(value="currentThreadPosts",
         scope=EVENT)
public List<ThreadEntry> getPostsAsThread()
                                   throws ClientException
ThreadActiongetPostsAsThread in interface ThreadActionClientExceptionpublic ThreadAdapter getAdapter(DocumentModel thread)
getAdapter in interface ThreadActionpublic List<DocumentModel> getAllPosts(DocumentModel thread, String state) throws ClientException
ThreadActiongetAllPosts in interface ThreadActionClientExceptionpublic List<DocumentModel> getPostsPublished(DocumentModel thread) throws ClientException
ThreadActiongetPostsPublished in interface ThreadActionClientExceptionpublic List<DocumentModel> getPostsPending(DocumentModel thread) throws ClientException
ThreadActiongetPostsPending in interface ThreadActionClientExceptionpublic String getDescription()
ThreadActiongetDescription in interface ThreadActionpublic String getTitle()
ThreadActiongetTitle in interface ThreadActionpublic void setDescription(String description)
ThreadActionsetDescription in interface ThreadActionpublic void setTitle(String title)
ThreadActionsetTitle in interface ThreadActionpublic String getSchema()
public String getType()
public void saveState()
public void readState()
public boolean isModerated()
ThreadActionisModerated in interface ThreadActionpublic void setModerated(boolean moderated)
ThreadActionsetModerated in interface ThreadActionpublic DocumentModel getLastPostPublished(DocumentModel thread) throws ClientException
ThreadActiongetLastPostPublished in interface ThreadActionClientExceptionpublic String getModerationAsString(DocumentModel thread) throws ClientException
ThreadActiongetModerationAsString in interface ThreadActionthread - is the thread we wantClientExceptionpublic boolean isThreadModerated(DocumentModel thread) throws ClientException
ThreadActionisThreadModerated in interface ThreadActionthread - is the thread to testClientExceptionpublic DocumentModel getParentPost(int post) throws ClientException
ThreadActiongetParentPost in interface ThreadActionClientExceptionpublic boolean isParentPostPublished(int post)
                              throws ClientException
ThreadActionisParentPostPublished in interface ThreadActionClientExceptionCopyright © 2015 Nuxeo SA. All rights reserved.