org.olat.core.commons.services.commentAndRating.impl.ui
Class UserCommentsAndRatingsController

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.controller.BasicController
          extended by org.olat.core.commons.services.commentAndRating.impl.ui.UserCommentsAndRatingsController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable, GenericEventListener

public class UserCommentsAndRatingsController
extends BasicController
implements GenericEventListener

Description:
The user comments and rating controller displays a minimized view of the comments and rating with the option to expand to full view. Use this controller whenever you want a resource to be commented.

Events fired by this controller:

Initial Date: 30.11.2009

Author:
gnaegi

Field Summary
static Event EVENT_COMMENT_LINK_CLICKED
           
static Event EVENT_RATING_CHANGED
           
 
Constructor Summary
UserCommentsAndRatingsController(UserRequest ureq, WindowControl wControl, OLATResourceable ores, java.lang.String oresSubPath, CommentAndRatingSecurityCallback securityCallback, boolean enableComments, boolean enableRatings, boolean canExpandToFullView)
          Constructor for a user combined user comments and ratings controller.
 
Method Summary
 void addUserObject(java.lang.Object userObject)
          Store a user object in this controller that can be retrieved in a later stage when a workflow is done
 void collapseComments(UserRequest ureq)
          Method to manually collapse the comments view
 void event(Event event)
           
 void expandComments(UserRequest ureq)
          Method to manually expand the comments view
 java.lang.Object getUserObject()
          Get the user object associated with this controller
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, dispose, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EVENT_COMMENT_LINK_CLICKED

public static final Event EVENT_COMMENT_LINK_CLICKED

EVENT_RATING_CHANGED

public static final Event EVENT_RATING_CHANGED
Constructor Detail

UserCommentsAndRatingsController

public UserCommentsAndRatingsController(UserRequest ureq,
                                        WindowControl wControl,
                                        OLATResourceable ores,
                                        java.lang.String oresSubPath,
                                        CommentAndRatingSecurityCallback securityCallback,
                                        boolean enableComments,
                                        boolean enableRatings,
                                        boolean canExpandToFullView)
Constructor for a user combined user comments and ratings controller. Use the CommentAndRatingService instead of calling this constructor directly!

Parameters:
ureq -
wControl -
ores -
oresSubPath -
securityCallback -
enableComments -
enableRatings -
canExpandToFullView -
Method Detail

expandComments

public void expandComments(UserRequest ureq)
Method to manually expand the comments view

Parameters:
ureq -

collapseComments

public void collapseComments(UserRequest ureq)
Method to manually collapse the comments view

Parameters:
ureq -

addUserObject

public void addUserObject(java.lang.Object userObject)
Store a user object in this controller that can be retrieved in a later stage when a workflow is done

Parameters:
userObject -

getUserObject

public java.lang.Object getUserObject()
Get the user object associated with this controller

Returns:

event

public void event(Event event)
Specified by:
event in interface GenericEventListener