Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.om.security
Interface User

All Superinterfaces:
  EventListener, javax.servlet.http.HttpSessionBindingListener, SecurityEntity, Serializable

All Known Implementing Classes:
  ActiveDirectoryUser, LDAPUser, TorqueUser, TurbineUser

    public interface User

extends javax.servlet.http.HttpSessionBindingListener, Serializable, SecurityEntity

This interface represents functionality that all users of the Turbine system require.

Version:
  $Id: User.java 1073174 2011-02-21 22:18:45Z tv $
Author:
  Frank Y. Kim, John D. McNally, Jon S. Stevens, Craig D. Berry, Henning P. Schmiedehausen

Field Summary
`static String` | `ACCESS_COUNTER` The 'perm storage' key name for the access counter.
`static String` | `CONFIRM_DATA` This is the value that is stored in the database for confirmed users
`static String` | `CONFIRM_VALUE` The 'perm storage' key for the confirm_value field.
`static String` | `EMAIL` The 'perm storage' key for the email field.
`static String` | `FIRST_NAME` The 'perm storage' key name for the first name.
`static String` | `HAS_LOGGED_IN` The 'temp storage' key name for the 'has logged in' flag
`static String` | `LAST_LOGIN` The 'perm storage' key name for the last_login field.
`static String` | `LAST_NAME` The 'perm storage' key name for the last name.
`static String` | `PASSWORD` The 'perm storage' key name for the password field.
`static String` | `SESSION_ACCESS_COUNTER` The 'temp storage' key name for the session access counter
`static String` | `SESSION_KEY` The session key for the User object.
`static String` | `USERNAME` The 'perm storage' key name for the username field.

Method Summary
`int` | `getAccessCounter()` Gets the access counter for a user from perm storage.
`int` | `getAccessCounterForSession()` Gets the access counter for a user during a session.
`String` | `getConfirmed()` Gets the confirmation value.
`Date` | `getCreateDate()` Gets the create date for this User.
`String` | `getEmail()` Returns the email address for this user.
`String` | `getFirstName()` Returns the first name for this user.
`Date` | `getLastAccessDate()` Gets the last access date for this User.
`Date` | `getLastLogin()` Returns the user's last login date.
`String` | `getLastName()` Returns the last name for this user.
`String` | `getPassword()` Returns the user's password.
`Object` | `getPerm(String name)` Get an object from permanent storage.
`Object` | `getPerm(String name, Object def)` Get an object from permanent storage; return default if value is null.
`Hashtable<String,Object>` | `getPermStorage()` This should only be used in the case where we want to save the data to the database.
`Object` | `getTemp(String name)` Get an object from temporary storage.
`Object` | `getTemp(String name, Object def)` Get an object from temporary storage; return default if value is null.
`Hashtable<String,Object>` | `getTempStorage()` This should only be used in the case where we want to save the data to the database.
`boolean` | `hasLoggedIn()` The user is considered logged in if they have not timed out.
`void` | `incrementAccessCounter()` Increments the permanent hit counter for the user.
`void` | `incrementAccessCounterForSession()` Increments the session hit counter for the user.
`boolean` | `isConfirmed()` This method reports whether or not the user has been confirmed in the system by checking the TurbineUserPeer.CONFIRM_VALUE column to see if it is equal to CONFIRM_DATA.
`Object` | `removeTemp(String name)` Remove an object from temporary storage and return the object.
`void` | `setAccessCounter(int cnt)` Sets the access counter for a user, saved in perm storage.
`void` | `setAccessCounterForSession(int cnt)` Sets the session access counter for a user, saved in temp storage.
`void` | `setConfirmed(String value)` Sets the confirmation value.
`void` | `setCreateDate(Date date)` Sets the creation date for this user.
`void` | `setEmail(String address)` Sets the email address.
`void` | `setFirstName(String firstName)` Sets the first name for this user.
`void` | `setHasLoggedIn(Boolean value)` This sets whether or not someone has logged in.
`void` | `setLastAccessDate()` Sets the last access date for this User.
`void` | `setLastLogin(Date lastLogin)` Set last login date/time.
`void` | `setLastName(String lastName)` Sets the last name for this user.
`void` | `setPassword(String password)` Set password.
`void` | `setPerm(String name, Object value)` Put an object into permanent storage.
`void` | `setPermStorage(Hashtable<String,Object> storage)` This should only be used in the case where we want to save the data to the database.
`void` | `setTemp(String name, Object value)` Put an object into temporary storage.
`void` | `setTempStorage(Hashtable<String,Object> storage)` This should only be used in the case where we want to save the data to the database.
`void` | `updateLastLogin()` Updates the last login date in the database.

Methods inherited from interface javax.servlet.http.HttpSessionBindingListener
`valueBound, valueUnbound`

Methods inherited from interface org.apache.turbine.om.security.SecurityEntity
`getId, getIdAsObj, getName, setId, setName`

Field Detail

### FIRST_NAME

    static final String FIRST_NAME

  The 'perm storage' key name for the first name.

  See Also:
    Constant Field Values

### LAST_NAME

    static final String LAST_NAME

  The 'perm storage' key name for the last name.

  See Also:
    Constant Field Values

### LAST_LOGIN

    static final String LAST_LOGIN

  The 'perm storage' key name for the last_login field.

  See Also:
    Constant Field Values

### PASSWORD

    static final String PASSWORD

  The 'perm storage' key name for the password field.

  See Also:
    Constant Field Values

### USERNAME

    static final String USERNAME

  The 'perm storage' key name for the username field.

  See Also:
    Constant Field Values

### CONFIRM_VALUE

    static final String CONFIRM_VALUE

  The 'perm storage' key for the confirm_value field.

  See Also:
    Constant Field Values

### EMAIL

    static final String EMAIL

  The 'perm storage' key for the email field.

  See Also:
    Constant Field Values

### CONFIRM_DATA

    static final String CONFIRM_DATA

  This is the value that is stored in the database for confirmed users

  See Also:
    Constant Field Values

### ACCESS_COUNTER

    static final String ACCESS_COUNTER

  The 'perm storage' key name for the access counter.

  See Also:
    Constant Field Values

### SESSION_ACCESS_COUNTER

    static final String SESSION_ACCESS_COUNTER

  The 'temp storage' key name for the session access counter

  See Also:
    Constant Field Values

### HAS_LOGGED_IN

    static final String HAS_LOGGED_IN

  The 'temp storage' key name for the 'has logged in' flag

  See Also:
    Constant Field Values

### SESSION_KEY

    static final String SESSION_KEY

  The session key for the User object.

  See Also:
    Constant Field Values

Method Detail

### getAccessCounter

    int getAccessCounter()

  Gets the access counter for a user from perm storage.

  Returns:
    The access counter for the user.

### getAccessCounterForSession

    int getAccessCounterForSession()

  Gets the access counter for a user during a session.

  Returns:
    The access counter for the user for the session.

### getLastAccessDate

    Date getLastAccessDate()

  Gets the last access date for this User. This is the last time that the user object was referenced.

  Returns:
    A Java Date with the last access date for the user.

### getCreateDate

    Date getCreateDate()

  Gets the create date for this User. This is the time at which the user object was created.

  Returns:
    A Java Date with the date of creation for the user.

### getLastLogin

    Date getLastLogin()

  Returns the user's last login date.

  Returns:
    A Java Date with the last login date for the user.

### getPassword

    String getPassword()

  Returns the user's password. This method should not be used by the application directly, because it's meaning depends upon the implementation of UserManager that manages this particular user object. Some implementations will use this attribute for storing a password encrypted in some way, other will not use it at all, when user entered password is presented to some external authority (like NT domain controller) to validate it. See also `UserManager.authenticate(User,String)`.

  Returns:
    A String with the password for the user.

### getPerm

    Object getPerm(String name)

  Get an object from permanent storage.

  Parameters:
    `name` - The object's name.
  Returns:
    An Object with the given name.

### getPerm

    Object getPerm(String name,
                   Object def)

  Get an object from permanent storage; return default if value is null.

  Parameters:
    `name` - The object's name.
    `def` - A default value to return.
  Returns:
    An Object with the given name.

### getPermStorage

    Hashtable<String,Object> getPermStorage()

  This should only be used in the case where we want to save the data to the database.

  Returns:
    A Hashtable.

### getTempStorage

    Hashtable<String,Object> getTempStorage()

  This should only be used in the case where we want to save the data to the database.

  Returns:
    A Hashtable.

### getTemp

    Object getTemp(String name)

  Get an object from temporary storage.

  Parameters:
    `name` - The object's name.
  Returns:
    An Object with the given name.

### getTemp

    Object getTemp(String name,
                   Object def)

  Get an object from temporary storage; return default if value is null.

  Parameters:
    `name` - The object's name.
    `def` - A default value to return.
  Returns:
    An Object with the given name.

### getFirstName

    String getFirstName()

  Returns the first name for this user.

  Returns:
    A String with the user's first name.

### getLastName

    String getLastName()

  Returns the last name for this user.

  Returns:
    A String with the user's last name.

### getEmail

    String getEmail()

  Returns the email address for this user.

  Returns:
    A String with the user's email address.

### setHasLoggedIn

    void setHasLoggedIn(Boolean value)

  This sets whether or not someone has logged in. hasLoggedIn() returns this value.

  Parameters:
    `value` - Whether someone has logged in or not.

### hasLoggedIn

    boolean hasLoggedIn()

  The user is considered logged in if they have not timed out.

  Returns:
    True if the user has logged in.

### incrementAccessCounter

    void incrementAccessCounter()

  Increments the permanent hit counter for the user.

### incrementAccessCounterForSession

    void incrementAccessCounterForSession()

  Increments the session hit counter for the user.

### removeTemp

    Object removeTemp(String name)

  Remove an object from temporary storage and return the object.

  Parameters:
    `name` - The name of the object to remove.
  Returns:
    An Object.

### setAccessCounter

    void setAccessCounter(int cnt)

  Sets the access counter for a user, saved in perm storage.

  Parameters:
    `cnt` - The new count.

### setAccessCounterForSession

    void setAccessCounterForSession(int cnt)

  Sets the session access counter for a user, saved in temp storage.

  Parameters:
    `cnt` - The new count.

### setLastAccessDate

    void setLastAccessDate()

  Sets the last access date for this User. This is the last time that the user object was referenced.

### setLastLogin

    void setLastLogin(Date lastLogin)

  Set last login date/time.

  Parameters:
    `lastLogin` - The last login date.

### setPassword

    void setPassword(String password)

  Set password. Application should not use this method directly, see `getPassword()`. See also `UserManager.changePassword(User,String,String)`.

  Parameters:
    `password` - The new password.

### setPerm

    void setPerm(String name,
                 Object value)

  Put an object into permanent storage.

  Parameters:
    `name` - The object's name.
    `value` - The object.

### setPermStorage

    void setPermStorage(Hashtable<String,Object> storage)

  This should only be used in the case where we want to save the data to the database.

  Parameters:
    `storage` - A Hashtable.

### setTempStorage

    void setTempStorage(Hashtable<String,Object> storage)

  This should only be used in the case where we want to save the data to the database.

  Parameters:
    `storage` - A Hashtable.

### setTemp

    void setTemp(String name,
                 Object value)

  Put an object into temporary storage.

  Parameters:
    `name` - The object's name.
    `value` - The object.

### setFirstName

    void setFirstName(String firstName)

  Sets the first name for this user.

  Parameters:
    `firstName` - User's first name.

### setLastName

    void setLastName(String lastName)

  Sets the last name for this user.

  Parameters:
    `lastName` - User's last name.

### setCreateDate

    void setCreateDate(Date date)

  Sets the creation date for this user.

  Parameters:
    `date` - Creation date

### setEmail

    void setEmail(String address)

  Sets the email address.

  Parameters:
    `address` - The email address.

### isConfirmed

    boolean isConfirmed()

  This method reports whether or not the user has been confirmed in the system by checking the TurbineUserPeer.CONFIRM_VALUE column to see if it is equal to CONFIRM_DATA.

  Returns:
    True if the user has been confirmed.

### setConfirmed

    void setConfirmed(String value)

  Sets the confirmation value.

  Parameters:
    `value` - The confirmation key value.

### getConfirmed

    String getConfirmed()

  Gets the confirmation value.

  Returns:
    The confirmed value

### updateLastLogin

    void updateLastLogin()
                         throws Exception

  Updates the last login date in the database.

  Throws:
    `Exception` - A generic exception.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.