org.activemath.content.items
Class DynamicItemDynamicTask
java.lang.Object
org.activemath.content.items.Item
org.activemath.content.items.DynamicItem
org.activemath.content.items.DynamicItemDynamicTask
- All Implemented Interfaces:
- Serializable
public class DynamicItemDynamicTask
- extends DynamicItem
Dynamic Item for dynamic dynamicTask.
This Class do sth different than other
Dynamic Item Class. Here we call the method executeDynamicItem(), which
substitute the old OJElement OJDynamicItem object with a list of mbase
References. Details are descripted by Javadoc of method. In this Class we don't
overwrite any method of it's super-super class Item, because after
instanciating(performed executeDynamicItem()) there's no more nessesary to
store this Object in ContentManager and this Object exists no more.
Note: It's dangerous to try to call any herited method like getTextualDOM() to this
Object.
- See Also:
- Serialized Form
|
Field Summary |
protected static String |
TYPE
This might be defined by OJConstants, because in JShopUtil this is
defined again. |
| Fields inherited from class org.activemath.content.items.Item |
copyrights, dependsOn, factory, flavorSet, forId, forIds, id, mbaseId, metadata, omdocTag, omdocType, relatedTo, relationsIn, relationsOut, shouldUseTitleFromID, theoryId, title, titles |
| Methods inherited from class org.activemath.content.items.DynamicItem |
getCopyrightData, getCopyrightElement, getForId, getForIds, getIncomingRelations, getMetadata, getMetadataElement, getOutgoingRelations, getQueryName, getQueryParameters, getReferences, getSerializedNumber, getServiceName, getTitles, getType, hasFlavors, initQueryParameters, isLazyTask, isNLGText, isServiceCall, isText, setLink, toOJDynamicItem, toString |
| Methods inherited from class org.activemath.content.items.Item |
equals, getDependsOn, getDifficulty, getFlavorSet, getFullDOM, getId, getMBaseId, getOmdocTag, getOmdocType, getRelatedTo, getSystemId, getTheoryId, getTitle, getTitle, getTitle, getTitles, hashCode, setUseTitleFromID |
TYPE
protected static final String TYPE
- This might be defined by OJConstants, because in JShopUtil this is
defined again.
- See Also:
- Constant Field Values
instanciateDynamicItem
public List instanciateDynamicItem(String userId)
- This method execute the dynamicTask.
A list of mbase references will be
created and these will be written to
OJDocument instead of
the original dynamic-item. Since this method is called, the OJDocument
will be changed and the new one will stay persistently.
- Specified by:
instanciateDynamicItem in class DynamicItem
- Parameters:
userId - - may be null
- Returns:
- a list of mbaseIds as a result from course generator. if there's
no result gained from course generator then a log error will be
output to the activemath.log and we return null.
getBookId
public String getBookId()
getTextualDOM
public OJElement getTextualDOM()
- see javadoc for this class
- Overrides:
getTextualDOM in class Item
- Returns:
- this item in its textual DOM representation, or
null if there is
a problem.
getNumWords
public int getNumWords()
- Overrides:
getNumWords in class Item
initTitles
public void initTitles(String userId)
- Specified by:
initTitles in class DynamicItem