|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PaP.UserProfileBase
A UserProfileBase contains a hashtable where UserProfiles of all the users belonging to a Director is added. The class contains methods for adding, retrieving, updating and removing UserProfiles from the base. It also has a method that returns a list of all the UserProfiles in the base in the form of an Item.
Field Summary | |
private java.util.Hashtable |
ht
A hashtable where all the userprofiles are put. |
Constructor Summary | |
UserProfileBase()
Creates a new UserProfileBase. |
Method Summary | |
void |
addUserProfile(UserProfile up)
Adds the specified UserProfile to the UserProfileBase. |
java.util.ArrayList |
getAllUserProfiles()
Returns an ArrayList with all the UserProfile-objects in the UserProfileBase added to it. |
UserProfile |
getUserProfile(java.lang.String username)
Returns the UserProfile with the specified username. |
Item |
listUserProfiles()
Returns all the UserProfiles in the UserProfileBase in the form of an Item. |
void |
removeUserProfile(java.lang.String username)
Removes the UserProfile with the specified username from the UserProfileBase. |
void |
setUserLoggedIn(java.lang.String username,
boolean loggedIn)
Sets the userLoggedIn property of the UserProfile of the user with the specified username to the specified boolean value. |
void |
updateUserProfile(UserProfile up)
Updates the UserProfile with the specified UserProfile's username by removing the current UserProfile and adding itself to the base with the same username. |
boolean |
userProfileExists(java.lang.String username)
Searches through the UserProfileBase to determine if there exists a UserProfile with a username equal to the specified username. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Hashtable ht
Constructor Detail |
public UserProfileBase()
Method Detail |
public void addUserProfile(UserProfile up)
up
- The UserProfile to be added.public java.util.ArrayList getAllUserProfiles()
public UserProfile getUserProfile(java.lang.String username)
username
- The username of the UserProfile to be returned.public Item listUserProfiles()
public void setUserLoggedIn(java.lang.String username, boolean loggedIn)
username
- The username of the user who either logged in or out.loggedIn
- The new value of the loggedIn property.public void removeUserProfile(java.lang.String username)
username
- The username specifying the UserProfile to be removed.public void updateUserProfile(UserProfile up)
up
- The UserProfile to be added to update an existing UserProfile.public boolean userProfileExists(java.lang.String username)
username
- The username of the UserProfile to search for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |