org.olat.course.editor
Interface CourseEditorEnv

All Known Implementing Classes:
CourseEditorEnvImpl

public interface CourseEditorEnv

Description:
The course environment used when working in the course editor. Provides some methods to help all the validation and consistency checking code

Initial Date: Jul 6, 2005

Author:
patrick

Method Summary
 void addSoftReference(java.lang.String category, java.lang.String softReference)
           
 boolean existsArea(java.lang.String areaname)
           
 boolean existsGroup(java.lang.String groupname)
           
 boolean existsNode(java.lang.String nodeId)
           
 boolean existsRightGroup(java.lang.String groupname)
           
 CourseGroupManager getCourseGroupManager()
          Return CourseGroupManager for this course environment.
 StatusDescription[] getCourseStatus()
          lists problems and errors of the course at the very moment.
 java.lang.String getCurrentCourseNodeId()
           
 java.util.Locale getEditorEnvLocale()
          the locale of the editor environment to have the facility of providing localized messages within the course editor environment.
 java.util.List getReferencingNodeIdsFor(java.lang.String ident)
           
 boolean isAssessable(java.lang.String nodeId)
          checks for an existing node id if the underlying course node is assessable, e.g.
 boolean isEnrollmentNode(java.lang.String nodeId)
          check if the given node is of type enrollment
 java.util.Set<java.lang.String> listCycles()
          The specified visibility, accessability and score rules defined for a course node reference other couse nodes ids.
 void pushError(java.lang.Exception e)
           
 void setConditionInterpreter(ConditionInterpreter ci)
           
 void setCurrentCourseNodeId(java.lang.String courseNodeId)
           
 ConditionErrorMessage[] validateConditionExpression(ConditionExpression condExpr)
          validates the condition expression within the condition interpreter.
 void validateCourse()
          after calling validate course, the course is checked for condition and configuration errors.
 

Method Detail

isAssessable

boolean isAssessable(java.lang.String nodeId)
checks for an existing node id if the underlying course node is assessable, e.g. if it makes sense to be used in certain condition functions

Parameters:
nodeId -
Returns:

existsNode

boolean existsNode(java.lang.String nodeId)
Parameters:
nodeId -
Returns:

existsGroup

boolean existsGroup(java.lang.String groupname)
Parameters:
groupname -
Returns:

existsRightGroup

boolean existsRightGroup(java.lang.String groupname)

existsArea

boolean existsArea(java.lang.String areaname)
Parameters:
areaname -
Returns:

getCurrentCourseNodeId

java.lang.String getCurrentCourseNodeId()
Returns:

setCurrentCourseNodeId

void setCurrentCourseNodeId(java.lang.String courseNodeId)
Parameters:
courseNodeId -

setConditionInterpreter

void setConditionInterpreter(ConditionInterpreter ci)
Parameters:
ci -

getEditorEnvLocale

java.util.Locale getEditorEnvLocale()
the locale of the editor environment to have the facility of providing localized messages within the course editor environment.

Returns:
Locale of editor environment

validateConditionExpression

ConditionErrorMessage[] validateConditionExpression(ConditionExpression condExpr)
validates the condition expression within the condition interpreter. If the condition expression is syntactically and semantically correct the method returns true, false otherwise.

The valid soft references found are accessible via the condition expression, and also the complete error summary for the condition expression.

Parameters:
condExpr -
Returns:

pushError

void pushError(java.lang.Exception e)
Parameters:
e -

addSoftReference

void addSoftReference(java.lang.String category,
                      java.lang.String softReference)
Parameters:
category -
softReference -

validateCourse

void validateCourse()
after calling validate course, the course is checked for condition and configuration errors. These validation messages are accessible via CourseEditorEnv


getCourseStatus

StatusDescription[] getCourseStatus()
lists problems and errors of the course at the very moment. Should be called after validateCourse and before a next click in the course editor.

Returns:

getReferencingNodeIdsFor

java.util.List getReferencingNodeIdsFor(java.lang.String ident)
Parameters:
ident -
Returns:
list of nodes referencing the specified node

isEnrollmentNode

boolean isEnrollmentNode(java.lang.String nodeId)
check if the given node is of type enrollment

Parameters:
nodeId -
Returns:

listCycles

java.util.Set<java.lang.String> listCycles()
The specified visibility, accessability and score rules defined for a course node reference other couse nodes ids. This references together with the course tree structure build a directed graph. An important precondition for publishing changes is the cycle freeness of this directed graph.

Returns:

getCourseGroupManager

CourseGroupManager getCourseGroupManager()
Return CourseGroupManager for this course environment.

Returns:
CourseGroupManager for this course environment