org.olat.ims.qti.editor
Class QTIEditorMainController

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.control.controller.MainLayoutBasicController
              extended by org.olat.ims.qti.editor.QTIEditorMainController
All Implemented Interfaces:
CustomCSSProvider, Controller, ControllerEventListener, Disposable, MainLayoutController, VetoableCloseController

public class QTIEditorMainController
extends MainLayoutBasicController
implements VetoableCloseController

Description:
QTIEditorMainController is started from within the repository. A persistent lock is set to prevent more than one user working on the same document, even if the current working author has no active session. If the document is already linked to a node in a course, it is opened for corrections only. This restricted editing function prohibits structural changes which would interfere with already existing results.

Furthermore, if a document is loaded into the editor, it is not available for linking in a course. Therefore, a document in the editor can always be saved back safely to the repository. But it must be locked that users starting the document from an already referencing building block wait until the edited document is committed completly to the repository.

Initial Date: Oct 21, 2004

Author:
mike

Constructor Summary
QTIEditorMainController(java.util.List referencees, UserRequest ureq, WindowControl wControl, FileResource fileResource)
           
QTIEditorMainController(UserRequest ureq, WindowControl wControl, FileResource fileResource)
          This constructor may only be used for new or non-referenced QTI files!
 
Method Summary
 void event(UserRequest ureq, Component source, Event event)
          abstract event method for subclasses.
 boolean isLockedSuccessfully()
           
 boolean isRestrictedEdit()
          whether the editor runs in restricted mode or not.
 boolean requestForClose()
           
 
Methods inherited from class org.olat.core.gui.control.controller.MainLayoutBasicController
dispose, getCustomCSS, setCustomCSS
 
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
 
Methods inherited from interface org.olat.core.gui.control.Controller
addControllerListener, dispatchEvent, dispose, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed
 

Constructor Detail

QTIEditorMainController

public QTIEditorMainController(java.util.List referencees,
                               UserRequest ureq,
                               WindowControl wControl,
                               FileResource fileResource)

QTIEditorMainController

public QTIEditorMainController(UserRequest ureq,
                               WindowControl wControl,
                               FileResource fileResource)
This constructor may only be used for new or non-referenced QTI files!

Parameters:
ureq -
wControl -
fileResource -
Method Detail

event

public void event(UserRequest ureq,
                  Component source,
                  Event event)
Description copied from class: DefaultController
abstract event method for subclasses. the event received from the component we are listening to are always rerouted to this method here, except when the component has been disposed, in which case the events are simply ignored.

See Also:
DefaultController.event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)

requestForClose

public boolean requestForClose()
Specified by:
requestForClose in interface VetoableCloseController
Returns:
true if this controller can be closed immediately (and the closecallback will not be used), false if the close will be delayed
See Also:
VetoableCloseController.requestForClose()

isRestrictedEdit

public boolean isRestrictedEdit()
whether the editor runs in restricted mode or not.

Returns:

isLockedSuccessfully

public boolean isLockedSuccessfully()