|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.djdoc.servlet.SessionInfo
public class SessionInfo
The instances of the SessionInfo
class are container objects
storing session-wide data such as information about the server (in particular,
the logical name of the web application), the session's User
object,
references to the last accessed Api
and Bunch
objects and
cached lists of the packages and class items last accessed by the user.
Constructor Summary | |
---|---|
SessionInfo(User user,
DjdocRequest req)
Public constructor. |
Method Summary | |
---|---|
java.util.Collection<Bunch> |
getAllBunches()
Collection valued getter method of all available packages in the (last accessed) API of this SessionInfo . |
java.util.Collection<Item> |
getAllItems()
Collection valued getter method of all available class Item s
in the (last accessed) package of this SessionInfo . |
Api |
getApi()
Getter method of the Api object last used by the HTTP session
associated with this SessionInfo . |
java.util.Collection<Api> |
getApiList()
Collection valued getter method of all available APIs. |
Bunch |
getBunch()
Getter method of the Bunch (package) object last used by the
HTTP session associated with this SessionInfo . |
java.util.Collection<Bunch> |
getFavoriteBunches()
Collection valued getter method of the top favorite packages in the (last accessed) API of this SessionInfo . |
java.util.Collection<Item> |
getFavoriteItems()
Collection valued getter method of the top favorite class Item s
in the (last accessed) package of this SessionInfo . |
boolean |
getHasBunchHits()
This method is used to check whether the last accessed API has previously accessed packages or not. |
boolean |
getHasItemHits()
This method is used to check whether the last accessed package has previously accessed class items or not. |
java.util.Collection<Bunch> |
getRecentBunches()
Collection valued getter method of the most recently accessed packages in the (last accessed) API of this SessionInfo . |
java.util.Collection<Item> |
getRecentItems()
Collection valued getter method of the most recently accessed class Item s in the (last accessed) package of this
SessionInfo . |
java.lang.String |
getServerInfo()
Getter method of this SessionInfo 's server info (web
application base URL) string. |
User |
getUser()
Getter method of this SessionInfo 's User object. |
void |
hitBunch(java.lang.String bunchName)
This method causes a package of the last accessed API to be marked as currently accessed. |
void |
hitItem(java.lang.String itemName)
This method causes a class item of the last accessed package to be marked as currently accessed. |
void |
setApiName(java.lang.String apiName)
This method (re)sets the name of the API last accessed in the HTTP session of this SessionInfo . |
void |
setBunchName(java.lang.String bunchName)
This method (re)sets the name of the package last accessed in the HTTP session of this SessionInfo . |
void |
toggleViewPref(byte view)
This method is used to toggle one aspect of the view preference setting of this SessionInfo 's User object between "collapsed"
and "expanded". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionInfo(User user, DjdocRequest req)
DjdocFilter
after creation of the first DjdocRequest
object of the current HTTP session. During construction, the server info
(base URL of the web application) is extracted from the
DjdocRequest
's path.
user
- The User
object associated with this
SessionInfo
req
- The DjdocRequest
object used for initialization
of this SessionInfo
's server infoMethod Detail |
---|
public java.lang.String getServerInfo()
SessionInfo
's server info (web
application base URL) string.
SessionInfo
public User getUser()
SessionInfo
's User
object.
User
object of this SessionInfo
public Api getApi()
Api
object last used by the HTTP session
associated with this SessionInfo
.
Api
object last accessed in the HTTP sessionpublic Bunch getBunch()
Bunch
(package) object last used by the
HTTP session associated with this SessionInfo
.
Bunch
object last accessed in the HTTP sessionpublic void setApiName(java.lang.String apiName)
SessionInfo
. It acts as an "indirect" setter method of
the SessionInfo
's api
property.
apiName
- The name of the SessionInfo
's APIpublic void setBunchName(java.lang.String bunchName)
SessionInfo
. It acts as an "indirect" setter method of
the SessionInfo
's bunch
property.
bunchName
- The name of the SessionInfo
's last accessed
packagepublic java.util.Collection<Api> getApiList()
public boolean getHasBunchHits()
true
if the last accessed API has accessed
packages; false
otherwisepublic java.util.Collection<Bunch> getFavoriteBunches()
SessionInfo
.
public java.util.Collection<Bunch> getRecentBunches()
SessionInfo
.
public java.util.Collection<Bunch> getAllBunches()
SessionInfo
.
public void hitBunch(java.lang.String bunchName)
bunchName
- The name of the package to be accessedpublic boolean getHasItemHits()
true
if the last accessed package has accessed
class items; false
otherwisepublic java.util.Collection<Item> getFavoriteItems()
Item
s
in the (last accessed) package of this SessionInfo
.
Item
spublic java.util.Collection<Item> getRecentItems()
Item
s in the (last accessed) package of this
SessionInfo
.
Item
spublic java.util.Collection<Item> getAllItems()
Item
s
in the (last accessed) package of this SessionInfo
.
Item
spublic void hitItem(java.lang.String itemName)
itemName
- The name of the class item to be accessedpublic void toggleViewPref(byte view)
SessionInfo
's User
object between "collapsed"
and "expanded".
view
- The bit mask specifying which aspect of the user's view
preference settings to toggle
|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |