org.activemath.webapp.base
Class AppContext

java.lang.Object
  extended by org.activemath.webapp.base.AppContext

public class AppContext
extends Object

Provides access to application-wide configuration context.

View Documentation

This AppContext available to the view as $app. For more info, see:
Variable Description Property
$app.Version Software version of this Activemath installation activemath.version
$app.AvailableCountries List of countries (ISO 3166 alpha-3 codes) app.available.countries
$app.AvailableExerciseStrategies List of exercise strategies exercises.available-strategies
$app.AvailableFields List of available Fields app.available.fields
$app.AvailableFormats List of supported output formats (see Formatter). presentation.supportedFormats
$app.AvailableLanguages List of supported languages messages.defaultLanguage.* (via Localizer)
$app.AvailableLearnerModels List of learner models default: app.learnermodel (via LearnerModelProvider)
$app.AvailableLearningContexts List of learning contexts app.available.learningcontexts
$app.AvailableMediaCompetencies List of media competencies app.available.media-competencies
$app.AvailableScenarios List of scenarios for course generation app.coursegen.scenarios
$app.AvailableSkins List of Skins web.skins (via Skin.availableSkins())
$app.AvailableSurveys List of surveys/questionnaires app.available.surveys
$app.AvailableUserGroups List of user groups, alphabetically sorted. from user database (via UserManager.getUserGroups())
$app.getConfig("propKey) Return value of config property, or empty string if not set. from system
$app.Hostname Name of the physical host.
Don't use in URLs, use $hosturl instead!
from system
$app.MaxUsers Maximum number of concurrent users before logins are blocked app.max_users
$app.hasPermanentLogin Feature permanent login is enabled (auto login via cookie). app.permanent-login.enabled
$app.hasFeedbackButtons Feature user feedback is available (Like/Dislike) app.userfeedback.confirmation
$app.shouldConfirmUserFeedback User must confirm like/dislike feedback app.userfeedback.confirmation
$app.hasAssemblyTool Assembly Tool is enabled app.tools.assembly.enabled
$app.hasCas A CAS is available exercises.cas.command
$app.hasNextbest Nextbest is enabled (obsolete) app.nextbest.enabled
$app.SelfreportEnabled Feature self report is enabled (obsolete, from project LeActiveMath) app.selfreport.enabled
$app.SpeechEnabled Experimental feature speech output is enabled (work of Stefan Nesbigall) app.speech.enabled
$app.hasSiette Siette assessment tool is enabled (obsolete, from LeAM) app.siette.enabled
$app.hasIcmapTool ICMap concept mapping tool is enabled (obsolete) app.tools.icmap.enabled


Field Summary
static String ADMIN_VIEW
          View & tool names (for events like ViewPresentedEvent and ToolStartedEvent)
static String APPLET_VIEW
           
static String ASSEMBLY_TOOL
           
static String BOOK_VIEW
           
static String BOOKINFO_VIEW
           
static String CASCONSOLE_TOOL
           
static String COPYRIGHT_VIEW
           
static String DRCONSOLE_TOOL
           
static String ERROR_VIEW
           
static String EXERCISE_VIEW
           
static String HELP_VIEW
           
static String ICMAP_TOOL
           
protected static Logger log
           
static String LOGIN_VIEW
           
static String LOGOUT_VIEW
           
static String MAINMENU_VIEW
           
static String MASTERY_VIEW
           
static String NOTES_VIEW
           
static String PLANNER_VIEW
           
static String PLOTTER_TOOL
           
static String REPORT_VIEW
           
static String SEARCH_VIEW
           
static String SURVEY_VIEW
           
static String TUTORDIALOGUE_TOOL
           
static String USERDATA_VIEW
           
 
Method Summary
 boolean anonUsageEnabled()
           
 List<String> getAvailableCountries()
           
 List<String> getAvailableExerciseStrategies()
           
 List<Field> getAvailableFields()
           
 List<String> getAvailableFormats()
           
 List<String> getAvailableLanguages()
           
 List<String> getAvailableLearnerModels()
           
 List<LearningContext> getAvailableLearningContexts()
           
 List<String> getAvailableMediaCompetencies()
           
 List<String> getAvailableScenarios()
           
 List<String> getAvailableSkins()
           
 List<String> getAvailableSurveys()
           
 List<UserGroup> getAvailableUserGroups()
           
 String getConfig(String property)
           
 String getHostname()
           
static AppContext getInstance()
           
 int getMaxUsers()
           
 boolean getSelfreportEnabled()
           
 boolean getSpeechEnabled()
           
 String getVersion()
           
 boolean hasAssemblyTool()
           
 boolean hasCas()
           
 boolean hasFeedbackButtons()
           
 boolean hasIcmapTool()
           
 boolean hasNextbest()
           
 boolean hasPdf()
           
 boolean hasPermanentLogin()
           
 boolean hasSiette()
           
 boolean isSpeechEnabled()
           
 boolean shouldConfirmFeedback()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static Logger log

ADMIN_VIEW

public static final String ADMIN_VIEW
View & tool names (for events like ViewPresentedEvent and ToolStartedEvent)

See Also:
Constant Field Values

APPLET_VIEW

public static final String APPLET_VIEW
See Also:
Constant Field Values

BOOK_VIEW

public static final String BOOK_VIEW
See Also:
Constant Field Values

BOOKINFO_VIEW

public static final String BOOKINFO_VIEW
See Also:
Constant Field Values

COPYRIGHT_VIEW

public static final String COPYRIGHT_VIEW
See Also:
Constant Field Values

ERROR_VIEW

public static final String ERROR_VIEW
See Also:
Constant Field Values

EXERCISE_VIEW

public static final String EXERCISE_VIEW
See Also:
Constant Field Values

HELP_VIEW

public static final String HELP_VIEW
See Also:
Constant Field Values

LOGIN_VIEW

public static final String LOGIN_VIEW
See Also:
Constant Field Values

LOGOUT_VIEW

public static final String LOGOUT_VIEW
See Also:
Constant Field Values

MAINMENU_VIEW

public static final String MAINMENU_VIEW
See Also:
Constant Field Values

MASTERY_VIEW

public static final String MASTERY_VIEW
See Also:
Constant Field Values

NOTES_VIEW

public static final String NOTES_VIEW
See Also:
Constant Field Values

PLANNER_VIEW

public static final String PLANNER_VIEW
See Also:
Constant Field Values

SEARCH_VIEW

public static final String SEARCH_VIEW
See Also:
Constant Field Values

SURVEY_VIEW

public static final String SURVEY_VIEW
See Also:
Constant Field Values

USERDATA_VIEW

public static final String USERDATA_VIEW
See Also:
Constant Field Values

REPORT_VIEW

public static final String REPORT_VIEW
See Also:
Constant Field Values

PLOTTER_TOOL

public static final String PLOTTER_TOOL
See Also:
Constant Field Values

CASCONSOLE_TOOL

public static final String CASCONSOLE_TOOL
See Also:
Constant Field Values

DRCONSOLE_TOOL

public static final String DRCONSOLE_TOOL
See Also:
Constant Field Values

ICMAP_TOOL

public static final String ICMAP_TOOL
See Also:
Constant Field Values

ASSEMBLY_TOOL

public static final String ASSEMBLY_TOOL
See Also:
Constant Field Values

TUTORDIALOGUE_TOOL

public static final String TUTORDIALOGUE_TOOL
See Also:
Constant Field Values
Method Detail

getInstance

public static AppContext getInstance()

toString

public String toString()
Overrides:
toString in class Object

getVersion

public String getVersion()

getAvailableCountries

public List<String> getAvailableCountries()

getAvailableLearningContexts

public List<LearningContext> getAvailableLearningContexts()

getAvailableLearnerModels

public List<String> getAvailableLearnerModels()

getAvailableFields

public List<Field> getAvailableFields()

getAvailableMediaCompetencies

public List<String> getAvailableMediaCompetencies()

getAvailableLanguages

public List<String> getAvailableLanguages()

getAvailableSkins

public List<String> getAvailableSkins()

getAvailableFormats

public List<String> getAvailableFormats()

getAvailableExerciseStrategies

public List<String> getAvailableExerciseStrategies()

getAvailableSurveys

public List<String> getAvailableSurveys()

getAvailableScenarios

public List<String> getAvailableScenarios()

getAvailableUserGroups

public List<UserGroup> getAvailableUserGroups()

getSpeechEnabled

public boolean getSpeechEnabled()

isSpeechEnabled

public boolean isSpeechEnabled()

getSelfreportEnabled

public boolean getSelfreportEnabled()

getMaxUsers

public int getMaxUsers()
Returns:
max number of users, if configured, Integer.MAX_VALUE else.

getHostname

public String getHostname()
Returns:
name of localhost (from getLocalHost())

hasNextbest

public boolean hasNextbest()
Returns:
true if nextbest is enabled

hasSiette

public boolean hasSiette()
Returns:
if Siette assessment is configured

hasPdf

public boolean hasPdf()
Returns:
if PDF output is configured

hasCas

public boolean hasCas()
Returns:
if CAS is configured

hasIcmapTool

public boolean hasIcmapTool()
Returns:
if ICMap tool is enabled

hasAssemblyTool

public boolean hasAssemblyTool()
Returns:
if Assembly tool is enabled

hasPermanentLogin

public boolean hasPermanentLogin()
Returns:
if Permanent Login is enabled

anonUsageEnabled

public boolean anonUsageEnabled()
Returns:
if Anon Usage is enabled

hasFeedbackButtons

public boolean hasFeedbackButtons()
Returns:
if UserFeedback buttons are enabled

shouldConfirmFeedback

public boolean shouldConfirmFeedback()
Returns:
if clicking like/dislike should show a confirmation message.

getConfig

public String getConfig(String property)
Returns:
value of config property