|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.course.CourseFactory
public class CourseFactory
Description:
Use the course factory to create course run and edit controllers or to load a
course from disk
Initial Date: Oct 12, 2004
| Field Summary | |
|---|---|
static java.lang.String |
COURSE_EDITOR_LOCK
|
| Constructor Summary | |
|---|---|
CourseFactory()
|
|
| Method Summary | |
|---|---|
static void |
archiveCourse(Identity archiveOnBehalfOf,
ICourse course,
java.lang.String charset,
java.util.Locale locale,
java.io.File exportDirectory,
boolean isOLATAdmin,
boolean... oresRights)
visit all nodes in the specified course and make them archiving any data into the identity's export directory. |
static void |
archiveCourse(OLATResourceable res,
java.lang.String charset,
java.util.Locale locale,
Identity identity)
visit all nodes in the specified course and make them archiving any data into the identity's export directory. |
static void |
closeCourseEditSession(java.lang.Long resourceableId,
boolean checkIfAnyAvailable)
TODO: remove course from courseEditSessionMap at releaseLock |
static OLATResourceable |
copyCourse(OLATResourceable sourceRes,
UserRequest ureq)
Copies a course. |
static Controller |
createDisposedCourseRestartController(UserRequest ureq,
WindowControl wControl,
long resId)
|
static Controller |
createEditorController(UserRequest ureq,
WindowControl wControl,
OLATResourceable olatResource)
Create an editor controller for the given course resourceable |
static ICourse |
createEmptyCourse(OLATResourceable ores,
java.lang.String shortTitle,
java.lang.String longTitle,
java.lang.String learningObjectives)
Creates an empty course with a single root node. |
static Controller |
createHelpCourseLaunchController(UserRequest ureq,
WindowControl wControl)
Create a user locale dependent help-course run controller |
static MainLayoutController |
createLaunchController(UserRequest ureq,
WindowControl wControl,
OLATResourceable olatResource,
java.lang.String initialViewIdentifier)
Create a run controller for the given course resourceable |
static void |
deleteCourse(OLATResourceable res)
Delete a course including its course folder and all references to resources this course holds. |
static RepositoryEntry |
deployCourseFromZIP(java.io.File exportedCourseZIPFile,
int access)
Deploys a course from an exported course ZIP file. |
static void |
exportCourseToZIP(OLATResourceable sourceRes,
java.io.File fTargetZIP)
Exports an entire course to a zip file. |
static void |
fireModifyCourseEvent(java.lang.Long resourceableId)
Updates the course cache forcing other cluster nodes to reload this course. |
static VFSItem |
getCourseBaseContainer(java.lang.Long resourceableId)
the provided resourceableID must belong to a ICourse.getResourceableId(), otherwise you risk to use a wrong course base container. |
static PersistingCourseImpl |
getCourseEditSession(java.lang.Long resourceableId)
Provides the currently edited course object with this id. |
static CustomCSS |
getCustomCourseCss(UserSession usess,
CourseEnvironment courseEnvironment)
Create a custom css object for the course layout. |
static java.io.File |
getDataExportDirectory(Identity identity,
java.lang.String courseName)
Returns the data export directory. |
static Component |
getDetailsComponent(OLATResourceable res,
UserRequest ureq)
Get a details form for a given course resourceable |
static java.io.File |
getOrCreateDataExportDirectory(Identity identity,
java.lang.String courseName)
Returns the data export directory. |
static java.io.File |
getOrCreateStatisticDirectory(Identity identity,
java.lang.String courseName)
Returns the data export directory. |
static java.io.File |
getPersonalDirectory(Identity identity)
Returns the personal folder of the given identity. |
static ICourse |
importCourseFromZip(OLATResourceable ores,
java.io.File zipFile)
Import a course from a ZIP file. |
static ICourse |
loadCourse(java.lang.Long resourceableId)
Gets the course from cache if already there, or loads the course and puts it into cache. |
static ICourse |
loadCourse(OLATResourceable olatResource)
Load the course for the given course resourceable |
static PersistingCourseImpl |
openCourseEditSession(java.lang.Long resourceableId)
Loads the course or gets it from cache, and adds it to the courseEditSessionMap. |
static void |
saveCourse(java.lang.Long resourceableId)
Stores the editor tree model AND the run structure (both xml files). |
static void |
saveCourseEditorTreeModel(java.lang.Long resourceableId)
Stores ONLY the editor tree model (e.g. |
static void |
setCourseConfig(java.lang.Long resourceableId,
CourseConfig cc)
Save courseConfig and update cache. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COURSE_EDITOR_LOCK
| Constructor Detail |
|---|
public CourseFactory()
| Method Detail |
|---|
public static MainLayoutController createLaunchController(UserRequest ureq,
WindowControl wControl,
OLATResourceable olatResource,
java.lang.String initialViewIdentifier)
ureq - wControl - olatResource - initialViewIdentifier - if null the default view will be started,
otherwise a controllerfactory type dependant view will be
activated (subscription subtype)
public static Controller createEditorController(UserRequest ureq,
WindowControl wControl,
OLATResourceable olatResource)
ureq - wControl - olatResource -
public static ICourse createEmptyCourse(OLATResourceable ores,
java.lang.String shortTitle,
java.lang.String longTitle,
java.lang.String learningObjectives)
ores - shortTitle - Short title of root nodelongTitle - Long title of root nodelearningObjectives - Learning objectives of root node
public static ICourse loadCourse(java.lang.Long resourceableId)
resourceableId -
public static ICourse loadCourse(OLATResourceable olatResource)
olatResource -
public static void deleteCourse(OLATResourceable res)
res -
public static OLATResourceable copyCourse(OLATResourceable sourceRes,
UserRequest ureq)
sourceRes - ureq -
public static void exportCourseToZIP(OLATResourceable sourceRes,
java.io.File fTargetZIP)
sourceRes - fTargetZIP -
public static ICourse importCourseFromZip(OLATResourceable ores,
java.io.File zipFile)
ores - zipFile -
public static RepositoryEntry deployCourseFromZIP(java.io.File exportedCourseZIPFile,
int access)
exportedCourseZIPFile -
public static Component getDetailsComponent(OLATResourceable res,
UserRequest ureq)
res - ureq -
public static Controller createHelpCourseLaunchController(UserRequest ureq,
WindowControl wControl)
ureq - The user requestwControl - The current window controller
public static void archiveCourse(OLATResourceable res,
java.lang.String charset,
java.util.Locale locale,
Identity identity)
res - charset - locale - identity -
public static void archiveCourse(Identity archiveOnBehalfOf,
ICourse course,
java.lang.String charset,
java.util.Locale locale,
java.io.File exportDirectory,
boolean isOLATAdmin,
boolean... oresRights)
res - charset - locale - identity -
public static java.io.File getOrCreateDataExportDirectory(Identity identity,
java.lang.String courseName)
ureq - The user requestcourseName - The course name or title. Will be used as directory name
public static java.io.File getDataExportDirectory(Identity identity,
java.lang.String courseName)
ureq - The user requestcourseName - The course name or title. Will be used as directory name
public static java.io.File getPersonalDirectory(Identity identity)
The idea of this method is to match the first part of what getOrCreateDataExportDirectory() returns.
identity -
public static java.io.File getOrCreateStatisticDirectory(Identity identity,
java.lang.String courseName)
ureq - The user requestcourseName - The course name or title. Will be used as directory name
public static void saveCourse(java.lang.Long resourceableId)
resourceableId - public static void saveCourseEditorTreeModel(java.lang.Long resourceableId)
resourceableId - public static void fireModifyCourseEvent(java.lang.Long resourceableId)
resourceableId -
public static Controller createDisposedCourseRestartController(UserRequest ureq,
WindowControl wControl,
long resId)
public static CustomCSS getCustomCourseCss(UserSession usess,
CourseEnvironment courseEnvironment)
usess - The user sessioncourseEnvironment - the course environment
public static VFSItem getCourseBaseContainer(java.lang.Long resourceableId)
resourceableId -
public static void setCourseConfig(java.lang.Long resourceableId,
CourseConfig cc)
resourceableId - cc - public static PersistingCourseImpl openCourseEditSession(java.lang.Long resourceableId)
resourceableId -
public static PersistingCourseImpl getCourseEditSession(java.lang.Long resourceableId)
resourceableId -
public static void closeCourseEditSession(java.lang.Long resourceableId,
boolean checkIfAnyAvailable)
resourceableId -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||