org.olat.modules.fo
Class MessageEditController

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.gui.components.form.flexible.impl.FormBasicController
              extended by org.olat.modules.fo.MessageEditController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable

public class MessageEditController
extends FormBasicController

Description:
Can be used for creating / editing or replying to a thread/post. editmode is set to do internal mode-switch, where needed.

Initial Date: 18.06.2009

Author:
Roman Haag, roman.haag@frentix.com, frentix GmbH

Field Summary
 
Fields inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
LAYOUT_CUSTOM, LAYOUT_DEFAULT, LAYOUT_HORIZONTAL, LAYOUT_VERTICAL
 
Constructor Summary
MessageEditController(UserRequest ureq, WindowControl control, ForumCallback forumCallback, Message message, Message quoteMessage)
           
 
Method Summary
 java.lang.String getLastEditModus()
          gives back the mode in which the editor was (create/edit/reply)
 Message getMessageBackAfterEdit()
          Used to get the message edited right before.
 void persistTempUploadedFiles(Message tmpMessage)
          - used locally if in edit mode where the msg-key is known - called from ForumController after creating a thread or a reply to copy temp files to msg-folder
 java.lang.String renderFileIconCssClass(java.lang.String filename)
           
 
Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
dispose, event
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageEditController

public MessageEditController(UserRequest ureq,
                             WindowControl control,
                             ForumCallback forumCallback,
                             Message message,
                             Message quoteMessage)
Parameters:
ureq -
control -
forumCallback -
message - may be a new message created by ForumManager.createMessage() which is not yet saved in db
quoteMessage - may be null if Editor isn't used to reply to a message
Method Detail

renderFileIconCssClass

public java.lang.String renderFileIconCssClass(java.lang.String filename)

getMessageBackAfterEdit

public Message getMessageBackAfterEdit()
Used to get the message edited right before. the new values got saved to it locally by formOK()

Returns:
the edited message

getLastEditModus

public java.lang.String getLastEditModus()
gives back the mode in which the editor was (create/edit/reply)

Returns:
editMode which can be matched against static Strings from this class

persistTempUploadedFiles

public void persistTempUploadedFiles(Message tmpMessage)
- used locally if in edit mode where the msg-key is known - called from ForumController after creating a thread or a reply to copy temp files to msg-folder

Parameters:
tmpMessage -