|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectblather.controller.UserController
public class UserController
UserController provides a mechanism to access and update details of an individual Blather user.
| Constructor Summary | |
|---|---|
UserController(BlatherUserInterface user,
java.lang.String sessionID,
UserDB udb,
SessionDB sdb)
Creates a new UserController with the given BlatherUser and the given session ID. |
|
| Method Summary | |
|---|---|
boolean |
changeEmail(java.lang.String newEmail)
Changes this user's profile email address. |
BlabInterface[] |
getAllBlabs()
Returns an array consisting of all of this user's blabs, sorted in reverse chronological order. |
BlabInterface[] |
getAllFriendBlabs()
Returns an array consisting of all of this user's friends' blabs, sorted in reverse chronological order. |
java.lang.String |
getEmail()
If this UserController's session ID is valid, return a string representation of this user's full email address. |
BlatherUserInterface[] |
getFriends()
Returns an array of this user's friends. |
BlabInterface[] |
getSomeBlabs(int howMany)
Returns an array consisting of some of this user's blabs, sorted in reverse chronological order. |
BlabInterface[] |
getSomeFriendBlabs(int howMany)
Returns an array consisting of some of this user's friends' blabs, sorted in reverse chronological order. |
java.lang.String |
getUsername()
Returns this user's username. |
boolean |
newBlab(java.lang.String blabContent)
Creates a new blab for this user with the given content, with a timestamp of now, and adds this blab to the list of user blabs. |
boolean |
newFriend(java.lang.String username)
Adds a friend to the list of users that this user is tracking. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserController(BlatherUserInterface user,
java.lang.String sessionID,
UserDB udb,
SessionDB sdb)
user - the user we'd like to accesssessionID - the session ID of the user who is currently accessing the applicationudb - the UserDB from the AppControllersdb - the SessionDB from the AppController| Method Detail |
|---|
public BlabInterface[] getAllBlabs()
UserControllerInterface
getAllBlabs in interface UserControllerInterfacepublic BlabInterface[] getSomeBlabs(int howMany)
UserControllerInterface
getSomeBlabs in interface UserControllerInterfacehowMany - the number of blabs to put in the array, starting with the most recent
public BlabInterface[] getAllFriendBlabs()
UserControllerInterface
getAllFriendBlabs in interface UserControllerInterfacepublic BlabInterface[] getSomeFriendBlabs(int howMany)
UserControllerInterface
getSomeFriendBlabs in interface UserControllerInterfacehowMany - the number of blabs to put in the array, starting with the most recent
public boolean changeEmail(java.lang.String newEmail)
UserControllerInterface
changeEmail in interface UserControllerInterfacepublic boolean newBlab(java.lang.String blabContent)
UserControllerInterface
newBlab in interface UserControllerInterfacepublic boolean newFriend(java.lang.String username)
UserControllerInterface
newFriend in interface UserControllerInterfacepublic java.lang.String getUsername()
UserControllerInterface
getUsername in interface UserControllerInterfacepublic java.lang.String getEmail()
UserControllerInterface
getEmail in interface UserControllerInterfacepublic BlatherUserInterface[] getFriends()
UserControllerInterface
getFriends in interface UserControllerInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||