org.activemath.webapp.view.beans
Class UserItem
java.lang.Object
org.activemath.webapp.view.beans.SimpleBean
org.activemath.webapp.view.beans.LinkedBean
org.activemath.webapp.view.beans.UserItem
- All Implemented Interfaces:
- Comparable
- Direct Known Subclasses:
- UserExerciseItem, UserTheoryItem
public class UserItem
- extends LinkedBean
This bean provides a personalized content Item.
It's a wrapper for @link org.activemath.content.Item
Additionally to Item, it offers:
- item title localized to user language
- user's mastery of this item
- flavor functions
UserItem
public UserItem(Item item,
User user,
String lang)
getTag
public String getTag()
setTitle
public void setTitle(String value)
- Overrides:
setTitle in class SimpleBean
getTitle
public String getTitle()
- Overrides:
getTitle in class SimpleBean
getMastery
public int getMastery()
setMastery
public void setMastery(int mastery)
getItem
public Item getItem()
setItem
public void setItem(Item item)
hasFlavors
public boolean hasFlavors()
getMyFlavors
public Collection getMyFlavors()
getFlavors
public Set getFlavors()
getFlavorMap
public Map getFlavorMap()
getFlavoredItemId
public String getFlavoredItemId(String flavor)
getTitles
public Map<String,String> getTitles()
getOmdocTag
public String getOmdocTag()
getOmdocType
public String getOmdocType()
getTheoryId
public String getTheoryId()
getForId
public String getForId()
getForIds
public List getForIds()
getCopyrightData
public Map getCopyrightData()
getDifficulty
public String getDifficulty()
getMetadata
public Metadata getMetadata()
setAppSession
public void setAppSession(AppSession appSession)
getIsDynamic
public boolean getIsDynamic()
isDynamic
public boolean isDynamic()
isInteractive
public boolean isInteractive()
isStartable
public boolean isStartable()
getTitleForSession
public String getTitleForSession()
- Returns the title of the item in the expected
language (or languages) registered in the session
or, at worst, the item id-name.
- Returns:
- a non-empty string