org.olat.ims.qti.process
Class FilePersister

java.lang.Object
  extended by org.olat.ims.qti.process.FilePersister
All Implemented Interfaces:
Persister

public class FilePersister
extends java.lang.Object
implements Persister


Constructor Summary
FilePersister(Identity subj, java.lang.String resourcePathInfo)
          Assuming: only one test can be persisted per combination of a dlPointer and a SubjectName, = a certain test for a specific user can only be persisted at one place FIXME:pb:a identity and repositoryEntryKey are not enough as one test may be reference n times from within one course.
 
Method Summary
 void cleanUp()
           
static void createResultsReporting(org.dom4j.Document doc, Identity subj, java.lang.String type, long aiid)
          Persist results for this user/aiid as an XML document.
static void deleteUserData(Identity identity)
          Delete all qti data dirs for certain user.
 void persist(java.lang.Object o, java.lang.String info)
          serialize the current test in case of a stop and later resume (e.g.
static org.dom4j.Document retreiveResultsReporting(Identity subj, java.lang.String type, long aiid)
          Retreive results for this user/aiid
 java.lang.Object toRAM()
          returns (at the moment) only AssessmentInstances, see persist()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePersister

public FilePersister(Identity subj,
                     java.lang.String resourcePathInfo)
Assuming: only one test can be persisted per combination of a dlPointer and a SubjectName, = a certain test for a specific user can only be persisted at one place FIXME:pb:a identity and repositoryEntryKey are not enough as one test may be reference n times from within one course.

Parameters:
subj - the user
repositoryPath - path information e.g. /
Method Detail

persist

public void persist(java.lang.Object o,
                    java.lang.String info)
serialize the current test in case of a stop and later resume (e.g. the browser of the user crashes, and the user wants to resume the test or survey in a later session)

Specified by:
persist in interface Persister
See Also:
Persister.persist(Object, String)

toRAM

public java.lang.Object toRAM()
returns (at the moment) only AssessmentInstances, see persist()

Specified by:
toRAM in interface Persister

cleanUp

public void cleanUp()
Specified by:
cleanUp in interface Persister

createResultsReporting

public static void createResultsReporting(org.dom4j.Document doc,
                                          Identity subj,
                                          java.lang.String type,
                                          long aiid)
Persist results for this user/aiid as an XML document. dlPointer is aiid in this case.

Parameters:
doc -
type -
info -

retreiveResultsReporting

public static org.dom4j.Document retreiveResultsReporting(Identity subj,
                                                          java.lang.String type,
                                                          long aiid)
Retreive results for this user/aiid

Parameters:
type - The type of results
Returns:

deleteUserData

public static void deleteUserData(Identity identity)
Delete all qti data dirs for certain user. Includes : /qtiser///, /qtiser/ /resreporting/

Parameters:
identity -