org.olat.course.nodes
Class AbstractFeedCourseNode

java.lang.Object
  extended by org.olat.core.util.nodes.GenericNode
      extended by org.olat.course.nodes.GenericCourseNode
          extended by org.olat.course.nodes.AbstractFeedCourseNode
All Implemented Interfaces:
java.io.Serializable, ShortName, INode, CourseNode
Direct Known Subclasses:
BlogCourseNode, PodcastCourseNode

public abstract class AbstractFeedCourseNode
extends GenericCourseNode

The podcast course node.

Initial Date: Mar 30, 2009

Author:
gwassmann
See Also:
Serialized Form

Field Summary
static java.lang.String CONFIG_KEY_REPOSITORY_SOFTKEY
           
 
Fields inherited from interface org.olat.course.nodes.CourseNode
DISPLAY_OPTS_CONTENT, DISPLAY_OPTS_TITLE_CONTENT, DISPLAY_OPTS_TITLE_DESCRIPTION_CONTENT
 
Constructor Summary
AbstractFeedCourseNode(java.lang.String type)
           
 
Method Summary
 void archiveNodeData(java.util.Locale locale, ICourse course, java.io.File exportDirectory, java.lang.String charset, java.lang.String type)
           
abstract  TabbableController createEditController(UserRequest ureq, WindowControl wControl, ICourse course, UserCourseEnvironment euce)
          Create a node edit controller for this node to configure node specific features
abstract  NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl control, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, java.lang.String nodecmd)
          Create a course run controller for this node
 void exportNode(java.io.File exportDirectory, ICourse course)
          Export all node user data to the given directory.
 Condition getPreConditionModerator()
           
 Condition getPreConditionPoster()
           
 Condition getPreConditionReader()
           
 RepositoryEntry getReferencedRepositoryEntry()
          used by the publish process to ensure the reference counters for a repository entry are correct.
 Controller importNode(java.io.File importDirectory, ICourse course, boolean unattendedImport, UserRequest ureq, WindowControl wControl, int importType)
           
abstract  StatusDescription isConfigValid()
           
abstract  StatusDescription[] isConfigValid(CourseEditorEnv cev)
          must be implemented in the concrete subclasses as a translator is needed for the errormessages which comes with evaluating condition expressions
 boolean needsReferenceToARepositoryEntry()
           
 void setPreConditionModerator(Condition preConditionModerator)
           
 void setPreConditionPoster(Condition preConditionPoster)
           
 void setPreConditionReader(Condition preConditionReader)
           
 void updateModuleConfigDefaults(boolean isNewNode)
          Update the module configuration to have all mandatory configuration flags set to usefull default values
 
Methods inherited from class org.olat.course.nodes.GenericCourseNode
archiveNodeData, cleanupOnDelete, createInstanceForCopy, createInstanceForCopy, createPeekViewRunController, createPreviewController, eval, explainThisDuringPublish, getConditionExpressions, getDisplayOption, getDisplayOption, getLearningObjectives, getLongTitle, getModuleConfiguration, getNoAccessExplanation, getPreConditionAccess, getPreConditionVisibility, getShortName, getShortTitle, getType, importNode, informOnDelete, setDisplayOption, setLearningObjectives, setLongTitle, setModuleConfiguration, setNoAccessExplanation, setPreConditionVisibility, setShortTitle, setType, toString
 
Methods inherited from class org.olat.core.util.nodes.GenericNode
addChild, findRoot, getChildAt, getChildCount, getIdent, getParent, getPosition, insert, remove, removeAllChildren, removeFromParent, setIdent, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.olat.course.nodes.CourseNode
setIdent
 
Methods inherited from interface org.olat.core.util.nodes.INode
addChild, getChildAt, getChildCount, getIdent, getParent, getPosition, insert, remove, removeAllChildren, removeFromParent, setParent
 

Field Detail

CONFIG_KEY_REPOSITORY_SOFTKEY

public static final java.lang.String CONFIG_KEY_REPOSITORY_SOFTKEY
See Also:
Constant Field Values
Constructor Detail

AbstractFeedCourseNode

public AbstractFeedCourseNode(java.lang.String type)
Parameters:
type -
Method Detail

updateModuleConfigDefaults

public void updateModuleConfigDefaults(boolean isNewNode)
Description copied from class: GenericCourseNode
Update the module configuration to have all mandatory configuration flags set to usefull default values

Specified by:
updateModuleConfigDefaults in interface CourseNode
Overrides:
updateModuleConfigDefaults in class GenericCourseNode
Parameters:
isNewNode - true: an initial configuration is set; false: upgrading from previous node configuration version, set default to maintain previous behaviour This is the workflow: On every click on a entry of the navigation tree, this method will be called to ensure a valid configration of the depending module. This is only done in RAM. If the user clicks on that node in course editor and publishes the course after that, then the updated config will be persisted to disk. Otherwise everything what is done here has to be done once at every course start.
See Also:
GenericCourseNode.updateModuleConfigDefaults(boolean)

createEditController

public abstract TabbableController createEditController(UserRequest ureq,
                                                        WindowControl wControl,
                                                        ICourse course,
                                                        UserCourseEnvironment euce)
Description copied from interface: CourseNode
Create a node edit controller for this node to configure node specific features

Specified by:
createEditController in interface CourseNode
Specified by:
createEditController in class GenericCourseNode
Parameters:
ureq - The user request
wControl - The current window controller
course - The course
euce - the editor user course environment provides syntax/semantic check methods for conditions
Returns:
A tabbable node edit controller
See Also:
AbstractAccessableCourseNode.createEditController(org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl, org.olat.course.ICourse, org.olat.course.run.userview.UserCourseEnvironment)

createNodeRunConstructionResult

public abstract NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq,
                                                                          WindowControl control,
                                                                          UserCourseEnvironment userCourseEnv,
                                                                          NodeEvaluation ne,
                                                                          java.lang.String nodecmd)
Description copied from interface: CourseNode
Create a course run controller for this node

Specified by:
createNodeRunConstructionResult in interface CourseNode
Specified by:
createNodeRunConstructionResult in class GenericCourseNode
Parameters:
ureq - The user request
control - The current window controller
userCourseEnv - The course environment
ne - The node evaluation
Returns:
The node run controller ATTENTION: udpateModuleConfigDefaults(false) should be called inside from the courseNode.createNodeRunConstructionResult(ureq, bwControl, userCourseEnv, nodeEval, nodecmd) to set the course node specific configuration default values!
See Also:
AbstractAccessableCourseNode.createNodeRunConstructionResult(org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl, org.olat.course.run.userview.UserCourseEnvironment, org.olat.course.run.userview.NodeEvaluation, java.lang.String)

isConfigValid

public abstract StatusDescription[] isConfigValid(CourseEditorEnv cev)
Description copied from class: GenericCourseNode
must be implemented in the concrete subclasses as a translator is needed for the errormessages which comes with evaluating condition expressions

Specified by:
isConfigValid in interface CourseNode
Specified by:
isConfigValid in class GenericCourseNode
Returns:
true if the course node configuration is valid for itself and also within the specified course environment.
See Also:
GenericCourseNode.isConfigValid(org.olat.course.editor.CourseEditorEnv)

getReferencedRepositoryEntry

public RepositoryEntry getReferencedRepositoryEntry()
Description copied from interface: CourseNode
used by the publish process to ensure the reference counters for a repository entry are correct. (you can only delete Repositoryentries if there are no references to it) returns exception when called even !needsReferenceToARespositoryEntry return the referenced RepositoryEntry if it can be found return null if the referenced RepositoryEntry could not be found

Returns:
the RepositoryEntry (if it still exists in the repository) which is referenced in this course node if there is a reference, or null otherwise
See Also:
CourseNode.getReferencedRepositoryEntry()

isConfigValid

public abstract StatusDescription isConfigValid()
Returns:
true if the course node configuration is correct without the course context.
See Also:
CourseNode.isConfigValid()

needsReferenceToARepositoryEntry

public boolean needsReferenceToARepositoryEntry()
Returns:
true if this node type potentially has a repository entry reference, false otherwhise. Attention: this method does not test if ther is actually such a reference. Use getReferencedRepository() to get this information.
See Also:
CourseNode.needsReferenceToARepositoryEntry()

getPreConditionModerator

public Condition getPreConditionModerator()
Returns:
Returns the preConditionModerator.

setPreConditionModerator

public void setPreConditionModerator(Condition preConditionModerator)
Parameters:
preConditionModerator - The preConditionModerator to set.

getPreConditionPoster

public Condition getPreConditionPoster()
Returns:
Returns the preConditionPoster.

setPreConditionPoster

public void setPreConditionPoster(Condition preConditionPoster)
Parameters:
preConditionPoster - The preConditionPoster to set.

getPreConditionReader

public Condition getPreConditionReader()
Returns:
Returns the preConditionReader.

setPreConditionReader

public void setPreConditionReader(Condition preConditionReader)
Parameters:
preConditionReader - The preConditionReader to set.

exportNode

public void exportNode(java.io.File exportDirectory,
                       ICourse course)
Description copied from interface: CourseNode
Export all node user data to the given directory. This might be one file or multiple files depending on what data is available. The archived data is intendet to be imported again if the course this node is attached to gets imported.

Specified by:
exportNode in interface CourseNode
Overrides:
exportNode in class GenericCourseNode
Parameters:
exportDirectory - The directory where the exported files should be put. This directory must exist prior to calling this method.
See Also:
GenericCourseNode.exportNode(java.io.File, org.olat.course.ICourse)

importNode

public Controller importNode(java.io.File importDirectory,
                             ICourse course,
                             boolean unattendedImport,
                             UserRequest ureq,
                             WindowControl wControl,
                             int importType)
See Also:
org.olat.course.nodes.GenericCourseNode#importNode(java.io.File, org.olat.course.ICourse, org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)

archiveNodeData

public void archiveNodeData(java.util.Locale locale,
                            ICourse course,
                            java.io.File exportDirectory,
                            java.lang.String charset,
                            java.lang.String type)
See Also:
GenericCourseNode.archiveNodeData(java.util.Locale, org.olat.course.ICourse, java.io.File, java.lang.String)