org.activemath.webapp.view.beans
Class UserItem

java.lang.Object
  extended by org.activemath.webapp.view.beans.SimpleBean
      extended by org.activemath.webapp.view.beans.LinkedBean
          extended by 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:


Constructor Summary
UserItem(Item item, User user, String lang)
           
 
Method Summary
 Map getCopyrightData()
           
 String getDifficulty()
           
 String getFlavoredItemId(String flavor)
           
 Map getFlavorMap()
           
 Set getFlavors()
           
 String getForId()
           
 List getForIds()
           
 boolean getIsDynamic()
           
 Item getItem()
           
 int getMastery()
           
 Metadata getMetadata()
           
 Collection getMyFlavors()
           
 String getOmdocTag()
           
 String getOmdocType()
           
 String getTag()
           
 String getTheoryId()
           
 String getTitle()
           
 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.
 Map<String,String> getTitles()
           
 boolean hasFlavors()
           
 boolean isDynamic()
           
 boolean isInteractive()
           
 boolean isStartable()
           
 void setAppSession(AppSession appSession)
           
 void setItem(Item item)
           
 void setMastery(int mastery)
           
 void setTitle(String value)
           
 
Methods inherited from class org.activemath.webapp.view.beans.LinkedBean
getChildren, setChildren
 
Methods inherited from class org.activemath.webapp.view.beans.SimpleBean
compareTo, getId, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserItem

public UserItem(Item item,
                User user,
                String lang)
Method Detail

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