org.alfresco.web.bean.forums
Class ForumsBean

java.lang.Object
  extended by org.alfresco.web.bean.forums.ForumsBean
All Implemented Interfaces:
java.io.Serializable, IContextListener

public class ForumsBean
extends java.lang.Object
implements IContextListener

Bean providing properties and behaviour for the forums screens.

See Also:
Serialized Form

Nested Class Summary
static class ForumsBean.TopicBubbleViewRenderer
          Class to implement a bubble view for the RichList component used in the topics screen
 
Field Summary
protected  BrowseBean browseBean
          The browse bean
protected  UIRichList forumRichList
           
protected  UIRichList forumsRichList
          Component references
protected  NavigationBean navigator
          The NavigationBean bean reference
 NodePropertyResolver resolverContent
           
 NodePropertyResolver resolverReplies
           
 NodePropertyResolver resolverReplyTo
           
protected  UIRichList topicRichList
           
protected  ViewsConfigElement viewsConfig
          Views configuration object
 
Constructor Summary
ForumsBean()
          Default Constructor
 
Method Summary
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 void contextUpdated()
          Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.
static java.lang.String createPostFileName()
          Creates a file name for the message being posted
 void discuss(javax.faces.event.ActionEvent event)
          Event handler called when a user wants to view or participate in a discussion on an object
 void forumsViewModeChanged(javax.faces.event.ActionEvent event)
          Change the current forums view mode based on user selection
 void forumViewModeChanged(javax.faces.event.ActionEvent event)
          Change the current forum view mode based on user selection
protected  org.alfresco.service.cmr.repository.ContentService getContentService()
           
protected  org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()
           
 int getForumPageSize()
           
 UIRichList getForumRichList()
           
 java.util.List getForums()
           
 int getForumsPageSize()
           
 UIRichList getForumsRichList()
           
 java.lang.String getForumsViewMode()
           
 java.lang.String getForumViewMode()
           
protected  org.alfresco.service.namespace.NamespaceService getNamespaceService()
           
protected  org.alfresco.service.cmr.repository.NodeService getNodeService()
           
 java.util.List getPosts()
           
 java.lang.String getReplyBubbleHTML()
          Returns the HTML to represent a bubble rendition of the text of the the forum article being replied to.
protected  org.alfresco.service.cmr.search.SearchService getSearchService()
           
 int getTopicPageSize()
           
 UIRichList getTopicRichList()
           
 java.util.List getTopics()
           
 java.lang.String getTopicViewMode()
           
protected  void renderReplyContentHTML(javax.faces.context.FacesContext context, Node replyToNode, java.io.StringWriter writer, java.lang.String contextPath, java.lang.String colour, java.lang.String bgColour)
           
 void setBrowseBean(BrowseBean browseBean)
          Sets the BrowseBean instance to use to retrieve the current document
 void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
          Sets the content service to use
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setForumPageSize(int forumPageSize)
           
 void setForumRichList(UIRichList forumRichList)
           
 void setForumsPageSize(int forumsPageSize)
           
 void setForumsRichList(UIRichList forumsRichList)
           
 void setForumsViewMode(java.lang.String forumsViewMode)
           
 void setForumViewMode(java.lang.String forumViewMode)
           
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
           
 void setNavigator(NavigationBean navigator)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 void setTopicPageSize(int topicPageSize)
           
 void setTopicRichList(UIRichList topicRichList)
           
 void setTopicViewMode(java.lang.String topicViewMode)
           
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
 void topicViewModeChanged(javax.faces.event.ActionEvent event)
          Change the current topic view mode based on user selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

browseBean

protected BrowseBean browseBean
The browse bean


navigator

protected NavigationBean navigator
The NavigationBean bean reference


viewsConfig

protected ViewsConfigElement viewsConfig
Views configuration object


forumsRichList

protected UIRichList forumsRichList
Component references


forumRichList

protected UIRichList forumRichList

topicRichList

protected UIRichList topicRichList

resolverReplies

public NodePropertyResolver resolverReplies

resolverContent

public NodePropertyResolver resolverContent

resolverReplyTo

public NodePropertyResolver resolverReplyTo
Constructor Detail

ForumsBean

public ForumsBean()
Default Constructor

Method Detail

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - The NodeService to set.

getNodeService

protected org.alfresco.service.cmr.repository.NodeService getNodeService()

setContentService

public void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
Sets the content service to use

Parameters:
contentService - The ContentService

getContentService

protected org.alfresco.service.cmr.repository.ContentService getContentService()

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Parameters:
dictionaryService - The DictionaryService to set.

getDictionaryService

protected org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Parameters:
searchService - The SearchService to set.

getSearchService

protected org.alfresco.service.cmr.search.SearchService getSearchService()

setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Parameters:
namespaceService - The NamespaceService to set.

getNamespaceService

protected org.alfresco.service.namespace.NamespaceService getNamespaceService()

setBrowseBean

public void setBrowseBean(BrowseBean browseBean)
Sets the BrowseBean instance to use to retrieve the current document

Parameters:
browseBean - BrowseBean instance

setNavigator

public void setNavigator(NavigationBean navigator)
Parameters:
navigator - The NavigationBean to set.

setForumsRichList

public void setForumsRichList(UIRichList forumsRichList)
Parameters:
forumsRichList - The forumsRichList to set.

getForumsRichList

public UIRichList getForumsRichList()
Returns:
Returns the forumsRichList.

getForumsViewMode

public java.lang.String getForumsViewMode()
Returns:
Returns the forums View mode. See UIRichList

setForumsViewMode

public void setForumsViewMode(java.lang.String forumsViewMode)
Parameters:
forumsViewMode - The forums View mode to set. See UIRichList.

getForumsPageSize

public int getForumsPageSize()
Returns:
Returns the forumsPageSize.

setForumsPageSize

public void setForumsPageSize(int forumsPageSize)
Parameters:
forumsPageSize - The forumsPageSize to set.

setTopicRichList

public void setTopicRichList(UIRichList topicRichList)
Parameters:
topicRichList - The topicRichList to set.

getTopicRichList

public UIRichList getTopicRichList()
Returns:
Returns the topicRichList.

getTopicViewMode

public java.lang.String getTopicViewMode()
Returns:
Returns the topics View mode. See UIRichList

setTopicViewMode

public void setTopicViewMode(java.lang.String topicViewMode)
Parameters:
topicViewMode - The topic View mode to set. See UIRichList.

getTopicPageSize

public int getTopicPageSize()
Returns:
Returns the topicsPageSize.

setTopicPageSize

public void setTopicPageSize(int topicPageSize)
Parameters:
topicPageSize - The topicPageSize to set.

setForumRichList

public void setForumRichList(UIRichList forumRichList)
Parameters:
forumRichList - The forumRichList to set.

getForumRichList

public UIRichList getForumRichList()
Returns:
Returns the forumRichList.

getForumViewMode

public java.lang.String getForumViewMode()
Returns:
Returns the forum View mode. See UIRichList

setForumViewMode

public void setForumViewMode(java.lang.String forumViewMode)
Parameters:
forumViewMode - The forum View mode to set. See UIRichList.

getForumPageSize

public int getForumPageSize()
Returns:
Returns the forumPageSize.

setForumPageSize

public void setForumPageSize(int forumPageSize)
Parameters:
forumPageSize - The forumPageSize to set.

getForums

public java.util.List getForums()

getTopics

public java.util.List getTopics()

getPosts

public java.util.List getPosts()

getReplyBubbleHTML

public java.lang.String getReplyBubbleHTML()
Returns the HTML to represent a bubble rendition of the text of the the forum article being replied to.

Returns:
The HTML for the bubble

contextUpdated

public void contextUpdated()
Description copied from interface: IContextListener
Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.

Specified by:
contextUpdated in interface IContextListener
See Also:
IContextListener.contextUpdated()

areaChanged

public void areaChanged()
Description copied from interface: IContextListener
Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e. from company home to my home.

Specified by:
areaChanged in interface IContextListener
See Also:
IContextListener.areaChanged()

spaceChanged

public void spaceChanged()
Description copied from interface: IContextListener
Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.

Specified by:
spaceChanged in interface IContextListener
See Also:
IContextListener.spaceChanged()

forumsViewModeChanged

public void forumsViewModeChanged(javax.faces.event.ActionEvent event)
Change the current forums view mode based on user selection

Parameters:
event - ActionEvent

forumViewModeChanged

public void forumViewModeChanged(javax.faces.event.ActionEvent event)
Change the current forum view mode based on user selection

Parameters:
event - ActionEvent

topicViewModeChanged

public void topicViewModeChanged(javax.faces.event.ActionEvent event)
Change the current topic view mode based on user selection

Parameters:
event - ActionEvent

discuss

public void discuss(javax.faces.event.ActionEvent event)
Event handler called when a user wants to view or participate in a discussion on an object

Parameters:
event - ActionEvent

createPostFileName

public static java.lang.String createPostFileName()
Creates a file name for the message being posted

Returns:
The file name for the post

renderReplyContentHTML

protected void renderReplyContentHTML(javax.faces.context.FacesContext context,
                                      Node replyToNode,
                                      java.io.StringWriter writer,
                                      java.lang.String contextPath,
                                      java.lang.String colour,
                                      java.lang.String bgColour)
                               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.