org.apache.turbine.om.security

## Interface User

- All Superinterfaces:
    EventListener, org.apache.fulcrum.security.entity.ExtendedUser, HttpSessionBindingListener, org.apache.fulcrum.security.entity.SecurityEntity, Serializable, org.apache.fulcrum.security.model.turbine.entity.TurbineUser, org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRoleEntity, org.apache.fulcrum.security.entity.User

      public interface User
      extends HttpSessionBindingListener, Serializable, org.apache.fulcrum.security.model.turbine.entity.TurbineUser

  This interface represents functionality that all users of the Turbine system require.
  Version:
    $Id: User.java 1524160 2013-09-17 18:37:14Z tv $
  Author:
    Frank Y. Kim, John D. McNally, Jon S. Stevens, Craig D. Berry, Henning P. Schmiedehausen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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` | `CREATE_DATE` The 'perm storage' key name for the create_date field.
    `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` | `SESSION_ACCESS_COUNTER` The 'temp storage' key name for the session access counter
    `static String` | `SESSION_KEY` The session key for the User object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `Date` | `getLastAccessDate()` Gets the last access date for this User.
    `Date` | `getLastLogin()` Returns the user's last login date.
    `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.
    `Map<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.
    `Map<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` | `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` | `setPerm(String name, Object value)` Put an object into permanent storage.
    `void` | `setPermStorage(Map<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(Map<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.fulcrum.security.entity.ExtendedUser

      `getEmail, getFirstName, getLastName, getObjectdata, setEmail, setFirstName, setLastName, setObjectdata`

    - ### Methods inherited from interface org.apache.fulcrum.security.entity.User

      `getPassword, setPassword`

    - ### Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity

      `getId, getName, setId, setName`

    - ### Methods inherited from interface org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRoleEntity

      `addUserGroupRole, getUserGroupRoleSet, removeUserGroupRole, setUserGroupRoleSet`

- - ### Field Detail

    - #### CREATE_DATE

          static final String CREATE_DATE

      The 'perm storage' key name for the create_date field.
      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

    - #### CONFIRM_VALUE

          static final String CONFIRM_VALUE

      The 'perm storage' key for the confirm_value 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.

    - #### 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

          Map<String,Object> getPermStorage()

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

    - #### getTempStorage

          Map<String,Object> getTempStorage()

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

    - #### 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.

    - #### 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.

    - #### 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(Map<String,Object> storage)

      This should only be used in the case where we want to save the data to the database.
      Parameters:
        `storage` - A Map.

    - #### setTempStorage

          void setTempStorage(Map<String,Object> storage)

      This should only be used in the case where we want to save the data to the database.
      Parameters:
        `storage` - A Map.

    - #### setTemp

          void setTemp(String name,
                     Object value)

      Put an object into temporary storage.
      Parameters:
        `name` - The object's name.
        `value` - The object.

    - #### setCreateDate

          void setCreateDate(Date date)

      Sets the creation date for this user.
      Parameters:
        `date` - Creation date

    - #### 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.

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