|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.security.session.manager.helpers.LocationTreeWrapper org.security.session.manager.helpers.UserLocationTree
public class UserLocationTree
Extends LocationTreeWrapper
to add a Set
of User
s to
each node in the tree.
In addition it manages the Allocation and Deallocation of users in the Location
tree.
Field Summary |
---|
Fields inherited from class org.security.session.manager.helpers.LocationTreeWrapper |
---|
loc |
Constructor Summary | |
---|---|
UserLocationTree(Location l)
Model the given Location . |
Method Summary | |
---|---|
void |
addUser(User u)
Add a single User to this Location . |
Set<User> |
allocateUser(User u)
Allocate a user in the Location tree, this means the user is logically
located in all of the parent locations of this location. |
Set<User> |
deallocateUser(User u)
Remove the User from the whole Location tree. |
UserLocationTree |
getMaxUser(User u)
Calculate the uppermost Location in which the User is alone. |
Set<User> |
getUserSet()
The user set is stored as a List in the actual Location
instance, so this methods helps reformat that into a Set . |
void |
setUserSet(Set<User> users)
Complement to getUserSet() . |
Methods inherited from class org.security.session.manager.helpers.LocationTreeWrapper |
---|
equals, getChildren, getLocation, getParent, getRoot, isRoot |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserLocationTree(Location l)
Location
.
l
- Method Detail |
---|
public Set<User> getUserSet()
List
in the actual Location
instance, so this methods helps reformat that into a Set
.
public void setUserSet(Set<User> users)
getUserSet()
.
users
- public void addUser(User u)
User
to this Location
.
u
- public Set<User> deallocateUser(User u)
User
from the whole Location
tree.
There may be users affected by this movement, since they might be alone now
that the other user is deallocated.
u
- the user to be removed.
Set
of User
s affected.public Set<User> allocateUser(User u)
Location
tree, this means the user is logically
located in all of the parent locations of this location.
But all children locations must be marked too.
u
- the allocated user.
User
s by this allocation.public UserLocationTree getMaxUser(User u)
Location
in which the User
is alone.
u
-
UserLocationTree
where the user is alone,
null if it is not in the location tree, or she/he is not alone anywhere.
TODO add delegation logic here.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |