org.olat.repository.handlers
Class QTIHandler

java.lang.Object
  extended by org.olat.repository.handlers.FileHandler
      extended by org.olat.repository.handlers.QTIHandler
All Implemented Interfaces:
RepositoryHandler
Direct Known Subclasses:
QTISurveyHandler, QTITestHandler

public abstract class QTIHandler
extends FileHandler
implements RepositoryHandler

Initial Date: Apr 6, 2004

Author:
Mike Stock Comment:

Field Summary
static java.lang.String PROCESS_CREATENEW
          Comment for PROCESS_CREATENEW
static java.lang.String PROCESS_UPLOAD
          Comment for PROCESS_UPLOAD
 
Constructor Summary
QTIHandler()
          Default constructor.
 
Method Summary
 LockResult acquireLock(OLATResourceable ores, Identity identity)
          Acquires lock for the input ores and identity.
 OLATResourceable createCopy(OLATResourceable res, UserRequest ureq)
          Create a copy of the given resourceable.
 MainLayoutController getLaunchController(OLATResourceable res, java.lang.String initialViewIdentifier, UserRequest ureq, WindowControl wControl)
          Called if a user launches a Resourceable that this handler can handle.
 boolean isLocked(OLATResourceable ores)
           
 boolean readyToDelete(OLATResourceable res, UserRequest ureq, WindowControl wControl)
          Called if the repository entry referencing the given Resourceable will be deleted from the repository.
 void releaseLock(LockResult lockResult)
          Releases the lock.
 
Methods inherited from class org.olat.repository.handlers.FileHandler
archive, cleanupOnDelete, getAddController, getAsMediaResource, getDetailsComponent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.olat.repository.handlers.RepositoryHandler
archive, cleanupOnDelete, getAddController, getAsMediaResource, getCloseResourceController, getDetailsComponent, getEditorController, getSupportedTypes, supportsDownload, supportsEdit, supportsLaunch
 

Field Detail

PROCESS_UPLOAD

public static final java.lang.String PROCESS_UPLOAD
Comment for PROCESS_UPLOAD

See Also:
Constant Field Values

PROCESS_CREATENEW

public static final java.lang.String PROCESS_CREATENEW
Comment for PROCESS_CREATENEW

See Also:
Constant Field Values
Constructor Detail

QTIHandler

public QTIHandler()
Default constructor.

Method Detail

getLaunchController

public MainLayoutController getLaunchController(OLATResourceable res,
                                                java.lang.String initialViewIdentifier,
                                                UserRequest ureq,
                                                WindowControl wControl)
Description copied from interface: RepositoryHandler
Called if a user launches a Resourceable that this handler can handle.

Specified by:
getLaunchController in interface RepositoryHandler
initialViewIdentifier - if null the default view will be started, otherwise a controllerfactory type dependant view will be activated (subscription subtype)
Returns:
Controller able to launch resourceable.
See Also:
org.olat.repository.handlers.RepositoryHandler#getLaunchController(org.olat.core.id.OLATResourceable java.lang.String, org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)

readyToDelete

public boolean readyToDelete(OLATResourceable res,
                             UserRequest ureq,
                             WindowControl wControl)
Description copied from interface: RepositoryHandler
Called if the repository entry referencing the given Resourceable will be deleted from the repository. Return status wether to proceed with the delete action. If this method returns false, the entry will not be deleted.

Specified by:
readyToDelete in interface RepositoryHandler
Overrides:
readyToDelete in class FileHandler
Returns:
true if ressource is ready to delete, false if not.
See Also:
org.olat.repository.handlers.RepositoryHandler#readyToDelete(org.olat.core.id.OLATResourceable org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)

acquireLock

public LockResult acquireLock(OLATResourceable ores,
                              Identity identity)
Description copied from interface: RepositoryHandler
Acquires lock for the input ores and identity.

Specified by:
acquireLock in interface RepositoryHandler
Returns:
the LockResult or null if no locking supported.
See Also:
RepositoryHandler.acquireLock(org.olat.core.id.OLATResourceable, org.olat.core.id.Identity)

releaseLock

public void releaseLock(LockResult lockResult)
Description copied from interface: RepositoryHandler
Releases the lock.

Specified by:
releaseLock in interface RepositoryHandler
Parameters:
lockResult - the LockResult received when locking
See Also:
RepositoryHandler.releaseLock(org.olat.core.util.coordinate.LockResult)

isLocked

public boolean isLocked(OLATResourceable ores)
Specified by:
isLocked in interface RepositoryHandler
Returns:
See Also:
RepositoryHandler.isLocked(org.olat.core.id.OLATResourceable)

createCopy

public OLATResourceable createCopy(OLATResourceable res,
                                   UserRequest ureq)
Description copied from interface: RepositoryHandler
Create a copy of the given resourceable.

Specified by:
createCopy in interface RepositoryHandler
Overrides:
createCopy in class FileHandler
Returns:
Copy of given resourceable.
See Also:
FileHandler.createCopy(org.olat.core.id.OLATResourceable, org.olat.core.gui.UserRequest)