org.activemath.tutor.control
Class BookGenerator
java.lang.Object
org.activemath.tutor.control.BookGenerator
public class BookGenerator
- extends Object
Generate a book with help of course generator.
BOOKGENERATOR_KEY
public static final String BOOKGENERATOR_KEY
- See Also:
- Constant Field Values
exception
protected Exception exception
book
protected Book book
tutorialControl
protected TutorialControl tutorialControl
BookGenerator
public BookGenerator(String userId,
String bookId)
toString
public String toString()
- Overrides:
toString in class Object
getProgress
public int getProgress()
- Returns:
- planning progress (0-100)
getException
public Exception getException()
getStatus
protected int getStatus()
run
public void run()
getUserId
public String getUserId()
getBookId
public String getBookId()
getTitle
public String getTitle()
setTitle
public void setTitle(String string)
getDescription
public String getDescription()
setDescription
public void setDescription(String string)
getGroupingName
public String getGroupingName()
setGroupingName
public void setGroupingName(String string)
getGrouping
public String getGrouping()
setGrouping
public void setGrouping(String string)
getScenario
public String getScenario()
setScenario
public void setScenario(String string)
getGoals
public String[] getGoals()
setChaptersOnly
public void setChaptersOnly(boolean b)
getChaptersOnly
public boolean getChaptersOnly()
setGoals
public void setGoals(String[] strings)
getBook
public Book getBook()
- Get the book object of the planned book.
This method will clear the reference to the book once it has been fetched
successfully in order to avoid possible memory leaks.
- Returns:
- the newly created book, or
null if still planning.
- Throws:
IllegalStateException - if book has already been fetched.
getSessionId
public String getSessionId()
- Returns:
- Returns the sessionId.
setSessionId
public void setSessionId(String sessionId)
- Parameters:
sessionId - The sessionId to set.
setInitialWorldState
public void setInitialWorldState(Map initialWorldState)
- Parameters:
initialWorldState - the initialWorldState to set
getInitialWorldState
public Map getInitialWorldState()
- Returns:
- the initialWorldState