Project 3
A C D F G I L N P R S U V W

A

addNewsCategory(String) - Method in class cscie259.project3.wahoo.User
Add a news category to the preferred list, if it not already in the list.
addUser(String, String) - Static method in class cscie259.project3.wahoo.UserManager
Adds a new user using the given username and password.
addUserImpl(String, String) - Method in class cscie259.project3.wahoo.UserManager
Adds a new user using the supplied username and password.

C

categoriesXML_ - Variable in class cscie259.project3.wahoo.Prefs
a cached copy of the categories XML file
context_ - Variable in class cscie259.project3.wahoo.UserManager
a reference to the servlet context
cscie259.project3.wahoo - package cscie259.project3.wahoo
 
curUser_ - Variable in class cscie259.project3.wahoo.UserManager.UserReader
 

D

displayLoginForm(HttpServletRequest, HttpServletResponse, String) - Method in class cscie259.project3.wahoo.Login
Displays the login form, with an optional error string.
doGet(HttpServletRequest, HttpServletResponse) - Method in class cscie259.project3.wahoo.WahooServlet
Responds to GETs in the same manner as POSTs.
doPost(HttpServletRequest, HttpServletResponse) - Method in class cscie259.project3.wahoo.WahooServlet
Responds to POSTs in the same manner as GETs.
doWork(HttpServletRequest, HttpServletResponse) - Method in class cscie259.project3.wahoo.Login
Presents user with login screen and processes login attempts and account creations.
doWork(HttpServletRequest, HttpServletResponse) - Method in class cscie259.project3.wahoo.Prefs
Displays and processes the preferences form; if user attempts to execute this servlet before user's authenticated (via the login servlet), should redirect user to login servlet.
doWork(HttpServletRequest, HttpServletResponse) - Method in class cscie259.project3.wahoo.View
Displays the current user's main view; if user attempts to execute this servlet before user's authenticated (via the login servlet), should redirect user to login servlet.
doWork(HttpServletRequest, HttpServletResponse) - Method in class cscie259.project3.wahoo.WahooServlet
To be implemented by descendants, handles GETs and POSTs identically.

F

forward(HttpServletRequest, HttpServletResponse, String) - Method in class cscie259.project3.wahoo.WahooServlet
Used to forward the request and response objects to another servlet (whose path is of the form "/servlet/foo") for processing.

G

getHeadlines(String) - Static method in class cscie259.project3.wahoo.NewsProvider
Returns an XML representation of the headlines for a given category.
getNewsCategories() - Method in class cscie259.project3.wahoo.User
Get the user's preferred news categories.
getPassword() - Method in class cscie259.project3.wahoo.User
Get the password for this user.
getUser(String) - Static method in class cscie259.project3.wahoo.UserManager
Returns a User object for given username or null if one is not found.
getUserImpl(String) - Method in class cscie259.project3.wahoo.UserManager
Returns a User object for given username or null if one is not found.
getUserName() - Method in class cscie259.project3.wahoo.User
Get the username for this user.

I

init() - Method in class cscie259.project3.wahoo.Prefs
Called automatically by servlet container; initializes the servlet and the categories list.
init(ServletContext) - Static method in class cscie259.project3.wahoo.UserManager
Must be called (e.g., by Login's init() method) once before using any other method in class.
init() - Method in class cscie259.project3.wahoo.WahooServlet
Common initialization tasks for this group of servlets.
instance() - Static method in class cscie259.project3.wahoo.UserManager
Returns the one and only instance of this class, throwing an exception if it has not been initialized.
instance_ - Static variable in class cscie259.project3.wahoo.UserManager
a reference to the one and only instance of this class

L

Login - Class in cscie259.project3.wahoo
This servlet logs the user into the Wahoo portal.
Login() - Constructor for class cscie259.project3.wahoo.Login
 

N

newsCategories_ - Variable in class cscie259.project3.wahoo.User
 
NewsProvider - Class in cscie259.project3.wahoo
This class gets news headlines by connecting to Moreover.
NewsProvider() - Constructor for class cscie259.project3.wahoo.NewsProvider
Default constructor is private so that this utility class cannot be instantiated.

P

password_ - Variable in class cscie259.project3.wahoo.User
 
Prefs - Class in cscie259.project3.wahoo
This servlet displays personalized preferences in the Wahoo portal.
Prefs() - Constructor for class cscie259.project3.wahoo.Prefs
 

R

readUsers(InputStream) - Method in class cscie259.project3.wahoo.UserManager
Read the user info from the input stream.
redirect(HttpServletResponse, String) - Method in class cscie259.project3.wahoo.WahooServlet
Used to redirect the user to another url (or servlet in the same container), without preserving the current HttpServletRequest object.
removeNewsCategory(String) - Method in class cscie259.project3.wahoo.User
Removes a news category to the preferred list if it is on the list.

S

save() - Static method in class cscie259.project3.wahoo.UserManager
Saves the information about all users to the information database (stored as a file).
setNewsCategories(List<String>) - Method in class cscie259.project3.wahoo.User
Saves the user's preferred news categories, overwriting previous settings.
startElement(String, String, String, Attributes) - Method in class cscie259.project3.wahoo.UserManager.UserReader
SAX handler for elements

U

User - Class in cscie259.project3.wahoo
This class represents a single user of the Wahoo portal.
User(String, String) - Constructor for class cscie259.project3.wahoo.User
Creates a new User object, recording user's name and a password.
UserManager - Class in cscie259.project3.wahoo
This class keeps track of users of the Wahoo portal by writing out information to an xml file.
UserManager(ServletContext) - Constructor for class cscie259.project3.wahoo.UserManager
A constructor that reads the user DB from an input stream.
UserManager.UserReader - Class in cscie259.project3.wahoo
An inner class which is the SAX2 handler used to read the user XML file into Java objects.
UserManager.UserReader() - Constructor for class cscie259.project3.wahoo.UserManager.UserReader
 
username_ - Variable in class cscie259.project3.wahoo.User
 
users_ - Variable in class cscie259.project3.wahoo.UserManager
a hash table of all users

V

View - Class in cscie259.project3.wahoo
This servlet displays the main personalized view in the Wahoo portal.
View() - Constructor for class cscie259.project3.wahoo.View
 

W

WahooServlet - Class in cscie259.project3.wahoo
Base class for Wahoo's servlets.
WahooServlet() - Constructor for class cscie259.project3.wahoo.WahooServlet
 
writeUsers() - Method in class cscie259.project3.wahoo.UserManager
Writes users info to the config file, overwriting old contents.

A C D F G I L N P R S U V W
Project 3