|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.figure8.join.control.UserContainer
public class UserContainer
Used to store information about a specific user. This class is used so that the information is not scattered throughout the HttpSession. Only this object is stored in the session for the user. This class implements the HttpSession BindingListener so that it can be notified of session timeoutand perform cleanup.
Constructor Summary | |
---|---|
UserContainer()
Creates a new instance of UserContainer |
Method Summary | |
---|---|
protected void |
cleanup()
Cleanup any opened resources |
UserView |
getView()
|
boolean |
isUserInRole(Role role)
Check if user has the required role. |
boolean |
isUserInRoleForResource(Role role,
java.lang.Object resource)
Check if user has the required role for given resource. |
void |
setView(UserView view)
|
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
The container calls this method when this object is being bound to the user's session. |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
The container calls this method when this object is being unbound from the user's session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserContainer()
Method Detail |
---|
public UserView getView()
public void setView(UserView view)
view
- The user view to associate with containerpublic boolean isUserInRole(Role role)
role
- Security role the user should endorse
public boolean isUserInRoleForResource(Role role, java.lang.Object resource)
role
- Security role the user should endorseresource
- Resource that user has to be granted to for the role
protected void cleanup()
public void valueBound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
httpSessionBindingEvent
- The binding event raised by servlet containerpublic void valueUnbound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
httpSessionBindingEvent
- The binding event raised by servlet container
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |