DJDoc v.1.0.0b-1

net.sf.djdoc.app
Class SameUserStrategy

java.lang.Object
  extended by net.sf.djdoc.app.UserStrategy
      extended by net.sf.djdoc.app.SameUserStrategy

public class SameUserStrategy
extends UserStrategy

The SameUserStrategy class is the most basic implementation of the UserStrategy class. It assumes that the web application is used by just one user (or that the preference settings and hit history may be identical for all users).


Constructor Summary
SameUserStrategy()
           
 
Method Summary
 User authenticate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This implementation of the abstract UserStrategy.authenticate(HttpServletRequest, HttpServletResponse) method always returns an (existing or new) User with the name 1.
 
Methods inherited from class net.sf.djdoc.app.UserStrategy
findUserInDatabase, getStrategy, retrieveUserNameFromCookie, setup, storeUserNameInCookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SameUserStrategy

public SameUserStrategy()
Method Detail

authenticate

public User authenticate(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res)
This implementation of the abstract UserStrategy.authenticate(HttpServletRequest, HttpServletResponse) method always returns an (existing or new) User with the name 1.

Specified by:
authenticate in class UserStrategy
Parameters:
req - The current HTTP request object
res - The current HTTP response object
Returns:
An existing (or a new) User object (named 1)

DJDoc v.1.0.0b-1