blather.model
Interface BlatherUserInterface

All Known Implementing Classes:
BlatherUser

public interface BlatherUserInterface


Field Summary
static long serialVersionUID
           
 
Method Summary
 void addBlab(BlabInterface b)
          Creates a new blab for this user.
 void addFriend(BlatherUserInterface newFriend)
          Adds a new friend, so that this BlatherUser will be tracking the blabs of newFriend.
 int blabCount()
          Returns the number of blabs this user has posted.
 boolean checkPassword(java.lang.String password)
          Returns true if the given password is correct for this BlatherUser, false otherwise.
 int friendCount()
          Returns the number of BlatherUsers this user has befriended.
 BlabInterface[] getAllBlabs()
          Returns a copy of the array of all Blabs authored by this user.
 BlabInterface getBlab(int id)
          Returns this user's blab with the given identifier.
 EmailAddressInterface getEmail()
          Returns this BlatherUser's email address
 BlatherUserInterface getFriend(int id)
          Returns a BlatherUser corresponding to this user's friend with friend identifier id.
 java.lang.String getUsername()
          Returns this BlatherUser's username (that is, his or her display name).
 void setEmail(EmailAddressInterface email)
          Updates this BlatherUser's email address.
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

getUsername

java.lang.String getUsername()
Returns this BlatherUser's username (that is, his or her display name).

Returns:
this BlatherUser's username

getEmail

EmailAddressInterface getEmail()
Returns this BlatherUser's email address

Returns:

setEmail

void setEmail(EmailAddressInterface email)
Updates this BlatherUser's email address.

Parameters:
email -

checkPassword

boolean checkPassword(java.lang.String password)
Returns true if the given password is correct for this BlatherUser, false otherwise.

Parameters:
password -
Returns:

friendCount

int friendCount()
Returns the number of BlatherUsers this user has befriended.

Returns:

getFriend

BlatherUserInterface getFriend(int id)
Returns a BlatherUser corresponding to this user's friend with friend identifier id. Precondition: id is greater than or equal to 0 and strictly less than this.friendCount()

Parameters:
id - the id number of the friend to return

addFriend

void addFriend(BlatherUserInterface newFriend)
Adds a new friend, so that this BlatherUser will be tracking the blabs of newFriend.

Parameters:
newFriend -

blabCount

int blabCount()
Returns the number of blabs this user has posted.

Returns:

getBlab

BlabInterface getBlab(int id)
Returns this user's blab with the given identifier.

Parameters:
id -
Returns:

addBlab

void addBlab(BlabInterface b)
Creates a new blab for this user.

Parameters:
b -

getAllBlabs

BlabInterface[] getAllBlabs()
Returns a copy of the array of all Blabs authored by this user.

Returns:
Returns a copy of the array of all Blabs authored by this user.