|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.forum.web.ThreadActionBean
@Name(value="threadAction") @Scope(value=CONVERSATION) public class ThreadActionBean
This Action Listener represents a Thread inside a forum.
Constructor Summary | |
---|---|
ThreadActionBean()
|
Method Summary | |
---|---|
java.lang.String |
addThread()
Adds the thread inside the forum. |
void |
destroy()
|
ThreadAdapter |
getAdapter(DocumentModel thread)
|
java.util.List<DocumentModel> |
getAllPosts(DocumentModel thread,
java.lang.String state)
Gets all Posts in the Thread with the specified state. |
java.lang.String |
getDescription()
Gets the description of the Thread. |
DocumentModel |
getLastPostPublished(DocumentModel thread)
Gets the latest post published in given thread. |
java.lang.String |
getModerationAsString(DocumentModel thread)
Return the label of the moderation state of the thread |
java.util.List<java.lang.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. |
java.util.List<ThreadEntry> |
getPostsAsThread()
Gets all available posts in the thread according the Post state and principal rights. |
java.util.List<DocumentModel> |
getPostsPending(DocumentModel thread)
Gets pending posts in a thread. |
java.util.List<DocumentModel> |
getPostsPublished(DocumentModel thread)
Gets published posts in a thread. |
java.lang.String |
getSchema()
|
java.util.List<java.lang.String> |
getSelectedModerators()
|
java.lang.String |
getTitle()
Gets the title of the Thread to be created. |
java.lang.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(java.lang.String description)
Sets the description of the Thread. |
void |
setModerated(boolean moderated)
Sets the moderation on a thread. |
void |
setSelectedModerators(java.util.List<java.lang.String> selectedModerators)
|
void |
setTitle(java.lang.String title)
Sets the title of the Thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadActionBean()
Method Detail |
---|
public java.lang.String addThread() throws ClientException
ThreadAction
addThread
in interface ThreadAction
ClientException
- if the Thread can't be createdpublic java.util.List<java.lang.String> getModerators()
ThreadAction
getModerators
in interface ThreadAction
public boolean isPrincipalModerator()
ThreadAction
isPrincipalModerator
in interface ThreadAction
public boolean isPrincipalGroupModerator()
ThreadAction
isPrincipalGroupModerator
in interface ThreadAction
public boolean isCurrentThreadModerated() throws ClientException
ThreadAction
isCurrentThreadModerated
in interface ThreadAction
ClientException
@Factory(value="currentThreadPosts", scope=EVENT) public java.util.List<ThreadEntry> getPostsAsThread() throws ClientException
ThreadAction
getPostsAsThread
in interface ThreadAction
ClientException
public ThreadAdapter getAdapter(DocumentModel thread)
getAdapter
in interface ThreadAction
public java.util.List<DocumentModel> getAllPosts(DocumentModel thread, java.lang.String state) throws ClientException
ThreadAction
getAllPosts
in interface ThreadAction
ClientException
public java.util.List<DocumentModel> getPostsPublished(DocumentModel thread) throws ClientException
ThreadAction
getPostsPublished
in interface ThreadAction
ClientException
public java.util.List<DocumentModel> getPostsPending(DocumentModel thread) throws ClientException
ThreadAction
getPostsPending
in interface ThreadAction
ClientException
public java.lang.String getDescription()
ThreadAction
getDescription
in interface ThreadAction
public java.lang.String getTitle()
ThreadAction
getTitle
in interface ThreadAction
public void setDescription(java.lang.String description)
ThreadAction
setDescription
in interface ThreadAction
public void setTitle(java.lang.String title)
ThreadAction
setTitle
in interface ThreadAction
public java.lang.String getSchema()
public java.lang.String getType()
public void saveState()
public void readState()
public void destroy()
public boolean isModerated()
ThreadAction
isModerated
in interface ThreadAction
public void setModerated(boolean moderated)
ThreadAction
setModerated
in interface ThreadAction
public DocumentModel getLastPostPublished(DocumentModel thread) throws ClientException
ThreadAction
getLastPostPublished
in interface ThreadAction
ClientException
public java.lang.String getModerationAsString(DocumentModel thread) throws ClientException
ThreadAction
getModerationAsString
in interface ThreadAction
thread
- is the thread we want
ClientException
public boolean isThreadModerated(DocumentModel thread) throws ClientException
ThreadAction
isThreadModerated
in interface ThreadAction
thread
- is the thread to test
ClientException
public DocumentModel getParentPost(int post) throws ClientException
ThreadAction
getParentPost
in interface ThreadAction
ClientException
public boolean isParentPostPublished(int post) throws ClientException
ThreadAction
isParentPostPublished
in interface ThreadAction
ClientException
public java.util.List<java.lang.String> getSelectedModerators()
public void setSelectedModerators(java.util.List<java.lang.String> selectedModerators)
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |